[CMake] OSX deployment target confusion for 2.8.10

Bradley Giesbrecht pixilla at macports.org
Sun Nov 4 19:59:17 EST 2012


Seeing the same thing trying to update the MacPorts cmake port to 2.8.10.

The problem is in commit e7e613e. Patching Darwin.cmake back to revision 43b74793 solves the problem.

The breakage is here:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7e613efbf1da45a2a9e51d11a4022589d79c642


Regards,
Bradley Giesbrecht (pixilla)


On Nov 3, 2012, at 7:06 PM, Matthew Brett wrote:

> Hi,
> 
> Please forgive my ignorance of cmake, but I am running into trouble on
> OSX with 2.8.10 and cmake-2.8.10.20121101-gafe0-Darwin64-universal
> (but not 2.8.9).
> 
> In fact I am trying to compile PySide-1.1.2 :
> 
> http://pypi.python.org/pypi/PySide
> http://pypi.python.org/packages/source/P/PySide/PySide-1.1.2.tar.gz#md5=885f8cf2e4c0c46b76568f0c1eae5c43
> 
> (if you want to try this you need something like the appended patch to
> get started.
> To compile I am doing:
> tar xxvf PySide-1.1.2.tar.gz
> patch -p0 < the-attached-patch
> cd PySide-1.1.2.tar.gz
> python setup.py install
> - with Python.org Python 2.7
> )
> 
> For cmake 2.8.9 and with no OSX related env variables, the compilation
> proceeds (with unrelated errors later on).
> 
> For cmake 2.8.10 I get this:
> 
> Creating module build folder
> /Users/mb312/tmp/pyside2/PySide-1.1.2/pyside_build/py2.7-qt4.8.3-64bit-release/shiboken...
> Configuring module shiboken
> (/Users/mb312/tmp/pyside2/PySide-1.1.2/sources/shiboken)...
> cmake -G Unix Makefiles -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake
> -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True
> -DCMAKE_BUILD_TYPE=Release
> -DCMAKE_INSTALL_PREFIX=/Users/mb312/tmp/pyside2/PySide-1.1.2/pyside_install/py2.7-qt4.8.3-64bit-release
> /Users/mb312/tmp/pyside2/PySide-1.1.2/sources/shiboken
> -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
> -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
> -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
> -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes
> -- The C compiler identification is GNU 4.2.1
> -- The CXX compiler identification is GNU 4.2.1
> CMake Error at /Applications/CMake
> 2.8-10.app/Contents/share/cmake-2.8/Modules/Platform/Darwin.cmake:189
> (message):
>  CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' 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):
>  /Applications/CMake
> 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake:36
> (include)
>  CMakeLists.txt:2 (project)
> 
> 
> -- Configuring incomplete, errors occurred!
> error: Error configuring shiboken
> 
> I should clarify that:
> 
> $ echo $CMAKE_OSX_DEPLOYMENT_TARGET
> 
> $ echo $CMAKE_OSX_SYSROOT
> 
> $ echo $MACOSX_DEPLOYMENT_TARGET
> 
> If I do:
> 
> export CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk/
> 
> and then run from a fresh install, I get the same error including:
> 
> CMake Error at /Applications/CMake
> 2.8-10.app/Contents/share/cmake-2.8/Modules/Platform/Darwin.cmake:189
> (message):
>  CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' 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
> 
> If I:
> 
> $ unset CMAKE_OSX_SYSROOT
> $ export MACOSX_DEPLOYMENT_TARGET=10.5
> 
> and restart _from a freshly unpacked directory as above_ I get the
> following error:
> 
> Creating module build folder
> /Users/mb312/tmp/pyside2/PySide-1.1.2/pyside_build/py2.7-qt4.8.3-64bit-release/shiboken...
> Configuring module shiboken
> (/Users/mb312/tmp/pyside2/PySide-1.1.2/sources/shiboken)...
> cmake -G Unix Makefiles -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake
> -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True
> -DCMAKE_BUILD_TYPE=Release
> -DCMAKE_INSTALL_PREFIX=/Users/mb312/tmp/pyside2/PySide-1.1.2/pyside_install/py2.7-qt4.8.3-64bit-release
> /Users/mb312/tmp/pyside2/PySide-1.1.2/sources/shiboken
> -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
> -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
> -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
> -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes
> error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.5" but "10.6"
> during configure
> 
> If I:
> 
> $ unset MACOSX_DEPLOYMENT_TARGET
> $ export CMAKE_OSX_DEPLOYMENT_TARGET=10.5
> 
> I get the same error message as originally, including:
> 
> -- The CXX compiler identification is GNU 4.2.1
> CMake Error at /Applications/CMake
> 2.8-10.app/Contents/share/cmake-2.8/Modules/Platform/Darwin.cmake:189
> (message):
>  CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' 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.
> 
> If I grep for 'DEPLOYMENT' in the PySide sources, I find nothing - so
> I do not believe these variables are being set by PySide.
> 
> So, in my situation at least, I believe cmake 2.8.10 (not 2.8.9) is
> ignoring CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT, and
> setting CMAKE_OSX_DEPLOYMENT_TARGET unconditionally without setting
> CMAKE_OSX_SYSROOT.
> 
> Is that possible?  Is there something else I can do to debug?
> 
> Best,
> 
> Matthew
> 
> 
> 
> diff -u PySide-1.1.2-orig/setup.py PySide-1.1.2/setup.py
> --- PySide-1.1.2-orig/setup.py	2012-09-07 06:51:47.000000000 -0700
> +++ PySide-1.1.2/setup.py	2012-11-03 18:45:18.000000000 -0700
> @@ -245,11 +245,12 @@
>                 py_abiflags = getattr(sys, 'abiflags', None)
>                 py_library = os.path.join(py_libdir, "libpython%s%s.so" % \
>                     (py_version, py_abiflags))
> -            else:
> +            else: # Python 2
>                 py_library = os.path.join(py_libdir, "libpython%s%s.so" % \
>                     (py_version, dbgPostfix))
>                 if not os.path.exists(py_library):
>                     py_library = py_library + ".1"
> +        py_library =
> '/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib'
>         if not os.path.exists(py_library):
>             raise DistutilsSetupError(
>                 "Failed to locate the Python library %s" % py_library)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121104/62944875/attachment.bin>


More information about the CMake mailing list