Opened 7 years ago

Closed 6 years ago

#55771 closed defect (fixed)

textmate2 @2.0-rc.4: Build fails with SDK < 10.11

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version:
Keywords: mountainlion mavericks yosemite Cc:
Port: textmate2

Description

textmate2 @2.0-rc.4 uses a new Objective-C feature called lightweight generics which was introduced in the 10.11 SDK, so it fails to build when using an earlier SDK.

Xcode 7 on OS X 10.10 contains the 10.11 SDK, so it should be possible to fix this on 10.10 by telling it to use the 10.11 SDK. But I can't figure out how to do so. The portfile code is simple enough:

# Needs support for lightweight generics.
if {[vercmp ${configure.sdk_version} 10.11] < 0} {
    configure.sdk_version   10.11
    if {${configure.sdkroot} eq ""} {
        pre-fetch {
            ui_error "${name} @${version} requires the OS X 10.11 SDK or later."
            return -code error "incompatible SDK version"
        }
    }
}

But the configure script is nonstandard and doesn't appear to honor the CFLAGS/CXXFLAGS/LDFLAGS MacPorts sets. configure does explicitly pass CC and CXX to bin/gen_build. We may have to patch configure and/or bin/gen_build to also pass CFLAGS/CXXFLAGS/LDFLAGS. I emailed textmate support about it and he didn't know and recommended I ask on the textmate mailing list, so I'll do that next.

I'm considering ways of getting the 10.11 SDK onto earlier systems (10.8 and 10.9) whose latest Xcode versions don't have it. We've previously manually installed the 10.7 SDK on the 10.6 buildbot workers so that libsdl2 can build, but I'm not sure if we want to use the disk space to install all newer SDKs on all buildbot workers. textmate2 is also not distributable, so a solution that works on user machines too would be best.

Change History (5)

comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

In f25115b5cd12db55206a1af8f6113480ccd98d83/macports-ports:

textmate2: Require the OS X 10.11 SDK or later

See: #55771

comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

The build now fails on Yosemite with:

Frameworks/OakCommand/src/OakCommand.mm:182:1: error: ARC forbids synthesizing a property of an Objective-C object with unspecified ownership or storage attribute
@implementation OakCommand
^
Frameworks/OakCommand/src/OakCommand.h:16:29: note: property declared here
@property (nonatomic) void(^modalEventLoopRunner)(OakCommand*, BOOL* didTerminate);
                            ^
Frameworks/OakCommand/src/OakCommand.mm:182:1: error: ARC forbids synthesizing a property of an Objective-C object with unspecified ownership or storage attribute
@implementation OakCommand
^
Frameworks/OakCommand/src/OakCommand.h:17:29: note: property declared here
@property (nonatomic) void(^terminationHandler)(OakCommand*, BOOL normalExit);
                            ^
2 errors generated.

I find some hits for this error that says that in Xcode 7.3, this should work fine because the property is assumed to be strong, but for earlier versions, strong must be specified explicitly. I'll try this out...

comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

In ce04bb5918b6e81d1fcb46e906a6b57e77cbf4f2/macports-ports:

textmate2: Fix build failure on Yosemite

See: #55771

comment:5 Changed 6 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

It seems this was solved months ago by Ryan.

Note: See TracTickets for help on using tickets.