aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 ... 3 4 [5]

Author Topic: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)  (Read 50727 times)

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)
« Reply #60 on: May 13, 2009, 09:34:55 PM »

It doesn't actually work with Tiger, no, I tested it as well. I can help you find out why if you want, but it'll have to be in the weekend if you don't find it first.

EDIT: However, I am pretty sure I know what's going on: Make sure you compiled with the right framework (10.4) EVERY library. Those that don't have the option, use the CC= solution.
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)
« Reply #61 on: May 13, 2009, 09:53:35 PM »

It doesn't actually work with Tiger, no, I tested it as well. I can help you find out why if you want, but it'll have to be in the weekend if you don't find it first.

EDIT: However, I am pretty sure I know what's going on: Make sure you compiled with the right framework (10.4) EVERY library. Those that don't have the option, use the CC= solution.

Yep... I'm new to Mac OS development and I thought it was only a matter of gcc version. I will start again from scratch... :)
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)
« Reply #62 on: May 14, 2009, 03:05:30 AM »

Do you need any help with the right flags?
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)
« Reply #63 on: May 14, 2009, 06:17:51 AM »

Do you need any help with the right flags?

Please correct me if I'm wrong...

wxWidgets
--with-macosx-version-min=10.4 --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk

aMule
CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"


EDIT:
I'm not sure but it seems to me there are two other ways to get a app built against 10.5 working on 10.4... the first one implicates the use of the MACOSX_DEPLOYMENT_TARGET flag, the second of CC="gcc -mmacosx-version-min=10.4", but I have to understand them deeply...
« Last Edit: May 14, 2009, 07:25:24 AM by mirko.g »
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)
« Reply #64 on: May 14, 2009, 07:35:58 AM »

In one of my projects, I use this:

Code: [Select]
SDK=/Developer/SDKs/MacOSX10.4u.sdk
CFLAGS="-isysroot ${SDK} -arch ppc -arch i386 -mmacosx-version-min=10.4 $CFLAGS"
CPPFLAGS="-isysroot ${SDK} -arch ppc -arch i386 -mmacosx-version-min=10.4 $CPPFLAGS"
LDFLAGS="-isysroot ${SDK} -Wl,-syslibroot,${SDK} -mmacosx-version-min=10.4 $LDFLAGS"

Substitute as needed.

And it works quite well. Of course, same applies to all libraries you're compiling, if applicable.
Logged

gtoso

  • Official MacOSX Packager
  • Full Member
  • ***
  • Karma: 24
  • Offline Offline
  • Posts: 206
Re: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)
« Reply #65 on: May 14, 2009, 12:01:10 PM »


EDIT:
I'm not sure but it seems to me there are two other ways to get a app built against 10.5 working on 10.4... the first one implicates the use of the MACOSX_DEPLOYMENT_TARGET flag, the second of CC="gcc -mmacosx-version-min=10.4", but I have to understand them deeply...


They are the same, but for safety you use both.
From man gcc:

       -mmacosx-version-min=version
           The earliest version of MacOS X that this executable will run on is
           version.  Typical values of version include 10.1, 10.2, and 10.3.9.

           This value can also be set with the MACOSX_DEPLOYMENT_TARGET
           environment variable.  If both the command-line option is specified
           and the environment variable is set, the command-line option will
           take precedence.

I tried to use as min version 10.4, but to use 10.5 SDK and it seems work.
I don't know if it is right but the SDK determines the maximum system whose API you want to benefit from
and the DEPLOYMENT_TARGET the minimal supported OS version...
Maybe it is useless or maybe there is a runtime detect...
Someone can help?

Attenction to all libraries compiled with MacPorts, I had to use:
port install .... +universal macosx_deployment_target=10.4 universal_target=10.4

EDIT:
See here.

« Last Edit: May 14, 2009, 12:05:05 PM by gtoso »
Logged

gtoso

  • Official MacOSX Packager
  • Full Member
  • ***
  • Karma: 24
  • Offline Offline
  • Posts: 206
Re: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)
« Reply #66 on: May 19, 2009, 05:21:39 PM »

From man gcc:

       -mmacosx-version-min=version
           The earliest version of MacOS X that this executable will run on is
           version.  Typical values of version include 10.1, 10.2, and 10.3.9.

           This value can also be set with the MACOSX_DEPLOYMENT_TARGET
           environment variable.  If both the command-line option is specified
           and the environment variable is set, the command-line option will
           take precedence.

I tried to use as min version 10.4, but to use 10.5 SDK and it seems work.
I don't know if it is right but the SDK determines the maximum system whose API you want to benefit from
and the DEPLOYMENT_TARGET the minimal supported OS version...
Maybe it is useless or maybe there is a runtime detect...
Someone can help?

I found this.
So it's weak linking and the runtime detect is possible but into the program. So it works(*) because wxMac/aMule don't use Leopard specific features.
Now I think that here has no sense to use the 10.5 sdk, mmm somewhere in wxWidgets docs tell the same  ::)

* I tried almost all on Tiger/PPC and it works fine.

EDIT: Here they tell something similar.
Here there are some very nice things to make aMule more Mac style:
menu, close...
« Last Edit: May 19, 2009, 05:34:45 PM by gtoso »
Logged

gtoso

  • Official MacOSX Packager
  • Full Member
  • ***
  • Karma: 24
  • Offline Offline
  • Posts: 206
Re: aMule-2.2.4-i686 Mac OS X 10.4+ (MacFactory release)
« Reply #67 on: May 19, 2009, 10:59:59 PM »

Just for info I find this old document.

So, if I correctly understand, it seems that aMule/wxMac/dependents libraries doesn't use any Leopard only features:

Code: [Select]
enterprise:tmp2 sadmin$ otool -l /Applications/aMule-2.2.5/aMule.app/Contents/MacOS/*|grep -i weak
otool: can't map file: /Applications/aMule-2.2.5/aMule.app/Contents/MacOS/ed2kHelperScript.app (Invalid argument)
enterprise:tmp2 sadmin$ otool -l /Applications/aMule-2.2.5/aMule.app/Contents/Frameworks/*|grep -i weak
enterprise:tmp2 sadmin$
Logged
Pages: 1 ... 3 4 [5]