User information about macOS Mojave

Ken Cunningham ken.cunningham.webuse at
Thu Sep 20 01:37:44 UTC 2018

> Mojave requires Xcode 10 which contains only the 10.14 SDK. MacPorts doesn't have any particular support at this time for accessing alternative SDKs that the user might have placed in other locations.

I've been forcing MacPorts to do "bad" things for years, building stuff on 10.6.8 that has no rightful place being built there.

This bit of Josh's in libsdl2 works just fine to force a build against the 10.7 SDK on 10.6.8, for example.

platform macosx {
    if {${os.major} <= 10} {
        # Build requires at least 10.7.3 SDK, even when targeting 10.6
        set lion_sdkpath ${developer_dir}/SDKs/MacOSX10.7.sdk
        if {[file exists $lion_sdkpath]} {
            configure.sdkroot $lion_sdkpath
        } else {
            pre-fetch {
                error "Building $name @${version} on Mac OS X 10.6 requires the MacOSX10.7.sdk to be present in ${developer_dir}/SDKs/"

The Xcode clang in /usr/bin/ will complain that it can't build against libc++ on 10.6.8, but any macports-clang will do so very happily.

It seems most stuff can be forced to build against any SDK you want, most of the time. I build TenFourFox against the MacOSX.10.4u.SDK on 10.6.8 using gcc4.8 without any troubles.

It gets tricky when it's an xcodebuild Port, but there I just symlink in the macports-clang instead of the xcode clang into the SDK, and the macports-clang happily does what you want it to, building against libc++ on 10.6.8 or what have you.

SO - without having tried it -- setting 

configure.sdkroot /path/to/10.13.SDK

and building with any non-Xcode clang might have at least some chance of working to build i386 software.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list