aMule Forum
English => Compilation problems => Topic started by: gtoso on January 02, 2009, 03:10:12 PM
-
Hi,
I tried to compile 2.2.3 with the same options used for 2.2.2 but it failed.
OSX 10.4.11 PCC
g++ -DHAVE_CONFIG_H -I. -I. -I.. -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -DUSE_WX_EXTENSIONS -I/opt/local/include/upnp -DENABLE_UPNP=1 -D_THREAD_SAFE -I/Users/gtoso/mulo/wxMac-2.8.9/osx-build/lib/wx/include/mac-unicode-release-static-2.8 -I/Users/gtoso/mulo/wxMac-2.8.9/include -I/Users/gtoso/mulo/wxMac-2.8.9/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -I/opt/local/include -DENABLE_IP2COUNTRY=1 -I./libs -Ilibs -I./include -I/opt/local/include -D__WEAK_CRYPTO__ -I/opt/local/include -W -Wall -Wshadow -Wundef -O2 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -O2 -c -o amule-SearchListCtrl.o `test -f 'SearchListCtrl.cpp' || echo './'`SearchListCtrl.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I.. -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -DUSE_WX_EXTENSIONS -I/opt/local/include/upnp -DENABLE_UPNP=1 -D_THREAD_SAFE -I/Users/gtoso/mulo/wxMac-2.8.9/osx-build/lib/wx/include/mac-unicode-release-static-2.8 -I/Users/gtoso/mulo/wxMac-2.8.9/include -I/Users/gtoso/mulo/wxMac-2.8.9/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -I/opt/local/include -DENABLE_IP2COUNTRY=1 -I./libs -Ilibs -I./include -I/opt/local/include -D__WEAK_CRYPTO__ -I/opt/local/include -W -Wall -Wshadow -Wundef -O2 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -O2 -c -o amule-DownloadListCtrl.o `test -f 'DownloadListCtrl.cpp' || echo './'`DownloadListCtrl.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I.. -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -DUSE_WX_EXTENSIONS -I/opt/local/include/upnp -DENABLE_UPNP=1 -D_THREAD_SAFE -I/Users/gtoso/mulo/wxMac-2.8.9/osx-build/lib/wx/include/mac-unicode-release-static-2.8 -I/Users/gtoso/mulo/wxMac-2.8.9/include -I/Users/gtoso/mulo/wxMac-2.8.9/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -I/opt/local/include -DENABLE_IP2COUNTRY=1 -I./libs -Ilibs -I./include -I/opt/local/include -D__WEAK_CRYPTO__ -I/opt/local/include -W -Wall -Wshadow -Wundef -O2 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -O2 -c -o amule-ClientListCtrl.o `test -f 'ClientListCtrl.cpp' || echo './'`ClientListCtrl.cpp
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/char_traits.h: In static member function 'static char* std::char_traits<char>::copy(char*, const char*, size_t)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/char_traits.h:269: error: invalid static_cast from type 'void' to type 'char*'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/char_traits.h: In static member function 'static char* std::char_traits<char>::copy(char*, const char*, size_t)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/char_traits.h:269: error: invalid static_cast from type 'void' to type 'char*'
lipo: can't figure out the architecture type of: /var/tmp//cccs5GP4.out
make[3]: *** [amule-DownloadListCtrl.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/char_traits.h: In static member function 'static char* std::char_traits<char>::copy(char*, const char*, size_t)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/char_traits.h:269: error: invalid static_cast from type 'void' to type 'char*'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/char_traits.h: In static member function 'static char* std::char_traits<char>::copy(char*, const char*, size_t)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/char_traits.h:269: error: invalid static_cast from type 'void' to type 'char*'
lipo: can't figure out the architecture type of: /var/tmp//cc3P73k1.out
make[3]: *** [amule-ClientListCtrl.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
-
What's this?
-arch ppc -arch i386
-
What's this?
-arch ppc -arch i386
Mac universal build.
From gcc man page:
-arch arch
Compile for the specified target architecture arch. The allowable
values are i386, ppc and ppc64. Multiple options work, and direct
the compiler to produce ``universal'' binaries including object
code for each architecture specified with -arch. This option only
works if assembler and libraries are available for each architec-
ture specified. (APPLE ONLY)
Other things related to universal binary are:
-isysroot /Developer/SDKs/MacOSX...
needed on PPC, on Intel the system libraries are already universal.
This is not documented in the gcc man page, but I think is "similar" to -isystem.
But it works for all system headers and libraries/frameworks and accept a dir that contains all system hierarchy (from /).
-isystem dir
Search dir for header files, after all directories specified by -I
but before the standard system directories. Mark it as a system
directory, so that it gets the same special treatment as is applied
to the standard system directories.
--disable-dependency-tracking option to configure:
it doesn't use gcc's built-in dependency generation code, which does not work with multiple -arch targets.
-
Have you tried using only one of the -arch options? I mean: either -arch ppc or -arch i386. I know that way you will not get a Universal binary, but maybe there's some issue there, and better having a binary for just one architecture than no binary at all.
Regards.
-
The problem seems persist in native build (olny PPC):
super:~/mulo/aMule-2.2.3/src gtoso$ g++ -DHAVE_CONFIG_H -I. -I.. -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -DUSE_WX_EXTENSIONS -I/opt/local/include/upnp -DENABLE_UPNP=1 -D_THREAD_SAFE -I/Users/gtoso/mulo/wxMac-2.8.9/osx-build/lib/wx/include/mac-unicode-release-static-2.8 -I/Users/gtoso/mulo/wxMac-2.8.9/include -I/Users/gtoso/mulo/wxMac-2.8.9/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -I/opt/local/include -DENABLE_IP2COUNTRY=1 -I./libs -Ilibs -I./include -D__WEAK_CRYPTO__ -W -Wall -Wshadow -Wundef -O2 -c -o amule-DownloadListCtrl.o DownloadListCtrl.cpp
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function 'static char* std::char_traits<char>::copy(char*, const char*, size_t)':
/usr/include/c++/4.0.0/bits/char_traits.h:269: error: invalid static_cast from type 'void' to type 'char*'
The cause appears to be IP2Country.
super:~/mulo/aMule-2.2.3/src gtoso$ g++ -DHAVE_CONFIG_H -I. -I.. -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -DUSE_WX_EXTENSIONS -I/opt/local/include/upnp -DENABLE_UPNP=1 -D_THREAD_SAFE -I/Users/gtoso/mulo/wxMac-2.8.9/osx-build/lib/wx/include/mac-unicode-release-static-2.8 -I/Users/gtoso/mulo/wxMac-2.8.9/include -I/Users/gtoso/mulo/wxMac-2.8.9/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -I/opt/local/include -I./libs -Ilibs -I./include -D__WEAK_CRYPTO__ -W -Wall -Wshadow -Wundef -O2 -c -o amule-DownloadListCtrl.o DownloadListCtrl.cpp
super:~/mulo/aMule-2.2.3/src gtoso$
I'm going to recompile whole amule without geoip support :-(
-
IP2Country wasn't changed between 2.2.2 and 2.2.3. Did you update GeoIP to a new version meanwhile ?
Where is the GeoIP on Mac anyway - is it a system library like on Linux, or do you compile it from source like on Windows ?
-
IP2Country wasn't changed between 2.2.2 and 2.2.3. Did you update GeoIP to a new version meanwhile ?
Yes, yesterday, from 1.4.4 to 1.4.5.
Where is the GeoIP on Mac anyway - is it a system library like on Linux, or do you compile it from source like on Windows ?
Compiled from sources, but using Mac Ports.
It's in /opt/local/lib/
If you are sure that there are no changes about ip2country,
I will try to rebuild libgeoip and then 2.2.2 as test,
instead of searching the problem in the ifdef of DownloadListCtrl.cpp or in IP2Country...
EDIT:
you are right IP2Country.* are the same and no significative changes in DownloadListCtrl.*
-
Try switching back to GeoIP 1.4.4 first. 1.4.5 has nothing useful, just a load of IPV6 stuff.
-
Try switching back to GeoIP 1.4.4 first. 1.4.5 has nothing useful, just a load of IPV6 stuff.
I'll try.
-
Please try compiling aMule SVN 9319 with GeoIP 1.4.5. Maybe it works. If it still fails it will fail at least in IP2Country.cpp where it belongs. ;)
This problem could have been avoided easily (http://www.amule.org/amule/index.php?topic=15656.0). :-X