aMule Forum
English => Compilation problems => Topic started by: NiKo87 on March 30, 2006, 04:03:21 PM
-
Hi, I tried to compile aMule using the latest stable release of the wxWidgets but I get this error during the "make":
then mv -f ".deps/libmulecommon_a-MuleDebug.Tpo" ".deps/libmulecommon_a-MuleDebug.Po"; else rm -f ".deps/libmulecommon_a-MuleDebug.Tpo"; exit 1; fi
MuleDebug.cpp:45:7: warning: "HAVE_BFD" is not defined
/Users/MaMaK/Desktop/wxMac-2.6.3/include/wx/wxchar.h:894: error: expected initializer before 'ATTRIBUTE_PRINTF_3'
/Users/MaMaK/Desktop/wxMac-2.6.3/include/wx/wxchar.h:932: error: expected initializer before 'ATTRIBUTE_PRINTF_1'
/Users/MaMaK/Desktop/wxMac-2.6.3/include/wx/wxchar.h:933: error: expected initializer before 'ATTRIBUTE_PRINTF_2'
/Users/MaMaK/Desktop/wxMac-2.6.3/include/wx/wxchar.h:934: error: expected initializer before 'ATTRIBUTE_PRINTF_2'
/Users/MaMaK/Desktop/wxMac-2.6.3/include/wx/wxchar.h:936: error: expected initializer before 'ATTRIBUTE_PRINTF_1'
/Users/MaMaK/Desktop/wxMac-2.6.3/include/wx/wxchar.h:937: error: expected initializer before 'ATTRIBUTE_PRINTF_2'
/Users/MaMaK/Desktop/wxMac-2.6.3/include/wx/wxchar.h:938: error: expected initializer before 'ATTRIBUTE_PRINTF_2'
make[4]: *** [libmulecommon_a-MuleDebug.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
What's going on? I didn't have any problem compiling aMule with the wxWidgets CVS at the end of December. Thanks :)
-
This is fixed in 2.1.1 if I recall correctly.
-
Thanks, but now using aMule 2.1.1 I get a new error :(
/usr/bin/ld: warning libs/common/libmulecommon.a archive's cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (can't load from it)
/usr/bin/ld: warning libs/ec/libec.a archive's cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (can't load from it)
/usr/bin/ld: warning ./libmuleappcore.a archive's cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (can't load from it)
/usr/bin/ld: warning ./libmuleappgui.a archive's cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (can't load from it)
/usr/bin/ld: Undefined symbols:
_main
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccR0ucPa.out (No such file or directory)
make[3]: *** [amule] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
It's something related with lipo. I think it's the command used by the wxWidgets to glue two sources together. Maybe because I'm on a Mac and I'm using wxWidgets compiled in Universal Binary?
-
Yes. If you compile wxWidgets as a Universal Binary, its wx-config then tells aMule's configure to use link flags relevant for Universal Binary, too. (By the way, when you post an error like this, please include the command which caused it. That way we could see the actual flags on the link command.)
In my opinion, this is a bug in wxWidgets' wx-config. Compiling a library as a universal binary should allow programs to link against it as a universal binary, not force them to. (For example, all of Apple's libraries are universal, but you can still link single-platform programs against them.)
Anyway, aMule's makefile is trying to link with both architectures because wx-config told it to. But aMule wasn't compiled with both architectures, so its internal object files and libraries will be missing the i386 architecture part that the linker is expecting.
-
I'll try with wxWidgets 2.6.3 not compiled in Universal Binary and by compiling aMule setting PowerPC as target. This should do the trick, shouldn't it?
-
Ok, I compiled both aMule and wxWidgets setting powerpc-apple-darwin 8 as target, build, and host and it worked, thanks. On the MacBook Pro (which is Intel) I should reproduce the same process, setting i386-apple-darwin 8 as target?