Apr 1, 2011 07:40:59 PM, Andrew Benton wrote: > 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 ... /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]: Leaving directory `/tmp/firefox-build-dir/xpcom/glue' make: *** [build] Error 2 > There are 2 solutions that I know of. ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Hi Andy, With my gcc-4.1.2 and "--enable-javaxpcom" the compile fails miserably somewhere at: c++ -o nsJavaInterfaces.o -c ... /usr/src/mozilla-2.0/extensions/java/xpcom/src/nsJavaInterfaces.cpp with /usr/src/mozilla-2.0/extensions/java/xpcom/src/nsJavaInterfaces.cpp:238: error: expected `)' before 'int' make[4]: *** [nsJavaInterfaces.o] Error 1 make[4]: Leaving directory `/usr/src/firefox-build/extensions/java/xpcom/src' (i.e., it seems I endured an experience similar to yours) ------ I "solved" this kind of nonsense a long time ago (so to speak) by just not using "--enable-javaxpcom" (nor "--disable-javaxpcom") The compile works to completion, AOK. Be that as it may, I was wondering if you'd be kind enough to comment on these (foolish) thoughts of mine: A. The BLFS Devel. svn-20110326 book. In the Firefox-3.6.13 mozcom example there are two lines regarding "xpcom": # If you enable javaxpcom, you must have a java compiler installed. ac_add_options --disable-javaxpcom BTW, I'm not sure I have a java compiler on this machine (I do have jdk-precompiled-1.6.0_12 installed, though) B. The './configure --help' provides an additional explanation in their inimitable style: --enable-javaxpcom Enable Java-XPCOM bridge What's a "bridge" anyway? :) ------ 1. It appears to me the problem is more with the xpcom "branch" than with the compiler version or the missing pesky destructor. 2. What do I miss in Firefox by not enabling javaxpcom? (functionality, security, etc. -wise) 3. Are there instructions on installing a java compiler in Linux from Scratch? (separate from jdk? ) Thanks, -- Alex --------------------------------------------------------------------- For reference ~~~~~~~~~~~ 2.6.37.3 Xorg-7.6 glib-2.28.4 gtk+-2.24.3 (with DJ Lucas: 'gtk+-2.22.1-old_icons-1.patch') sqlite-3.7.5 nspr-4.8.7 nss-3.12.9 libpng-1.5.1 +apng cairo-1.10.2 +tee firefox-4.0.source.tar.bz2 MD5sum: 3468a2c463b4fc2788ba621e4b511c30 (with 'mozilla-2.0/modules/libpr0n/decoders/nsPNGDecoder.cpp' patch) --disable-accessibility --disable-auto-deps --disable-crashreporter --disable-dbm --disable-gnomevfs --disable-installer --disable-tests --disable-updater --enable-cpp-rtti --enable-default-toolkit=cairo-gtk2 --enable-image-decoders=all --enable-image-encoders=all --enable-jemalloc --enable-official-branding --enable-optimize --enable-places --enable-safe-browsing --enable-strip --enable-system-cairo --enable-system-lcms --enable-system-sqlite --enable-valgrind --enable-libxul --with-java-bin-path=/opt/jdk/bin --with-java-include-path=/opt/jdk/include --with-pthreads --with-qtdir=/opt/qt --with-system-bz2 --with-system-jpeg --with-system-libxul --with-system-nspr --with-system-nss --with-system-png --with-system-zlib --with-x # --enable-javaxpcom -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
