Closed traversaro closed 9 years ago
fyi @kt10aan @francesco-romano
Reminder: revert https://github.com/robotology/codyco-superbuild/commit/66ffa5616ab423b4f5f8d2a20e312ba95072568e when this bug is fixed .
Able to replicate (on local brew installation).
Well sort of
CMake Warning at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/Platform/Darwin-Initialize.cmake:97 (message):
CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but the matching SDK does not exist
at:
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"
Instead using SDK:
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk".
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:18 (include)
CMakeLists.txt:3 (project)
CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/Platform/Darwin.cmake:76 (message):
CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT:
""
is not set to a MacOSX SDK with a recognized version. Either set
CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
empty.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
CMakeLists.txt:3 (project)
CMake Error: Internal CMake error, TryCompile configure of cmake failed
A second cmake command solved the problem ( @drdanz How is this possible? I have a similar issue on gazebo-yarp-plugins also on linux)
After a bit of debugging with @traversaro it seems that cmake fails to properly set the CMAKE_OSX_SYSROOT
if the generator is not Xcode
.
Probably this is a bug in cmake. But this should be investigated.
One possible solution can be to generate the bundles only if the generator is Xcode
. But this means that the brew formula should be changed to generate and Xcode project if we want to generate the bundles.
Furthermore, I saw this note in the cmake documentation regarding both CMAKE_OSX_SYSROOT
and CMAKE_OSX_DEPLOYMENT_TARGET
:
The value of this variable should be set prior to the first project() or enable_language() command invocation because it may influence configuration of the toolchain and flags. It is intended to be set locally by the user creating a build tree.
But we set it after project(YARP)
, so this can be the issue.
@drdanz @kt10aan
Last update on the test:
If the deployment target is set before the project, than everything works as expected (a part the first warning). I want to stress that this issue happens only when using Unix Makefiles
generator and not Xcode
.
I'll open an issue in cmake. Nope.. the github page has no issue page.. We will open an issue in Cmake
The CMake issue tracker is available at http://public.kitware.com/Bug .
We could add an option to the homebrew formula for the generators.
By the way, I am testing the El Capitan right now with homebrew and the yarp formula to see if everything works ok, with the new system and the new Xcode. From past experience, the first days of a new OS X version are a bit rocky, regarding homebrew
Before firing the bug in the Cmake issue tracker, I'd like to understand a bit better the issue. Can you please help me in this?
From what I'm understanding in DarwinInitialize in case we use Unix Makefiles we do not enter in that if (while we enter it if we use the Xcode generator or if we set the deployment target BEFORE calling project) Now the question is: do we really need the sysroot variable? For sure we need the deployment target. Is this enough to fire a bug?
@drdanz @traversaro
The original commit [1] was made for
Initialize variables CMAKE_OSX_SYSROOT, CMAKE_OSX_DEPLOYMENT_TARGET, and
CMAKE_OSX_ARCHITECTURES prior to enabling any languages. This will
allow compiler identification to consider these values.
If this variable are not initialized then there is a problem?
[1] https://github.com/Kitware/CMake/commit/0200d0a9c46da512a64aed381fd2e8781e04e32e
That is what I'm trying to understand. Do you think this is enough to open an issue in CMake?
I don't know, perhaps people in the CMake bugtracker can provide more insight.
ok. I'll proceed to open an issue there.
http://public.kitware.com/pipermail/cmake-developers/2015-October/026618.html
What is interesting though, is that brew install yarp --whatever-option
(so it is compiles from source) does not fail. Only when the --HEAD
option is used.
Yes, because only in head there is the CMAKE_DEPLOYMENT_TARGET option
Ciao Guys, I had the same problem when generating for Xcode.... running cam twice solves the problem (sort of), as as soon I try to configure this is the message:
CMake Warning at /usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/Platform/Darwin.cmake:179 (message): Ignoring CMAKE_OSX_SYSROOT value:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
because the directory does not exist. Call Stack (most recent call first): /usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include) CMakeLists.txt:17 (project)
apparently the problem is not solved, just ignored at the first pass, but the second configure gives again the error.
I can't believe it, but I solved it!!!! just put export MACOSX_DEPLOYMENT_TARGET=10.11 in the .bash_profile
Should have been fixed (for brew - travis) with https://github.com/robotology/yarp/pull/606
Strictly speaking brew install yarp --HEAD
is still failing for Travis workers ( https://travis-ci.org/robotology/codyco-superbuild/jobs/85616012 ) but this is due to https://github.com/robotology/yarp/issues/598 , so I guess it is ok to close this issue.
The error is in iCub not in yarp.
Right!
See https://travis-ci.org/robotology/codyco-superbuild/jobs/82131783