Opened 8 years ago
Closed 5 years ago
#52258 closed defect (fixed)
cmake upgrade to 3.6.2_0 fails
Reported by: | dershow | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | Cc: | cjones051073 (Chris Jones), SickTeddyBear, mojca (Mojca Miklavec) | |
Port: | cmake |
Description
I just tried to upgrade cmake from 3.6.1_0 to 3.6.2_0 and it fails. I've attached the log file. I did upgrade to xcode 8.0 yesterday, so that could relate to this problem.
Attachments (1)
Change History (24)
Changed 8 years ago by dershow
comment:1 Changed 8 years ago by murrayeisenberg@…
comment:2 Changed 8 years ago by michaelld (Michael Dickens)
You're building on 10.12 beta, yes? The errors are:
:info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/pthread.h:423:1: error: C++ requires a type specifier for all declarations :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/pthread.h:423:66: error: expected ';' after top level declarator
which is probably an Xcode issue that'll hopefully be fixed when the non-beta is released (next week, maybe).
I don't have 10.12 beta yet. I'll make a 10.12 install once it is released.
In the meantime, can you try to build cmake-devel & see if it works?
comment:3 Changed 8 years ago by dershow
No. No beta involved. I'm on 10.11.6. So using released OS and (recently) released Xcode.
comment:4 Changed 8 years ago by michaelld (Michael Dickens)
OK, strange. What do the following return:
uname -a xcodebuild -version
comment:5 Changed 8 years ago by dershow
$ uname -a Darwin adershowitzMBP15 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64 $ xcodebuild -version Xcode 8.0 Build version 8A218a
comment:6 Changed 8 years ago by michaelld (Michael Dickens)
OK. Interesting. Where did you get Xcode 8?
comment:7 Changed 8 years ago by dershow
The App Store. Apple put it out, and I installed it on Sept 14. There is information on it here: https://developer.apple.com/xcode/
comment:8 follow-ups: 11 18 Changed 8 years ago by michaelld (Michael Dickens)
Hmm ... as an update? I don't see it, and I do the beta program. Ah; OK; you get it via direct download. Hmmm ... I'm worried about installing it. I'd advise you to revert back to Xcode 7 if you can. And/or wait for 10.12 & upgrade to it.
The basic issue is that we need to set the SDK properly by the host OS. In your case here, the build is trying to use the 10.12 SDK while you're running on 10.11. That's asking for problems. I'm not sure what the correct solution is off the top of my head.
comment:9 Changed 8 years ago by mf2k (Frank Schima)
Cc: | michaelld@… removed |
---|---|
Owner: | changed from macports-tickets@… to michaelld@… |
comment:10 Changed 8 years ago by dershow
I was trying to build something else (openmodelica) and ran into the same problem
:info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/pthread.h:423:66: error: expected ';' after top level declarator
So, is this actually a bug in XCode 8?
comment:11 Changed 8 years ago by larryv (Lawrence Velázquez)
Replying to michaelld@…:
The basic issue is that we need to set the SDK properly by the host OS. In your case here, the build is trying to use the 10.12 SDK while you're running on 10.11. That's asking for problems. I'm not sure what the correct solution is off the top of my head.
This excerpt from the Xcode 8.1 beta release notes may be of interest:
There is no Command Line Tools (OS X 10.11) for Xcode 8 package. Xcode 8 contains SDKs that are incompatible with earlier toolchains. Developers who want to make use of the Xcode 8 SDKs from the command line must choose the SDK with
xcode-select
. Developers on OS X El Capitan who have installed versions of the Command Line Tools (OS X 10.11) for Xcode 8 Beta should install Command Line Tools (OS X 10.11) for Xcode 7.3.1. (28234439)
comment:12 Changed 8 years ago by dershow
I just saw a similar post on the macports list. I'm not sure what the work around is. It is not clear if Xcode 8 is not compatible, and I need to downgrade, or if I can just install the command line tools and use xcode-select?
comment:13 Changed 8 years ago by redwoodtree@…
Found the same issue after upgrade to mac os Sierra and Xcode 8. Found that /usr/local/include/pthread.h appears to have an undeclared type on line 423 with the "Swift unavailable message". Workaround was to copy the file to /opt/local/include/pthread.h and comment out line 423:
/*__SWIFT_UNAVAILABLE_MSG("Use lazily initialized globals instead") */
Will file a bug with apple.
comment:14 Changed 8 years ago by dershow
Any idea why this showed up now? Since I'm on 10.11, and was using Xcode 7, and now am using Xcode 8, shouldn't it be using the same pthread.h as before? Did my update of Xcode change /usr/local/include/pthread.h, even though I didn't explicitly install the CLTools? Or was this an existing latent bug that is just showing up with Xcode 8?
comment:15 Changed 8 years ago by cjones051073 (Chris Jones)
As far as I am aware Apple does not ship *anything* under /usr/local ....
comment:16 Changed 8 years ago by cjones051073 (Chris Jones)
comment:18 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to michaelld@…:
The basic issue is that we need to set the SDK properly by the host OS. In your case here, the build is trying to use the 10.12 SDK while you're running on 10.11. That's asking for problems. I'm not sure what the correct solution is off the top of my head.
It's not asking for problems; it's the way things are on macOS now, and have been already for awhile. If cmake doesn't like it, cmake is wrong. @jeremyhu had some more info on that point on the mailing list.
comment:20 Changed 8 years ago by redwoodtree@…
I see, thanks for the FAQ, after some research, this appears to be bad interaction with Homebrew. I assume both dersh and I have old, possibly way outdated and broken versions of homebrew installed .
comment:21 Changed 8 years ago by cjones051073 (Chris Jones)
No, Dersh's problem is not the same, but the previously discussed SDK issue.
comment:22 Changed 8 years ago by mojca (Mojca Miklavec)
Cc: | mojca added |
---|
comment:23 Changed 5 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | new → closed |
this no longer occurs
Same issue here in same situation - upgrade failed after released Xcode 8 and its command-line tools were installed.