Closed Bug 139089 Opened 23 years ago Closed 23 years ago

Mozilla should build on gcc 3.1

Categories

(SeaMonkey :: Build Config, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.0

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file)

I just built Mozilla with the gcc 3.1 branch. It required one minor change, which I'll attach, to rename a variable in TestLineBreak.cpp that conflicted with a global function in one of the system headers. Either it doesn't allow global variable names to conflict with global function names anymore or it's dragging in different system headers. We also spew out a lot of warnings for using deprecated C++ headers. (I'm seeing some weird caret behavior, but that could just be because the trunk is a little funny.)
Comment on attachment 80345 [details] [diff] [review] patch to allow building on gcc 3.1 r=cls
Attachment #80345 - Flags: review+
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.0
Comment on attachment 80345 [details] [diff] [review] patch to allow building on gcc 3.1 sr=jst
Attachment #80345 - Flags: superreview+
GCC 3.1 has officially been released. Could this get into the trunk if it's not already?
Checked in to trunk, 2002-05-16 19:22 PDT.
Comment on attachment 80345 [details] [diff] [review] patch to allow building on gcc 3.1 a=rjesup@wgate.com
Attachment #80345 - Flags: approval+
Checked into MOZILLA_1_0_0_BRANCH 2002-05-17 14:46 PDT. Note that gcc 3.1 has an optimization bug that causes incorrect caret placement and perhaps other problems. See bug 145267.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: fixed1.0.0
Resolution: --- → FIXED
MOZILLA_1_0_BRANCH does not build here with a pre-version of gcc 3.1.1 : gcc-3.1 (GCC) 3.1.1 20020606 (Debian prerelease) Here is the error I get : make[4]: Entering directory `/home/nico/work/mozilla/mozilla/obj-i686-pc-linux-gnu/xpcom/tools' make[5]: Entering directory `/home/nico/work/mozilla/mozilla/obj-i686-pc-linux-gnu/xpcom/tools/registry' gcc-3.1 -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic -Wno-long-long -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -pipe -O2 -fno-omit-frame-pointer -funroll-loops -mcpu=i686 -march=i686 -o regExport regExport.o -L../../../dist/bin -L../../../dist/lib -L../../../dist/bin -lxpcom -L/home/nico/work/mozilla/mozilla/obj-i686-pc-linux-gnu/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lc -ldl -lm -lc regExport.o: In function `display(nsIRegistry*, unsigned, char const*)': regExport.o(.text+0x508): undefined reference to `operator new[](unsigned)' regExport.o(.text+0x59b): undefined reference to `operator delete[](void*)' regExport.o: In function `nsDependentCString::~nsDependentCString [in-charge deleting]()': regExport.o(.gnu.linkonce.t._ZN18nsDependentCStringD0Ev+0x26): undefined reference to `operator delete(void*)' ../../../dist/bin/libxpcom.so: undefined reference to `__cxa_pure_virtual' ../../../dist/bin/libxpcom.so: undefined reference to `operator new(unsigned)' collect2: ld returned 1 exit status make[5]: *** [regExport] Error 1 make[5]: Leaving directory `/home/nico/work/mozilla/mozilla/obj-i686-pc-linux-gnu/xpcom/tools/registry' make[4]: *** [libs] Error 2 make[4]: Leaving directory `/home/nico/work/mozilla/mozilla/obj-i686-pc-linux-gnu/xpcom/tools' make[3]: *** [libs] Error 2 make[3]: Leaving directory `/home/nico/work/mozilla/mozilla/obj-i686-pc-linux-gnu/xpcom' make[2]: *** [tier_9] Error 2 make[2]: Leaving directory `/home/nico/work/mozilla/mozilla/obj-i686-pc-linux-gnu' make[1]: *** [default] Error 2 make[1]: Leaving directory `/home/nico/work/mozilla/mozilla/obj-i686-pc-linux-gnu' make: *** [build] Error 2 and my .mozconfig file : # Options for client.mk. mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@ # Options for 'configure' (same as command-line options). ac_add_options --with-system-jpeg=/usr ac_add_options --with-system-zlib=/usr ac_add_options --with-system-png=/usr ac_add_options --with-system-mng=/usr ac_add_options --enable-default-toolkit=gtk ac_add_options --enable-toolkit-gtk ac_add_options --disable-mailnews ac_add_options --disable-ldap ac_add_options --enable-crypto ac_add_options --enable-mathml ac_add_options --enable-svg ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --enable-optimize="-pipe -O2 -fno-omit-frame-pointer -funroll-loops -mcpu=i686 -march=i686" ac_add_options --disable-dtd-debug ac_add_options --enable-strip ac_add_options --enable-oji ac_add_options --enable-extensions=all I don't know C++ (only C) so I have no idea of what's wrong. Can someone help ? Thanks
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
It looks like you're using gcc instead of g++. Doesn't look right.
OK, I feel quite stupid now :-) I did export CC=gcc-3.1 and export CCC=gcc-3.1 because I thought that gcc was able to automagicaly detect if the code was C or C++. With export CC=gcc-3.1 export CCC=g++-3.1 it seems to build OK. Thank you and sorry for wasting your time. This bug can be re-marked as FIXED...
gcc can auto-detect the code, however, it will not automatically link the code against libstdc++. Afaik, the main browser code doesn't directly use any of libstdc++ but some of the helper apps do.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: