Compiling against libc++ on 10.6 and using the binary on 10.7

Ryan Schmidt ryandesign at macports.org
Sat Mar 24 01:57:38 UTC 2018


On Mar 23, 2018, at 05:35, Mojca Miklavec wrote:

> I'm compiling some command-line tools and I tried to aim supporting
> 10.6 (asking 10.6 users to grab libc++ from somewhere if they are
> desperate enough to want to use the binaries).
> 
> I compiled against libc++ provided by MacPorts and asked a user to
> test that binary on 10.7 (I would need to install one somewhere
> first). Apparently the binaries did not work there, probably because
> libc++ installed on 10.6 is newer than the one Apple shipped with
> Lion. I need to double-check if that's in fact the case (he could have
> mixed some binaries), but I just wanted to ask if there's some
> workaround to that.

I suppose that is a possible reason why it wouldn't work. Seeing the actual error message might help diagnose.


> (Maybe I should then compile on Lion, grab the 10.6 SDK from
> somewhere, compile against 10.6 SDK and link against libc++ from Lion?
> I don't particularly like this idea though. I could use the "cxx11
> 1.1" trick, but I hate to have to relink all the binaries at the end.
> None of that is ideal.)

Do you really need the 10.6 SDK? You're supposed to be able to use the latest SDK, and set MACOSX_DEPLOYMENT_TARGET to the lowest OS version you want to run on.




More information about the macports-dev mailing list