MantisBT - CMake
View Issue Details
0009898CMakeCMakepublic2009-11-15 13:102010-12-14 18:49
Christopher Denter 
David Cole 
normalmajoralways
closedfixed 
CMake-2-8 
 
0009898: CMake OSX crash
Hi,

I'm on OSX 10.6.2 and have been trying to compile gdcm 2.0.13.
The configure step always fails with this error message: http://paste.pocoo.org/show/150837/ [^]

Being new to CMake and gdcm I suspect this is a CMake bug (it even says CMake Error), so I report it here.
If any additional information is required in order to triage this bug, please let me know.

    Christopher
No tags attached.
related to 0009959closed David Cole new CMAKE_OSX_DEPLOYMENT_TARGET should set smarter if CMAKE_OSX_SYSROOT is defined 
Issue History
2009-11-15 13:10Christopher DenterNew Issue
2009-11-15 15:15Bill HoffmanStatusnew => assigned
2009-11-15 15:15Bill HoffmanAssigned To => David Cole
2009-11-15 15:17Bill HoffmanNote Added: 0018417
2009-11-15 15:22Christopher DenterNote Added: 0018420
2009-12-14 11:40David ColeRelationship addedrelated to 0009959
2009-12-15 11:13David ColeNote Added: 0018900
2009-12-15 11:13David ColeStatusassigned => resolved
2009-12-15 11:13David ColeResolutionopen => fixed
2010-12-14 18:49David ColeNote Added: 0024058
2010-12-14 18:49David ColeStatusresolved => closed

Notes
(0018417)
Bill Hoffman   
2009-11-15 15:17   
It does look like a CMake error ...


My guess is something is going wrong here:

# Set CMAKE_OSX_DEPLOYMENT_TARGET_DEFAULT to the current version of OS X
EXECUTE_PROCESS(COMMAND sw_vers -productVersion OUTPUT_VARIABLE CURRENT_OSX_VERSION)
STRING(REGEX REPLACE "^.*(10)\\.([0-9]+)\\.*([0-9]+)*.*$" "\\1.\\2"
  CMAKE_OSX_DEPLOYMENT_TARGET_DEFAULT ${CURRENT_OSX_VERSION})


Can you run with cmake --trace and attach the output to this bug?

Also what do you get when you run sw_ver -productVersion on your machine?
(0018420)
Christopher Denter   
2009-11-15 15:22   
Sure.

Here is the trace output: http://paste.pocoo.org/show/150869/ [^]

The product version is, as expected, 10.6.2 (Snow Leopard on the most recent patchlevel).

If you need anything else, let me know.
(0018900)
David Cole   
2009-12-15 11:13   
Fixed in CVS HEAD of CMake.

/cvsroot/CMake/CMake/Modules/Platform/Darwin.cmake,v <-- Modules/Platform/Darwin.cmake
new revision: 1.63; previous revision: 1.62

I do not know why the _sdk_path variable appears to have been empty on your build... but Darwin.cmake should now handle that case... If it is really empty, then you should get an error when configuring. There has to be an SDK available to compile against. And if CMAKE_OSX_SYSROOT is set, then the CMAKE_OSX_DEPLOYMENT_TARGET value has to be one that makes sense (less than or equal to the SDK being used...)

Please re-open and attach further details if this commit does not address your problem fully.
(0024058)
David Cole   
2010-12-14 18:49   
Closing bugs that have been resolved for more than 3 months without any further updates.