Closed Bug 194701 Opened 22 years ago Closed 22 years ago

Build failure on Gcc 3.2.2

Categories

(SeaMonkey :: Build Config, defect)

x86
Linux
defect
Not set
blocker

Tracking

(b2g-v2.1 affected)

VERIFIED WORKSFORME
Tracking Status
b2g-v2.1 --- affected

People

(Reporter: vhoel99, Assigned: netscape)

Details

Attachments

(3 files)

User-Agent: Opera/6.11 (Linux 2.4.21-pre4 i686; U) [en] Build Identifier: Mozilla 1.3b I use the following .mozconfig: # Options for 'configure' (same as command-line options). ac_add_options --with-prefix=/usr/local ac_add_options --enable-default-toolkit=gtk2 ac_add_options --enable-toolkit-gtk2 ac_add_options --enable-svg ac_add_options --with-default-mozilla-five-home=/usr/local/mozilla ac_add_options --with-x ac_add_options --with-system-zlib ac_add_options --with-system-png ac_add_options --with-system-jpeg ac_add_options --enable-xft ac_add_options --disable-mailnews ac_add_options --enable-crypto ac_add_options --enable-plaintext-editor-only ac_add_options --disable-ldap ac_add_options --disable-logging ac_add_options --disable-accessibility ac_add_options --disable-composer ac_add_options --disable-installer ac_add_options --disable-activex ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --with-pthreads ac_add_options --disable-dtd-debug ac_add_options --enable-optimize="-O3 -mcpu=pentiumpro -march=pentiumpro" ac_add_options --enable-java-supplement ac_add_options --enable-strip When I run a "gmake -f client.mk" this error appears: <-cut-> make[4]: Entering directory `/usr/src/mozilla/string/src' nsFragmentedString.cpp c++ -o nsFragmentedString.o -c -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -DOJI -D_IMPL_NS_COM -I../../dist/include/xpcom -I../../dist/include/string -I../../dist/include -I/usr/src/mozilla/dist/include/nspr -I/usr/X11R6/include -fPIC -O3 -mcpu=pentiumpro -march=pentiumpro -mpreferred-stack-boundary=4 -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic -Wno-long-long -O3 -mcpu=pentiumpro -march=pentiumpro -mpreferred-stack-boundary=4 -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O3 -mcpu=pentiumpro -march=pentiumpro -O3 -mcpu=pentiumpro -march=pentiumpro -mpreferred-stack-boundary=4 -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/nsFragmentedString.pp nsFragmentedString.cpp In file included from /usr/include/c++/3.2.2/new:41, from ../../dist/include/string/nsBufferHandleUtils.h:36, from ../../dist/include/string/nsSharedBufferList.h:47, from ../../dist/include/string/nsFragmentedString.h:35, from nsFragmentedString.cpp:26: /usr/include/c++/3.2.2/cstddef:53: parse error before `unsigned' In file included from ../../dist/include/string/nsBufferHandleUtils.h:36, from ../../dist/include/string/nsSharedBufferList.h:47, from ../../dist/include/string/nsFragmentedString.h:35, from nsFragmentedString.cpp:26: /usr/include/c++/3.2.2/new:51: parse error before `{' token /usr/include/c++/3.2.2/new:56: destructors must be member functions /usr/include/c++/3.2.2/new:56: virtual outside class declaration /usr/include/c++/3.2.2/new:79: parse error before `unsigned' /usr/include/c++/3.2.2/new:79: parse error before `::' token /usr/include/c++/3.2.2/new:80: parse error before `unsigned' /usr/include/c++/3.2.2/new:80: parse error before `::' token /usr/include/c++/3.2.2/new:83: parse error before `unsigned' /usr/include/c++/3.2.2/new:84: parse error before `unsigned' /usr/include/c++/3.2.2/new:85: parse error before `&' token /usr/include/c++/3.2.2/new:85: `operator delete' takes type `void*' as first parameter /usr/include/c++/3.2.2/new:86: parse error before `&' token /usr/include/c++/3.2.2/new:86: `operator delete' takes type `void*' as first parameter /usr/include/c++/3.2.2/new:89: parse error before `unsigned' /usr/include/c++/3.2.2/new: In function `void* operator new(unsigned int, ...)': /usr/include/c++/3.2.2/new:89: `__p' undeclared (first use this function) /usr/include/c++/3.2.2/new:89: (Each undeclared identifier is reported only once for each function it appears in.) /usr/include/c++/3.2.2/new: At global scope: /usr/include/c++/3.2.2/new:90: parse error before `unsigned' /usr/include/c++/3.2.2/new:96: parse error before `}' token In file included from ../../dist/include/string/nsFragmentedString.h:35, from nsFragmentedString.cpp:26: ../../dist/include/string/nsSharedBufferList.h: In static member function `static nsSharedBufferList::Buffer* nsSharedBufferList::NewWrappingBuffer(PRUnichar*, PRUnichar*, PRUnichar*)': ../../dist/include/string/nsSharedBufferList.h:205: call of overloaded ` operator new(unsigned int)' is ambiguous <internal>:205: candidates are: void* operator new(unsigned int) /usr/include/c++/3.2.2/new:89: void* operator new(unsigned int, ...) ../../dist/include/string/nsBufferHandleUtils.h: In function `HandleT* NS_AllocateContiguousHandleWithData(const HandleT*, unsigned int, const StringT*) [with HandleT = nsSharedBufferList::Buffer, StringT = nsDependentSingleFragmentSubstring]': ../../dist/include/string/nsBufferHandleUtils.h:183: instantiated from `HandleT* NS_AllocateContiguousHandleWithData(const HandleT*, const StringT&, unsigned int) [with HandleT = nsSharedBufferList::Buffer, StringT = nsDependentSingleFragmentSubstring]' ../../dist/include/string/nsSharedBufferList.h:190: instantiated from here ../../dist/include/string/nsBufferHandleUtils.h:152: call of overloaded ` operator new(unsigned int)' is ambiguous <internal>:152: candidates are: void* operator new(unsigned int) /usr/include/c++/3.2.2/new:89: void* operator new(unsigned int, ...) ../../dist/include/string/nsBufferHandleUtils.h: In function `HandleT* NS_AllocateContiguousHandleWithData(const HandleT*, unsigned int, const StringT*) [with HandleT = nsSharedBufferList::Buffer, StringT = nsAString]': ../../dist/include/string/nsBufferHandleUtils.h:183: instantiated from `HandleT* NS_AllocateContiguousHandleWithData(const HandleT*, const StringT&, unsigned int) [with HandleT = nsSharedBufferList::Buffer, StringT = nsAString]' ../../dist/include/string/nsSharedBufferList.h:198: instantiated from here ../../dist/include/string/nsBufferHandleUtils.h:152: call of overloaded ` operator new(unsigned int)' is ambiguous <internal>:152: candidates are: void* operator new(unsigned int) /usr/include/c++/3.2.2/new:89: void* operator new(unsigned int, ...) make[4]: *** [nsFragmentedString.o] Error 1 make[4]: Leaving directory `/usr/src/mozilla/string/src' make[3]: *** [libs] Error 2 make[3]: Leaving directory `/usr/src/mozilla/string' make[2]: *** [tier_2] Error 2 make[2]: Leaving directory `/usr/src/mozilla' make[1]: *** [default] Error 2 make[1]: Leaving directory `/usr/src/mozilla' make: *** [build] Error 2 I assume this is not a problem with GCC, since I have built a complete system using it :-) As always, just say if you need more info. Reproducible: Always Steps to Reproduce: 1. 2. 3. Running Linux 2.4.20 and 2.4.21pre4 GCC 3.2.2 glibc 3.2.1
Does this compiler setup compile other C++ programs correctly? The errors are in the C++ library header files, not ours.
Remember also, compiling with gcc 3.x will preclude you from using Sun's java plugin with mozilla.
Which is why you should switch to using the Blackdown version which has been compiled with gcc 3.2, http://www.blackdown.org/java-linux/java2-status/jdk1.4-status.html . (Not that this has anything to do with this actual bug.) This looks like a possible dupe of bug 191009. Do you have CPP set in your environment? If so, to what? Can you attach the full output of the ./configure run and the config.log file?
Attached file Output of ./configure
./configure &> configure.log
Attached file config.log
Just included the files as wished for. I have compiled other C++ programs on this system, like MPlayer, without any errors. And yes, it could seem like a dupe of bug 191009, since it is the exact same line in "cstddef". But I do not have CPP in my environment. (I assume you mean that I have not done any "export CPP=<something>" or "export CFLAGS=<someyhing>")
Well, the cause of the error is the same: size_t is being seen as undefined by autoconf and being redefined as unsigned. I don't see anything in the log to explain why that's happening though. In fact, all of those type tests (mode_t, off_t, pid_t) I would expect to pass on Linux. Try running this sample program though the preprocessor and grep the output for size_t. cat >dummy.c <<EOF #include <sys/types.h> #include <stdlib.h> #include <stddef.h> EOF gcc -E - dummy.c | grep size_t You may also want to check the output to see which stddef.h is being included.
You may want to delete config.cache, esp if you updated your compiler. 'Brad' on teh main tbox page is gcc-3.2.3pre, so it definately builds...
I assume you meant "gcc -E dummy.c" not "gcc -E - dummy.c" Anyway, I attached the output, and I can not see anything wrong. I got the same output on a box where I do manage to compile Mozilla. The stddef.h he uses is "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/stddef.h", and that seems fairly ok. And yes, I do a "make distclean" every time.
Ok, here's a silly question, do you have egrep installed? The actual commands used by configure are: cat > conftest.$ac_ext <<EOF #line 5994 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS #include <stdlib.h> #include <stddef.h> #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else rm -rf conftest* ac_cv_type_size_t=no fi rm -f conftest*
FWIW, I've built mozilla with gcc 3.2.2 on red hat linux 7.2, and not seen this problem.
Marking WFM based upon dmose's comments and the 3.2.2* tinderboxes.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
verified
Status: RESOLVED → VERIFIED
I am still not able to compile Mozilla on my box. The question about if I have egrep installed, I have to answer yes. I tried to debug the configure script, and I saw that both my boxes (one does compile it, and the other does not) set this: ac_cv_type_size_t=no In fact, both boxes gives this: checking for mode_t... no checking for off_t... no checking for pid_t... no checking for size_t... no I really hope you can check this it one more time, because I want to get to the bottom of this. A complete reinstall of the whole box would be a sad defeat :-(
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: