Hello World!

Firefox-4.0 in its raw state won't compile with gcc-4.6.0. The build
grinds to a halt like so:

c++ -o nsEnumeratorUtils.o -c -I../../dist/stl_wrappers 
-I../../dist/system_wrappers -include 
/home/andy/firefox-4.0/config/gcc_hidden.h -DOSTYPE=\"Linux2.6\" -DOSARCH=Linux 
-DTARGET_XPCOM_ABI=\"x86_64-gcc3\" -I/home/andy/firefox-4.0/xpcom/glue/../build 
 -I/home/andy/firefox-4.0/xpcom/glue -I. -I../../dist/include 
-I../../dist/include/nsprpub  -I/tmp/firefox-build-dir/dist/include/nspr 
-I/tmp/firefox-build-dir/dist/include/nss       -fPIC  -fno-rtti 
-fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth 
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof 
-Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long 
-fno-strict-aliasing -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -Os 
-freorder-blocks -fomit-frame-pointer    -DMOZILLA_CLIENT -include 
../../mozilla-config.h -MD -MF .deps/nsEnumeratorUtils.pp 
/home/andy/firefox-4.0/xpcom/glue/nsEnumeratorUtils.cpp
/home/andy/firefox-4.0/xpcom/glue/nsEnumeratorUtils.cpp:115:27: error: 
uninitialized const ‘EmptyEnumeratorImpl::kInstance’ [-fpermissive]
/home/andy/firefox-4.0/xpcom/glue/nsEnumeratorUtils.cpp:50:7: note: ‘const 
class EmptyEnumeratorImpl’ has no user-provided default constructor
make[5]: *** [nsEnumeratorUtils.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/tmp/firefox-build-dir/xpcom/glue'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/tmp/firefox-build-dir/xpcom'
make[3]: *** [libs_tier_platform] Error 2
make[3]: Leaving directory `/tmp/firefox-build-dir'
make[2]: *** [tier_platform] Error 2
make[2]: Leaving directory `/tmp/firefox-build-dir'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/tmp/firefox-build-dir'
make: *** [build] Error 2
andy:~/firefox-4.0$ 

There are 2 solutions that I know of.
1: Set CXXFLAGS to include -fpermissive:

echo "export CXXFLAGS=\"-march=native -mtune=generic -O2 -pipe \
  -fpermissive\"" >> mozconfig

or 
2: Patch the Firefox source with this patch:

https://bugzilla.mozilla.org/attachment.cgi?id=511846&action=diff&context=patch&collapsed=&headers=1&format=raw

Andy
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to