aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Does not compile with GCC-4.1  (Read 2418 times)

Fab-Ko

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Does not compile with GCC-4.1
« on: March 06, 2006, 12:45:56 AM »

So I've tried to compile aMule-CVS from 05.03.2006 with GCC-4.1 on my gentoo-notebook.

USE-Flags:
Code: [Select]
[ebuild   R   ] net-p2p/amule-cvs-1  USE="X gtk2 kad nls optimize remote remote-gui unicode -amuled -debug -nosystray -stats" 0 kB [1][
So i got:
Code: [Select]
make  all-am
make[5]: Entering directory `/mnt/main/portage-tmp/portage/amule-cvs-1/work/amule-cvs/src/libs/ec'
if i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../..    -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA   -I../../../src -I../../../src/libs -O2 -march=pentium-m  -pipe -msse2 -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -O2  -MT libec_a-ECPacket.o -MD -MP -MF ".deps/libec_a-ECPacket.Tpo" -c -o libec_a-ECPacket.o `test -f 'ECPacket.cpp' || echo './'`ECPacket.cpp; \
then mv -f ".deps/libec_a-ECPacket.Tpo" ".deps/libec_a-ECPacket.Po"; else rm -f ".deps/libec_a-ECPacket.Tpo"; exit 1; fi
/usr/include/wx-2.6/wx/string.h:175: error: 'wstring' in namespace 'std' does not name a type
/usr/include/wx-2.6/wx/string.h:663: error: expected ',' or '...' before '&' token
/usr/include/wx-2.6/wx/string.h:663: error: ISO C++ forbids declaration of 'wxStdString' with no type
/usr/include/wx-2.6/wx/string.h:663: error: 'wxString::wxString(int)' cannot be overloaded
/usr/include/wx-2.6/wx/string.h:633: error: with 'wxString::wxString(int)'
/usr/include/wx-2.6/wx/string.h: In constructor 'wxString::wxString(int)':
/usr/include/wx-2.6/wx/string.h:664: error: 's' was not declared in this scope
/usr/include/wx-2.6/wx/hashmap.h: In member function 'wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const':
/usr/include/wx-2.6/wx/hashmap.h:684: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.6/wx/clntdata.h: In member function 'wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.6/wx/clntdata.h:26: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.6/wx/clntdata.h: In member function 'wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.6/wx/clntdata.h:31: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.6/wx/gdicmn.h: In member function 'wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const':
/usr/include/wx-2.6/wx/gdicmn.h:476: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.6/wx/image.h: In member function 'wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const':
/usr/include/wx-2.6/wx/image.h:123: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[5]: *** [libec_a-ECPacket.o] Error 1
make[5]: Leaving directory `/mnt/main/portage-tmp/portage/amule-cvs-1/work/amule-cvs/src/libs/ec'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/mnt/main/portage-tmp/portage/amule-cvs-1/work/amule-cvs/src/libs/ec'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/main/portage-tmp/portage/amule-cvs-1/work/amule-cvs/src/libs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/main/portage-tmp/portage/amule-cvs-1/work/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/main/portage-tmp/portage/amule-cvs-1/work/amule-cvs'
make: *** [all] Error 2

With GCC-3.4.5 it works fine. :)
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Does not compile with GCC-4.1
« Reply #1 on: March 06, 2006, 03:11:01 AM »

Probably wxWidgets' fault.

Have a look here:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/include/wx/string.h
Quote
Log: backported fix for compilation with g++ 4.1 from HEAD (replaces patch 1373127)
So you could try:

- wxWidgets CVS HEAD (which already has this fix)

- wxWidgets 2.6.3 rc1 (*) (which should already have it, too)

- take the Patch from CVS and apply it to your already installed copy (might work or not work)

(*) http://ftp://biolpc22.york.ac.uk/pub/2.6.3-rc1/wxWidgets-2.6.3-rc1.tar.bz2

Try this first:

- rename "/usr/include/wx-2.6/wx/string.h" to "/usr/include/wx-2.6/wx/string.h.bak"

- download this file:

http://cvs.wxwidgets.org/viewcvs.cgi/*checkout*/wxWidgets/include/wx/string.h?rev=1.206.2.3

- copy it into "/usr/include/wx-2.6/wx"

- compile aMule again

If it works, fine. If it doesn't, you probably have to update your whole wxWidgets installation to either 2.6.3 rc1 or CVS_HEAD. And don't forget to file a bugreport against this to your distro maintainers, so they can fix it for all users.
« Last Edit: March 06, 2006, 03:19:01 AM by Gerd78 »
Logged