MantisBT - CMake
View Issue Details
0013893CMakeCMakepublic2013-02-05 05:592016-06-10 14:31
gnzlbg 
Robert Maynard 
urgentmajoralways
closedmoved 
AppleMac OS X10.8.2
CMake 2.8.10.1 
 
0013893: CMAKE_OSX_SYSROOT overwritten to "/"
CMAKE_OSX_SYSROOT is overwritten to "/" at some point.
When trying to configure Paraview 3.98.0 in Mac OS X 10.8.2 cmake fails. The following minimal example shows the issue.

Step 1) Execute:

cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

cmake complains instantaneously that the deployment target 10.7 and the SDK Version 10.8 do not match. Everything fine.

Step 2) Now execute:

cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

Configure starts and at some point:

- Checking support for C++ explicit template instantiation
CMake Error at /usr/local/Cellar/cmake/2.8.10.1/share/cmake/Modules/Platform/Darwin.cmake:190 (message):
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' 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/2.8.10.1/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
  CMakeLists.txt:2 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!

Somehow CMAKE_OSX_SYSROOT has been overwritten.
No tags attached.
Issue History
2013-02-05 05:59gnzlbgNew Issue
2013-02-05 09:10Brad KingNote Added: 0032197
2013-02-05 09:40gnzlbgNote Added: 0032198
2013-02-05 09:40gnzlbgNote Edited: 0032198bug_revision_view_page.php?bugnote_id=32198#r1024
2013-02-05 09:42gnzlbgNote Edited: 0032198bug_revision_view_page.php?bugnote_id=32198#r1025
2013-02-05 09:59Brad KingNote Added: 0032199
2013-02-05 10:50gnzlbgNote Added: 0032200
2013-02-08 12:32Brad KingAssigned To => Robert Maynard
2013-02-08 12:32Brad KingStatusnew => assigned
2013-02-08 14:30Robert MaynardNote Added: 0032233
2013-02-08 14:48Brad KingNote Added: 0032234
2013-02-08 15:05gnzlbgNote Added: 0032236
2013-02-11 15:25Brad KingNote Added: 0032247
2013-02-12 03:55gnzlbgNote Added: 0032248
2013-02-12 14:40Brad KingNote Added: 0032250
2013-07-03 18:24miller86Note Added: 0033480
2016-06-10 14:28Kitware RobotNote Added: 0042217
2016-06-10 14:28Kitware RobotStatusassigned => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0032197)
Brad King   
2013-02-05 09:10   
Can you still reproduce this with a recent nightly build?

 http://www.cmake.org/files/dev/?C=M;O=D [^]
(0032198)
gnzlbg   
2013-02-05 09:40   
(edited on: 2013-02-05 09:42)
@Brad_King I just tried with "cmake version 2.8.10.20130205" from the git repository. Another thing I notice is that not only does the path CMAKE_OSX_SYSROOT gets reseted to "/" but also the deployment target CMAKE_OSX_DEPLOYMENT_TARGET is reseted to 10.8 (current) even if 10.7 is set. I can't add another step to the reproduction of the problem to illustrate this, so I'll add it here:

Step 3) Execute:

cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk

Configure starts and at some point:

CMake Error at /usr/local/Cellar/cmake/HEAD/share/cmake/Modules/Platform/Darwin.cmake:190 (message):
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' 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/HEAD/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
  CMakeLists.txt:2 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!

That is, the deployment target which was set to 10.7 has been overwritten to 10.8, and the path has been overwritten to "/" somehow.

(0032199)
Brad King   
2013-02-05 09:59   
I cannot reproduce this.

In your step 1 you use SDK 10.8 and deployment target 10.7 so it should not complain. If I switch to SDK 10.7 and deployment target 10.8 then it complains. However, I then proceed to step 2 in the same build tree by setting both to 10.8 and it works.

Do you have SDKROOT set in your environment (I do not)?
(0032200)
gnzlbg   
2013-02-05 10:50   
Step 1) Should be SDK 10.7 and deployment target 10.8 , sorry I mixed it up in the report.

I do not have the environment variable SDKROOT set.
(0032233)
Robert Maynard   
2013-02-08 14:30   
I am also unable to reproduce this problem using system installed CMake 2.8.10.1 or homebrew installed CMake 2.8.10.2.

In all cases once I set the target to less than or equal to the SDK version number it properly configures and the CMakeCache of paraview is correct.
(0032234)
Brad King   
2013-02-08 14:48   
@gnzlbg You report using OS X 10.8.2. What version of Xcode is installed? Are the command-line tools installed in /usr? Are you using a compiler installed by other means?
(0032236)
gnzlbg   
2013-02-08 15:05   
Xcode 4.6. The command-line tools are installed in their default location (I installed them from Xcode). I still haven't been able to solve it. It still fails when building paraview.
(0032247)
Brad King   
2013-02-11 15:25   
Re 0013893:0032236: Does this fail with any other projects, or only when building ParaView?
(0032248)
gnzlbg   
2013-02-12 03:55   
I just tried to build trilinos with the following script and it also failed with the same error:

cmake \
-D CMAKE_INSTALL_PREFIX:PATH=~/pool/trilinos \
-D CMAKE_BUILD_TYPE:STRING=DEBUG \
-D CMAKE_CXX_COMPILER:FILEPATH=/usr/local/bin/clang++ \
-D CMAKE_C_COMPILER:FILEPATH=/usr/local/bin/clang \
-D CMAKE_Fortran_COMPILER:FILEPATH=/usr/local/bin/gfortran \
-D CMAKE_OSX_DEPLOYMENT_TARGET=10.8 \
-D CMAKE_OSX_ARCHITECTURES:STRING="x86_64" \
-D CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk \
-D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING="" \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-D Trilinos_ENABLE_ALL_PACKAGES:BOOL=FALSE \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_Triutils:BOOL=ON \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D Trilinos_ENABLE_EXAMPLES:BOOL=ON \
$EXTRA_ARGS \
../trilinos-11.0.3-Source

Error:

-- Looking for C++ include inttypes.h - found
-- Found Perl: /usr/bin/perl (found version "5.12.4")
CMake Error at /usr/local/Cellar/cmake/HEAD/share/cmake/Modules/Platform/Darwin.cmake:190 (message):
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' 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/HEAD/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
  CMakeLists.txt:2 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
(0032250)
Brad King   
2013-02-12 14:40   
Re 0013893:0032248: We still cannot reproduce it on any project.

Can you please test it on a tiny project like the Tests/COnly project in the CMake source tree?
(0033480)
miller86   
2013-07-03 18:24   
I can easily re-produce this bug or at least something strongly realted to it with Tests/COnly and CMake 2.8.10.2

./bootstrap
cd Tests/COnly
sh
export MACOSX_DEPLOYMENT_TARGET=10.8
../../bin/cmake .
CMake Error at /Users/miller86/tmp/cmake-2.8.10.2/Modules/Platform/Darwin.cmake:190 (message):
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' 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):
  /Users/miller86/tmp/cmake-2.8.10.2/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
  CMakeLists.txt:3 (project)




-- Configuring incomplete, errors occurred!

I am using OS X 10.8.4 and think there is no other 'SDK' on it.

I have Xcode 4.5.2 as well.

If I simply comment out the cross-version compatibility sanity check that CMake is barfing on here, it works fine installing all of VTK and VisIt.
(0042217)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.