aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Error with the wxWidgets 2.6.3  (Read 4826 times)

NiKo87

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 49
Error with the wxWidgets 2.6.3
« 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 :)
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Error with the wxWidgets 2.6.3
« Reply #1 on: March 31, 2006, 12:10:18 PM »

This is fixed in 2.1.1 if I recall correctly.
Logged

NiKo87

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 49
Re: Error with the wxWidgets 2.6.3
« Reply #2 on: March 31, 2006, 07:26:59 PM »

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?
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: Error with the wxWidgets 2.6.3
« Reply #3 on: April 02, 2006, 10:32:45 AM »

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.
Logged

NiKo87

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 49
Re: Error with the wxWidgets 2.6.3
« Reply #4 on: April 02, 2006, 11:44:01 AM »

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?
Logged

NiKo87

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 49
Re: Error with the wxWidgets 2.6.3
« Reply #5 on: April 02, 2006, 01:43:55 PM »

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?
Logged