aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: beginner problem with compiling on intel mac  (Read 2404 times)

cablez

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
beginner problem with compiling on intel mac
« on: October 01, 2006, 09:02:31 PM »

hello everybody!
i am trying to compile aMule on my intel mac mini (you may ask why i don't just use the available binaries - i think compiling it for myself would be fun and i would hopefully learn something from it)

i followed the instructions in the wiki, except i downloaded wxmac 2.6.3 instead of 2.6.1 and i built it with these configure options:
Code: [Select]
configure --disable-shared --enable-unicode --enable-universal_binary-which worked beautifully (as far as i can see)

then i downloaded the amule source, followed all the instructions in the wiki (including the amule configure options suggested there), configure succeeds with no error and i 'make', which looks fine for some minutes but then it stops with the following errors:
Code: [Select]
/usr/bin/ld: warning ./libmuleappgui.a archive's cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (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//ccBPyYuN.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
these are only the last few lines, there are a lot of these 'architecture does not match cputype' messages for a lot of different files.
so i am very unexperienced with these things, but it looks like that for some reason 'make' tries to build it for ppc or the linker (ld is the linker isn't it?) does something it shouldn't...
i have osx 10.4.8, the xcode 2.4 dev tools, wxmac is compiled as an universal binary - what exactly is wrong?
i assume this is an easy thing to fix, because i am sure i just set wrong options somewhere or missed some obvious things.
another thing is that 'make --help' says
Code: [Select]
This program built for powerpc-apple-darwin8.0
that should be i686-apple-darwin.8.something shouldn't it? but i didn't change anything - i have an almost fresh osx install and a fresh devools install - why do i have 'make' for ppc?
ok probably the programming veterans who read this will laugh but i hope someone helps me and points out what's wrong here! (btw my plan is to be able to compile and use the amule daemon some time in the future)
oh and i almost forgot - i tried this with both 2.1.3 sources and aMule-CVS-20061001

thanks in advance!
-cablez
Logged
amor fati

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: beginner problem with compiling on intel mac
« Reply #1 on: October 03, 2006, 11:53:07 AM »

If you only want to run aMule on your Intel based Mac, then you don't need to build a universal binary version of aMule. Compiling a universal binary version is a bit tricky and you need to do a few things by hand.

So what you need to do is to remove the "--enable-universal_binary" flag from your wx configure statement to 'make' an intel-only version of wx. Then amule compilation should not choke.

Good luck. :)
Logged
Current aMule CVS builds for OS X can be found here.

cablez

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Re: beginner problem with compiling on intel mac
« Reply #2 on: October 03, 2006, 05:46:04 PM »

hi!

lionel77, thank you for your reply!

i actually thought "--enable-universal_binary" is required to compile it on intel macs at all - thanks for pointing that out to me!

i compiled wxmac2.6.3 without that flag, which worked fine, then i compiled amule 2.1.3, which also worked fine, but it wouldn't launch because of a 'bus error', which i think has already been mentioned several times in the forums.
i tried again, but this time with today's cvs version - which also succeeded and - it launched :) and works flawlessly for about 15mins now.

i dont know if you tried again compiling the amuledaemon (i read somewhere that you did but it crashed after a few mins) - if you gave it another try: is it somewhat stable now or still unusable?

thank you again for your help!

-cablez
Logged
amor fati