Opened 12 years ago
Closed 11 years ago
#39086 closed defect (invalid)
cmake 2.8.10.2 with macosx_deployment_target 10.7 fails to configure
Reported by: | help@… | Owned by: | cssdev |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | Cc: | ville.aakko@… | |
Port: | cmake |
Description
$ sudo port install cmake ---> Computing dependencies for cmake ---> Fetching distfiles for cmake ---> Verifying checksum(s) for cmake ---> Extracting cmake ---> Applying patches to cmake ---> Configuring cmake Error: org.macports.configure for port cmake returned: configure failure: command execution failed Please see the log file for port cmake for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port cmake failed
From main.log:
:info:configure CMake Error at Modules/Platform/Darwin.cmake:190 (message): :info:configure CMAKE_OSX_DEPLOYMENT_TARGET is '10.7' but CMAKE_OSX_SYSROOT: :info:configure :info:configure "" :info:configure :info:configure is not set to a MacOSX SDK with a recognized version. Either set :info:configure CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to :info:configure empty. :info:configure Call Stack (most recent call first): :info:configure Modules/CMakeSystemSpecificInformation.cmake:36 (include) :info:configure CMakeLists.txt:14 (project) :info:configure :info:configure :info:configure -- Configuring incomplete, errors occurred!
Full main.log is attached.
Compilation succeeds when macosx_deployment_target isn't set in macports.conf.
Attachments (2)
Change History (16)
Changed 12 years ago by help@…
comment:1 Changed 11 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to css@… |
---|
comment:2 Changed 11 years ago by help@…
OK, will do next time.
I managed to make it compile without unsetting macosx_deployment_target by adding following line to files/macports.cmake:
CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" CACHE PATH "" FORCE
I've tried several other approaches, but they all failed :( I'm not sure what's going on, it worked fine before...
comment:3 Changed 11 years ago by ville.aakko@…
Hi,
This is still an issue on Mountain Lion - CMAKE_OSX_SYSROOT is set wrongly exactly the same way (pointing to /Developer/SDKs/MacOSX10.8.sdk instead of /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/). I will try the approach above (I have no reason to believe it shouldn't work).
However, I have no idea what is really going wrong, or where to look next.
Also, this was originally Snow Leopard but I upgraded to Mountain Lion recently. After upgrade I upgraded XCode and MacPorts according to https://trac.macports.org/wiki/Migration
$ sudo xcode-select --print-path /Applications/Xcode.app/Contents/Developer
So this is on Mountain Lion 10.8.4, XCode 4.6.3, and trying to install cmake 2.8.11.2.
Hope this helps to find out what is going on (wrongly)!
There are loads of other bugs on other ports (not to mention configure errors that are in no way related to MacPorts I found via google) where the SDKs is not found / looked for in the wrong path. I suspect this might not actually be a bug in MacPorts and/or cmake port, but maybe in OS X / XCode / or triggers only in certain situation (perhaps after some upgrade path(s)?). In bug #40237, reinstalling XCode repaired the issue for another user, but that didn't help in my case (I tried it already). There could still be some leftovers from XCode from OSX 10.6.X somewhere, however...
comment:5 Changed 11 years ago by cssdev
Status: | new → assigned |
---|
I don't have access to Mountain Lion (obsolete Mac!), but CMake 2.8.11.2 builds on Lion 10.7 with XCode 4.6.3. Maybe the issue is specific to the use of macosx_deployment_target?
comment:6 Changed 11 years ago by cssdev
I just successfully built on Lion with macosx_deployment_target
set to 10.7. Do you still get an error with the current version of the port?
comment:7 Changed 11 years ago by help@…
Yeah, seems to be working fine right now, build succeeds with macosx_deployment_target set to either 10.7 or 10.6 and with it unset. Well, at least it is so on one system I have access to ATM.
Changed 11 years ago by ville.aakko@…
Attachment: | main.log.osx10.8-CMAKE_OSX_ROOT-wronlgy-set added |
---|
main.log demonstrating a wrongly set CMAKE_OSX_SYSROOT
comment:8 Changed 11 years ago by ville.aakko@…
Hi,
This is still an issue for me on Muontain Lion. I've just attached a log file from my system. Maybe someone can spot something in there.
Now that I look at the original reporters log file, the output is slightly different, but the workaround still works.
If you have no access to Mountain Lion, maybe you should upgrade. It's only 17,99€ ;-)
EDIT: Oh, sorry I noticed only afterwards that css has an obsolete Mac. Well I was joking on that part anyways.
comment:9 follow-up: 10 Changed 11 years ago by cssdev
Can you check:
- Do you have a
SDKROOT
environment variable? - What is the output from
xcode-select -print-path
?
comment:10 follow-up: 11 Changed 11 years ago by ville.aakko@…
Replying to css@…:
Can you check:
- Do you have a
SDKROOT
environment variable?
No. Should I?
- What is the output from
xcode-select -print-path
?
If you read my previous comment, you'll notice it prints:
$ sudo xcode-select --print-path /Applications/Xcode.app/Contents/Developer
Just a hunch, but I can't seem to be able to run xcode-select as non-root:
xcode-select --print-path xcode-select: Error: Incorrect permissions for data file at '/usr/share/xcode-select/xcode_dir_link'. Run xcode-select -switch <xcode_folder_path> to reset the path to the Xcode folder.
Should I be able to? How are build systems (and, macports) supposed to find this directory without root priviledges? I have set MacPorts to run as a non-root (I have commented out macportsuser in macports.conf). Maybe this is causing problems... only a guess though. Can you (for who this is working correctly) run xcode-select --print-path as non-root? As what user have you set macports to run (as root or non-root)?
comment:11 Changed 11 years ago by larryv (Lawrence Velázquez)
Replying to ville.aakko@…:
Just a hunch, but I can't seem to be able to run xcode-select as non-root:
xcode-select --print-path xcode-select: Error: Incorrect permissions for data file at '/usr/share/xcode-select/xcode_dir_link'. Run xcode-select -switch <xcode_folder_path> to reset the path to the Xcode folder.Should I be able to?
Yes. Your system is broken. Please try running
% sudo xcode-select -switch /Applications/Xcode.app % xcode-select -print-path
comment:12 follow-up: 13 Changed 11 years ago by ville.aakko@…
Hi Larry,
I have done that a bunch of times!
$ sudo xcode-select --switch /Applications/Xcode.app Password: $ xcode-select -print-path xcode-select: Error: Incorrect permissions for data file at '/usr/share/xcode-select/xcode_dir_link'. Run xcode-select -switch <xcode_folder_path> to reset the path to the Xcode folder. $ sudo xcode-select -print-path /Applications/Xcode.app/Contents/Developer $ ls -l /usr/share/xcode-select/ ls: : Permission denied $ sudo ls -l /usr/share/xcode-select/ total 16 lrwx------ 1 root wheel 42 28 Syy 22:35 xcode_dir_link -> /Applications/Xcode.app/Contents/Developer -rw------- 1 root wheel 43 28 Syy 22:35 xcode_dir_path $ ls -ld /usr/share/xcode-select drwx------ 4 root wheel 136 28 Syy 22:35 /usr/share/xcode-select
I have tried manually changing permissions, so that /usr/share/xcode-select is readable and traversable by all, and xcode_dir_path is readable. The xcode_dir_link is a link, and it's permissions can't be changed (AFAICT). But /Applications/Xcode.app/Contents/Developer is readable by regular users.
But, again, this might not be a bug in Macports (but instead in XCode / OS X / certain upgrade paths). Sorry if I have changed this bug report into a support forum / discussion =). But I hope it helps to determine if this is a bug in MacPorts or somewhere else (or an incompatibility with Mountain Lion / newest version of xcode / whatever...)
Also, FWIW, after the first time commenting on this bug, my xcode has been upgraded to 5.0 (since it rolled out into App Store).
comment:13 follow-up: 14 Changed 11 years ago by larryv (Lawrence Velázquez)
This is not a bug in MacPorts. At least, your problem isn’t. Please post about it to macports-users, as it doesn’t seem to be related to this ticket.
comment:14 Changed 11 years ago by cssdev
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Replying to larryv@…:
This is not a bug in MacPorts. At least, your problem isn’t. Please post about it to macports-users, as it doesn’t seem to be related to this ticket.
So it sounds like this is due to some other kind of machine-specific environment error? If so then this ticket can be closed.
In the future, please Cc the port maintainer(s).