aMule Forum

English => Compilation problems => Topic started by: errico2 on January 10, 2006, 12:34:40 PM

Title: Compile error: c_expand_expr, en c-common.c
Post by: errico2 on January 10, 2006, 12:34:40 PM
Hi all:

I'm trying to compile amule 2.1.0. Well, after upgrading wxwidgets (grr...) I have this error (error message is originally in spanish; i'm going to translate it):
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/local/lib/wx/include/gtk2-ansi-release-2.6 -I/usr/local/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1   -DwxUSE_GUI=0  -I./libs -Ilibs -DAMULE_DAEMON  -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -O2  -MT amuled-amule.o -MD -MP -MF ".deps/amuled-amule.Tpo" -c -o amuled-amule.o `test -f 'amule.cpp' || echo './'`amule.cpp; \
then mv -f ".deps/amuled-amule.Tpo" ".deps/amuled-amule.Po"; else rm -f ".deps/amuled-amule.Tpo"; exit 1; fi
In file included by amule.cpp:62:
IPFilter.h:168:5: warning: "__DEBUG__" is not defined
In file included by amule.cpp:80:
FriendList.h:63:10: warning: #warning THIS MUST BE MADE PRIVATE AFTER EC IS CODED
 amule.cpp: In member function `virtual bool CamuleApp:: OnInit()':
amule.cpp:347: Internal compiler error in c_expand_expr, at c-common.c:3714
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.

I have a problem compiling amule or a problem in my box ?.

Regards, errico2.
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: Gerd78 on January 10, 2006, 01:49:00 PM
This is a GCC bug. GCC crashed.

Which distro are you using? What is the GCC version number? If there are any updates from your distro, install all of them.
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: errico2 on January 10, 2006, 03:59:27 PM
My box is a RedHat 9, with gcc-3.2.2-5. I'm going to search if there are any updates ?

Thansk, errico2.
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: watchdog on January 14, 2006, 09:51:20 AM
I have the same problem on RH9 and gcc 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Has anybody solved the problem?

Thanks
Holger

PS: Never saw this problem before. Just compiled GTK 2.8.9, gimp 2.2.9 and wxWidget 2.6.2 ...
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: Gerd78 on January 14, 2006, 10:33:56 AM
Quote
Originally posted by watchdog
Never saw this problem before.
Because you never compiled this version of aMule before.

It's known that something in amule.cpp makes the GCC version in RedHat 9 crash. It was reported multiple times.

And no, from what I can see on RedHat's FTP server, there are no updates. Looks like bad luck for you...
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: El Santo on January 14, 2006, 01:26:29 PM
Hi there...

Not only RH9

I'm suffering the same problem... I'm using Linux From Scratch (GCC-3.2.3), so i suppose is a (gcc 3.2.x && amule.cpp) problem.

Nobody knows how to solve?

Thanx and regards
s.
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: Kry on January 14, 2006, 08:35:55 PM
Update gcc?
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: watchdog on January 14, 2006, 09:00:50 PM
INSTALL says [think]It is known to compile in GCC 3.2, 3.3 and 3.4, older GCC's probably can't handle Microsoft C++ well enough.[/think]

GCC 3.2 is apparently not true. What versions are reported to work.
I do not like to test all of them ...

Holger
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: Gerd78 on January 14, 2006, 09:08:15 PM
Quote
Originally posted by watchdog
GCC 3.2 is apparently not true.
It was true in the past. There were many people using aMule on Red Hat 9 in the past. Then there was a code change in aMule that triggered this GCC bug. I suspect it to be between 2.0.2 and 2.0.3 because we had reports of the same problem with aMule 2.0.3 in the forums, but not with aMule 2.0.2.
Quote
Originally posted by watchdog
What versions are reported to work.
Personally I can confirm 3.3.5 and 4.0.2.
Quote
Originally posted by watchdog
I do not like to test all of them ...
No problem: Use 3.3. Why? Because it's newer than 3.2, but still compatible.

3.4 is not compatible to 3.2 as far as it concerns C++, so you should better not use it unless you want to recompile all your C++ stuff.

Btw. it's possible to have multiple versions installed, just install one of them to /opt/GCC-extra and then use
Code: [Select]
env CC=/opt/GCC-extra/bin/gcc CXX=/opt/GCC-extra/bin/g++ ./configurefor aMule.
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: watchdog on January 14, 2006, 09:21:25 PM
Thanks. aMule 2.0.3 still compiles with RH9 GCC 3.2.2.
I will try GCC 3.3.6. Hope that still works.
Know the trick installing several GCCs. Have gcc2953 in my /opt dir.
Thanks again for the reminder how to set the GCC env vars.
Also thanks for the background which GCC is still compatible and which not.
This helps a lot!

Regrads
Holger
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: watchdog on January 15, 2006, 10:14:26 AM
Good news.
Using GCC 3.3.6 for compiling on RH9 works.
No more GCC crashes.  :))
Just had a few aMule crashes when using Kad (something in wxGTK).
But without using Kad it seems to be stable (one night).
Thanks FORUM.

Cheers
Holger

PS: Did some mods on the spec file to get a rpm.
If someone is interested I attached the spec file.
Title: Re: Compile error: c_expand_expr, en c-common.c
Post by: Gerd78 on January 15, 2006, 10:27:11 AM
It's not necessary to modify the .spec file for this. You can simply export CC and CXX from the regular shell before running rpmbuild. rpmbuild inherits and uses the environment from the shell where it's executed from.
Title: gcc update not so easy...
Post by: El Santo on January 15, 2006, 06:37:59 PM
hi there!

i red http://gcc.gnu.org/bugs.html#upgrading (http://gcc.gnu.org/bugs.html#upgrading) and i think that upgrading from 3.2 to 3.3 requires rebuild of c++ libraries, so i don't think it's an easy upgrade.

the document says "If you change your compiler to a different major release you must recompile all libraries that contain C++ code" and "Remark: A major release is designated by a change to the first or second component of the two- or three-part version number. A minor (bug-fix) release is designated by a change to the third component only. Thus GCC 3.2 and 3.3 are major releases,..."

Particularly (i use linux from scratch) i'd had to rebuild many things from source....

I think that, if nobody knows a workaround, i'll stick with aMule 2.0.3, which compiles ok with gcc 3.2.3, at least for me

Thankx and regards
s.
Title: RE: gcc update not so easy...
Post by: thedude0001 on January 15, 2006, 09:03:57 PM
Quote
Originally posted by El Santo
the document says "If you change your compiler to a different major release you must recompile all libraries that contain C++ code"

This is true if you switch between ABI incompatible versions. If you switch from 3.3 or earlier to 3.4 or later you need to recompile everthing, though switching from 3.2 to 3.3 should be relatively painless.
Title: RE: gcc update not so easy...
Post by: El Santo on January 15, 2006, 10:11:06 PM
hi there!

Quote
Originally posted by thedude0001

This is true if you switch between ABI incompatible versions. If you switch from 3.3 or earlier to 3.4 or later you need to recompile everthing, though switching from 3.2 to 3.3 should be relatively painless.

when you wrote "relatively painless", do you mean "no need to rebuild any library"?

The gcc document http://gcc.gnu.org/bugs.html#upgrading (http://gcc.gnu.org/bugs.html#upgrading) doesnt say that.

i don't see any abi change int gcc 3.3.X changelog, but the above link makes me doubt...

are you sure that 3.2 and 3.3 are ABI compatible?

Thanks and regards:
s.
Title: RE: gcc update not so easy...
Post by: Gerd78 on January 15, 2006, 10:15:41 PM
Quote
Originally posted by El Santo
when you wrote "relatively painless", do you mean "no need to rebuild any library"?
Yes. Except for the standard C++ library itself, of course. But that is built together with GCC anyway.
Quote
Originally posted by El Santo
i don't see any abi change int gcc 3.3.X changelog, but the above link makes me doubt...
This document is wrong. GCC 3.2 and 3.3 are compatible.