Multiple MacPort prefixes

Joshua Root jmr at macports.org
Wed Dec 17 06:47:55 PST 2014


> Hi,
> 
> I'm recently trying to bundling some backwards compat software packages
> using a Lion version of XCode  (3.x) on Mavericks and MacPorts.

Xcode 3.x is not the right version to use with Lion, 4.x is. 3.1 is for
Leopard and 3.2 is for Snow Leopard. IIRC, 3.2.6 didn't even work right
on Lion, so I wouldn't expect it to work on Mavericks.

> However, Mavericks had previously been setup with MacPorts and the
> Mavericks version of XCode (5.x).
> 
> The compilation is succeeding when I force the Lion build environment.
> 
> Unfortunately, the Lion builds won't run on Lion.

The Apple-endorsed way to build for an older OS version has always been
to use the latest Xcode and set MACOSX_DEPLOYMENT_TARGET to the oldest
version you want to target.

MacPorts doesn't officially support doing this, mainly because autoconf
and similar systems consider it to be cross-compiling and need you to
tell them about the target manually, instead of being able to detect the
characteristics of the build machine automatically.

> Ideally, I'd like to have two MacPorts installs that I can build software
> against... One for Mavericks and a second instance for Lion.

You can certainly configure MacPorts to use a different prefix when
building it from source.

- Josh


More information about the macports-users mailing list