[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compilation problem with icecat 3.0.2-g1
From: |
Michael Cree |
Subject: |
Compilation problem with icecat 3.0.2-g1 |
Date: |
Sun, 28 Sep 2008 13:38:22 +1300 |
User-agent: |
Mozilla-Thunderbird 2.0.0.16 (X11/20080725) |
I'm trying to compile icecat 3.0.2-g1 on Alpha architecture running Debian Lenny and have hit
problems. I configured with --with-optimize='-O2 -mcpu=ev67' option only (to tell the compiler
that it can generate code for my cpu, an EV67 variant Alpha).
First problem encountered is:
../../../../../../config/rules.mk:294: *** XPTCall not implemented on this
platform!. Stop.
I discovered my system is reported as alphaev67 by the configure script whereas
the Makefile at
xpcom/reflect/xptcall/src/md/unix/Makefile only has options for alpha (such as "Linuxalpha"). By
inserting "Linuxalphaev67" alongside the rule for "Linuxalpha" compilation proceeded successfully until:
c++ -o nsCookieService.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6.26\"
-DOSARCH=Linux -DIMPL_NS_NET -I. -I. -I../../../dist/include/xpcom -I../../../dist/include/string
-I../../../dist/include/pref -I../../../dist/include/storage -I../../../dist/include
-I../../../dist/include/necko -I../../../dist/include/nspr -I../../../dist/sdk/include
-fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-long-long -pedantic
-fno-strict-aliasing -mieee -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O2 -mcpu=ev67 -Werror
-DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/nsCookieService.pp
nsCookieService.cpp
cc1plus: warnings being treated as errors
In file included from ../../../dist/include/xpcom/nsCOMArray.h:42,
from nsCookieService.cpp:56:
../../../dist/include/xpcom/nsVoidArray.h: In member function 'void
nsAutoVoidArray::ResetToAutoBuffer()':
../../../dist/include/xpcom/nsVoidArray.h:193: warning: cast from 'char*' to 'nsVoidArray::Impl*'
increases required alignment of target type
../../../dist/include/xpcom/nsTHashtable.h: In member function 'EntryType*
nsTHashtable<EntryType>::GetEntry(typename EntryType::KeyType) const [with EntryType = nsCookieEntry]':
nsCookieService.cpp:1160: instantiated from here
../../../dist/include/xpcom/nsTHashtable.h:164: warning: cast from 'PLDHashEntryHdr*' to
'nsCookieEntry*' increases required alignment of target type
../../../dist/include/xpcom/nsTHashtable.h: In static member function 'static void
nsTHashtable<EntryType>::s_ClearEntry(PLDHashTable*, PLDHashEntryHdr*) [with EntryType =
nsCookieEntry]':
../../../dist/include/xpcom/nsTHashtable.h:335: instantiated from 'PRBool
nsTHashtable<EntryType>::Init(PRUint32) [with EntryType = nsCookieEntry]'
nsCookieService.cpp:418: instantiated from here
../../../dist/include/xpcom/nsTHashtable.h:391: warning: cast from 'PLDHashEntryHdr*' to
'nsCookieEntry*' increases required alignment of target type
../../../dist/include/xpcom/nsTHashtable.h: In static member function 'static void
nsTHashtable<EntryType>::s_CopyEntry(PLDHashTable*, const PLDHashEntryHdr*, PLDHashEntryHdr*) [with
EntryType = nsCookieEntry]':
../../../dist/include/xpcom/nsTHashtable.h:339: instantiated from 'PRBool
nsTHashtable<EntryType>::Init(PRUint32) [with EntryType = nsCookieEntry]'
nsCookieService.cpp:418: instantiated from here
../../../dist/include/xpcom/nsTHashtable.h:379: warning: cast from 'const PLDHashEntryHdr*' to
'const nsCookieEntry*' increases required alignment of target type
../../../dist/include/xpcom/nsTHashtable.h: In static member function 'static PLDHashOperator
nsTHashtable<EntryType>::s_EnumStub(PLDHashTable*, PLDHashEntryHdr*, PRUint32, void*) [with
EntryType = nsCookieEntry]':
../../../dist/include/xpcom/nsTHashtable.h:235: instantiated from 'PRUint32
nsTHashtable<EntryType>::EnumerateEntries(PLDHashOperator (*)(EntryType*, void*), void*) [with
EntryType = nsCookieEntry]'
nsCookieService.cpp:819: instantiated from here
../../../dist/include/xpcom/nsTHashtable.h:414: warning: cast from 'PLDHashEntryHdr*' to
'nsCookieEntry*' increases required alignment of target type
make[5]: *** [nsCookieService.o] Error 1
Notably the above "errors" are in fact warnings however the "treat warnings as errors" option was
set by the Makefile. I could disable the "treat warnings as errors" option in the Makefile, but I
presume that it has been prescribed for a reason, and that this is a "dangerous" module to be
entertaining warnings.
All of the warnings are about increasing the required alignment of target types of pointers. This
does represent a general problem for certain CPUs such as the Alpha. Certain data can only be
accessed on certain memory alignments. Failure to do so is not completely fatal; it normally results
in a kernel trap and the kernel, via a sequence of CPU instructions, emulates the required access,
with an enormous loss in performance. It is considered good practice to avoid this situation.
I guess my initial questions are: Why has the "treat warnings as errors" been set for this module?
Can I safely disable it?
Even if I disable "treat warnings as errors" compiler option, the possibility is that the code is
going to generate kernel traps to provide the required memory accesses, and in addition to grossly
inefficient execution, warnings will be inserted in the kernel logs whenever such a "naughty" access
is provided by the kernel. It is also possible the warnings are just false alarms; are the pointers
actually guaranteed to be correctly aligned for the cast datatype in every instance?
Any other suggestions?
Michael.
- Compilation problem with icecat 3.0.2-g1,
Michael Cree <=