Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-08 Thread Brad King
On 11/07/2012 04:13 PM, Matthew Brett wrote:
 We can warn about it though.  Try adding something like this to the end
 of CMake's Modules/Platform/Darwin.cmake:

 if(IS_DIRECTORY ${CMAKE_OSX_SYSROOT}/Library/Frameworks AND
IS_SYMLINK ${CMAKE_OSX_SYSROOT}/Library/Frameworks/Frameworks)
   message(WARNING The SDK Library/Frameworks path
  ${CMAKE_OSX_SYSROOT}/Library/Frameworks
 has not been configured correctly on this system.  See
  http://bugs.python.org/issue14018
 and consider fixing your symlinks locally.)
 endif()

 Does it print the warning on your system?
 
 Great - yes - lots of informative warnings in the initial cmake phase.

Thanks for testing.  I've committed a more elaborate version of it:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=720d790f

Please test that change too for final verification.

Thanks,
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-08 Thread Matthew Brett
Hi,

On Thu, Nov 8, 2012 at 6:26 AM, Brad King brad.k...@kitware.com wrote:
 On 11/07/2012 04:13 PM, Matthew Brett wrote:
 We can warn about it though.  Try adding something like this to the end
 of CMake's Modules/Platform/Darwin.cmake:

 if(IS_DIRECTORY ${CMAKE_OSX_SYSROOT}/Library/Frameworks AND
IS_SYMLINK ${CMAKE_OSX_SYSROOT}/Library/Frameworks/Frameworks)
   message(WARNING The SDK Library/Frameworks path
  ${CMAKE_OSX_SYSROOT}/Library/Frameworks
 has not been configured correctly on this system.  See
  http://bugs.python.org/issue14018
 and consider fixing your symlinks locally.)
 endif()

 Does it print the warning on your system?

 Great - yes - lots of informative warnings in the initial cmake phase.

 Thanks for testing.  I've committed a more elaborate version of it:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=720d790f

 Please test that change too for final verification.

Thanks ; the generated warning from cmake as of that commit is :

CMake Warning at
/Users/mb312/dev_trees/cmake/Modules/Platform/Darwin.cmake:272
(message):
  The SDK Library/Frameworks path

   /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks

  is not set up correctly on this system.  This is known to occur when
  installing Xcode 3.2.6:

   http://bugs.python.org/issue14018

  The problem may cause build errors that report missing system frameworks.
  Fix your SDK symlinks to resolve this issue and avoid this warning.
Call Stack (most recent call first):
  /Users/mb312/dev_trees/cmake/Modules/CMakeSystemSpecificInformation.cmake:36
(include)
  CMakeLists.txt:2 (project)

Thanks - that's very clear about the problem.

Best,

Matthew
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-07 Thread Brad King
On 11/06/2012 03:29 PM, Matthew Brett wrote:
 $ ls /Library/Frameworks | grep Qt
 Qt3Support.framework
 QtCore.framework

Okay.

 $ ls -al /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/
 total 8
 drwxr-xr-x  4 root  wheel  136 Jul 13 21:21 .
 drwxr-xr-t  3 root  wheel  102 Feb 14  2011 ..
 lrwxr-xr-x  1 root  wheel   19 Jul 13 21:21 Frameworks - /Library/Frameworks
 drwxr-xr-x  3 root  wheel  102 Jan  4  2011 PluginManager.framework

This looks incorrect.  Why does the Frameworks/ directory contain
a Frameworks symlink?  That means one would need a search path like

 /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/Frameworks

to find them.  Did something modify this SDK since it was installed?

 Output of adding -v:

I think we need -Wl,-v to get the linker to tell us what framework
search path it is using.  Try with and without the -isysroot option.

Thanks,
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-07 Thread Matthew Brett
Hi,

On Wed, Nov 7, 2012 at 5:33 AM, Brad King brad.k...@kitware.com wrote:
 On 11/06/2012 03:29 PM, Matthew Brett wrote:
 $ ls /Library/Frameworks | grep Qt
 Qt3Support.framework
 QtCore.framework

 Okay.

 $ ls -al /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/
 total 8
 drwxr-xr-x  4 root  wheel  136 Jul 13 21:21 .
 drwxr-xr-t  3 root  wheel  102 Feb 14  2011 ..
 lrwxr-xr-x  1 root  wheel   19 Jul 13 21:21 Frameworks - /Library/Frameworks
 drwxr-xr-x  3 root  wheel  102 Jan  4  2011 PluginManager.framework

 This looks incorrect.  Why does the Frameworks/ directory contain
 a Frameworks symlink?  That means one would need a search path like

  /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/Frameworks

 to find them.  Did something modify this SDK since it was installed?

If so, I don't know what modified the SDK.  The link is later than the
rest of the installation, but I suppose that may have been the
postinstall script.  Now I search, I see this:

http://bugs.python.org/issue14018

I do have (as for the issue) xcode 3.2.6

I don't have the same strange link on another machine with 10.6 and
xcode 3.2.6, although the installations seem otherwise identical:

$ xcodebuild -version
Xcode 3.2.6
Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0
BuildVersion: 10M2518

 Output of adding -v:

 I think we need -Wl,-v to get the linker to tell us what framework
 search path it is using.  Try with and without the -isysroot option.

With -isysroot:

collect2 version 4.2.1 (Apple Inc. build 5666) (dot 3) (i686 Darwin)
/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld -dynamic -arch x86_64
-macosx_version_min 10.6 -syslibroot /Developer/SDKs/MacOSX10.6.sdk
-weak_reference_mismatches non-weak -o shiboken -lcrt1.10.6.o
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1
-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib -L.
-L/Users/mb312/usr/local/lib -L.
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1
-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../..
-search_paths_first -headerpad_max_install_names
CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o ../ApiExtractor/libapiextractor.a
-framework QtCore -framework QtXml -framework QtXmlPatterns -framework
QtXml -v -lstdc++ -lSystem -lgcc -lSystem
@(#)PROGRAM:ld  PROJECT:ld64-97.17
Library search paths:

/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64

/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1
/Developer/SDKs/MacOSX10.6.sdk/usr/lib
.
/Users/mb312/usr/local/lib
.
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1
/Developer/SDKs/MacOSX10.6.sdk/usr/lib
/Developer/SDKs/MacOSX10.6.sdk/usr/lib
/Developer/SDKs/MacOSX10.6.sdk/usr/local/lib
Framework search paths:
/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/
ld: framework not found QtCore
collect2: ld returned 1 exit status

Without:

collect2 version 4.2.1 (Apple Inc. build 5666) (dot 3) (i686 Darwin)
/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld -dynamic -arch x86_64
-macosx_version_min 10.6 -weak_reference_mismatches non-weak -o
shiboken -lcrt1.10.6.o -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/i686-apple-darwin10/4.2.1 -L. -L/Users/mb312/usr/local/lib
-L. -L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. -search_paths_first
-headerpad_max_install_names CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o ../ApiExtractor/libapiextractor.a
-framework QtCore -framework QtXml -framework QtXmlPatterns -framework
QtXml -v -lstdc++ -lSystem -lgcc -lSystem
@(#)PROGRAM:ld  PROJECT:ld64-97.17
Library 

Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-07 Thread Brad King
On 11/07/2012 03:14 PM, Matthew Brett wrote:
 http://bugs.python.org/issue14018

Great, that is exactly this issue.

 - I guess that explains it...  Hum, how frustrating to have to worry
 about the bad symlink.

Yes.  You'll have to fix them locally.  Thanks for reporting back.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-07 Thread Matthew Brett
Hi,

On Wed, Nov 7, 2012 at 12:21 PM, Brad King brad.k...@kitware.com wrote:
 On 11/07/2012 03:14 PM, Matthew Brett wrote:
 http://bugs.python.org/issue14018

 Great, that is exactly this issue.

 - I guess that explains it...  Hum, how frustrating to have to worry
 about the bad symlink.

 Yes.  You'll have to fix them locally.  Thanks for reporting back.

I was probably thinking of the problem in the same way as you are,
which is: how can I make sure that the build works or fails gracefully
for someone else if they have the same problem?  There's some logic in
the python patches for that:

http://hg.python.org/cpython/rev/f96579debefa/

Is it reasonable to check for this problem in cmake?  Or do you think
it is too rare to justify the workaround?  What proportion of cmake
runs will be on an affected system I wonder?

Best,

Matthew
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-07 Thread Brad King
On 11/07/2012 03:41 PM, Matthew Brett wrote:
 I was probably thinking of the problem in the same way as you are,
 which is: how can I make sure that the build works or fails gracefully
 for someone else if they have the same problem?

I'm not interested in spending much time trying to make the build actually
work on such a broken setup.  It only worked in CMake  2.8.10 by an
accident, and wouldn't with universal binary builds.

We can warn about it though.  Try adding something like this to the end
of CMake's Modules/Platform/Darwin.cmake:

if(IS_DIRECTORY ${CMAKE_OSX_SYSROOT}/Library/Frameworks AND
   IS_SYMLINK ${CMAKE_OSX_SYSROOT}/Library/Frameworks/Frameworks)
  message(WARNING The SDK Library/Frameworks path
 ${CMAKE_OSX_SYSROOT}/Library/Frameworks
has not been configured correctly on this system.  See
 http://bugs.python.org/issue14018
and consider fixing your symlinks locally.)
endif()

Does it print the warning on your system?

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-07 Thread Matthew Brett
Hi,

On Wed, Nov 7, 2012 at 1:00 PM, Brad King brad.k...@kitware.com wrote:
 On 11/07/2012 03:41 PM, Matthew Brett wrote:
 I was probably thinking of the problem in the same way as you are,
 which is: how can I make sure that the build works or fails gracefully
 for someone else if they have the same problem?

 I'm not interested in spending much time trying to make the build actually
 work on such a broken setup.  It only worked in CMake  2.8.10 by an
 accident, and wouldn't with universal binary builds.

 We can warn about it though.  Try adding something like this to the end
 of CMake's Modules/Platform/Darwin.cmake:

 if(IS_DIRECTORY ${CMAKE_OSX_SYSROOT}/Library/Frameworks AND
IS_SYMLINK ${CMAKE_OSX_SYSROOT}/Library/Frameworks/Frameworks)
   message(WARNING The SDK Library/Frameworks path
  ${CMAKE_OSX_SYSROOT}/Library/Frameworks
 has not been configured correctly on this system.  See
  http://bugs.python.org/issue14018
 and consider fixing your symlinks locally.)
 endif()

 Does it print the warning on your system?

Great - yes - lots of informative warnings in the initial cmake phase.

Thanks, that's very helpful,

Matthew
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-06 Thread Brad King
On 11/05/2012 08:31 PM, Matthew Brett wrote:
 Linking CXX executable shiboken
 ld: framework not found QtCore
 collect2: ld returned 1 exit status
 make[2]: *** [generator/shiboken] Error 1
 make[1]: *** [generator/CMakeFiles/shiboken.dir/all] Error 2
 make: *** [all] Error 2
 
 I get no such error running the same commands with 2.8.9.   The
 cmake-generated Makefile between 2.8.9 and 2.8.10 differs only in the
 full path to the cmake binary.

The Makefile is not the only file containing build rules.  Try
comparing the entire generator/CMakeFiles/shiboken.dir directory
between the two versions.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-06 Thread Matthew Brett
Hi,

On Tue, Nov 6, 2012 at 4:42 AM, Brad King brad.k...@kitware.com wrote:
 On 11/05/2012 08:31 PM, Matthew Brett wrote:
 Linking CXX executable shiboken
 ld: framework not found QtCore
 collect2: ld returned 1 exit status
 make[2]: *** [generator/shiboken] Error 1
 make[1]: *** [generator/CMakeFiles/shiboken.dir/all] Error 2
 make: *** [all] Error 2

 I get no such error running the same commands with 2.8.9.   The
 cmake-generated Makefile between 2.8.9 and 2.8.10 differs only in the
 full path to the cmake binary.

 The Makefile is not the only file containing build rules.  Try
 comparing the entire generator/CMakeFiles/shiboken.dir directory
 between the two versions.

Thank you for the suggestion. I was indirectly trying to address that
by showing that 2.8.10 gives an error when doing a `make` on top of a
2.8-9 config.  Now I look, I also find that 2.8-9 can successfully
build (``make``) on top of the 2.8-10 config.  I've attached the diff
of the configs.

Best,

Matthew


9-10-config.diff.gz
Description: GNU Zip compressed data
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-06 Thread Brad King
On 11/06/2012 01:37 PM, Matthew Brett wrote:
 I've attached the diff of the configs.

The diff for generator/CMakeFiles/shiboken.dir/link.txt shows
identical link lines except that 2.8.10 adds

 -isysroot /Developer/SDKs/MacOSX10.6.sdk

to honor the CMAKE_OSX_SYSROOT.  The change was here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0a0877a

among a whole series of changes needed to make things behave
well on OS X 10.8 with Xcode 4.5.

Where is your Qt framework installed?  Why doesn't the SDK
see it?  On a Mac OS X 10.7 machine I see this:

 $ readlink /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks
 /Library/Frameworks

so the SDK should have all the system frameworks.

Try setting your shell current working directory to the
generator directory in the build tree, and then run the
command from link.txt by hand.  Add -v to get verbose
output about the linker invocation generated by the compiler
front-end.

Thanks,
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-06 Thread Matthew Brett
Hi,

On Tue, Nov 6, 2012 at 11:10 AM, Brad King brad.k...@kitware.com wrote:
 On 11/06/2012 01:37 PM, Matthew Brett wrote:
 I've attached the diff of the configs.

 The diff for generator/CMakeFiles/shiboken.dir/link.txt shows
 identical link lines except that 2.8.10 adds

  -isysroot /Developer/SDKs/MacOSX10.6.sdk

 to honor the CMAKE_OSX_SYSROOT.  The change was here:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0a0877a

 among a whole series of changes needed to make things behave
 well on OS X 10.8 with Xcode 4.5.

 Where is your Qt framework installed?  Why doesn't the SDK
 see it?  On a Mac OS X 10.7 machine I see this:

  $ readlink /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks
  /Library/Frameworks

Qt framework was from the qt-mac-opensource-4.8.3.dmg installer, resulting in:

$ ls /Library/Frameworks | grep Qt
Qt3Support.framework
QtCore.framework
QtDBus.framework
QtDeclarative.framework
QtDesigner.framework
QtDesignerComponents.framework
QtGui.framework
QtHelp.framework
QtMultimedia.framework
QtNetwork.framework
QtOpenGL.framework
QtScript.framework
QtScriptTools.framework
QtSql.framework
QtSvg.framework
QtTest.framework
QtWebKit.framework
QtXml.framework
QtXmlPatterns.framework

 so the SDK should have all the system frameworks.

$ ls -al /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/
total 8
drwxr-xr-x  4 root  wheel  136 Jul 13 21:21 .
drwxr-xr-t  3 root  wheel  102 Feb 14  2011 ..
lrwxr-xr-x  1 root  wheel   19 Jul 13 21:21 Frameworks - /Library/Frameworks
drwxr-xr-x  3 root  wheel  102 Jan  4  2011 PluginManager.framework

 Try setting your shell current working directory to the
 generator directory in the build tree, and then run the
 command from link.txt by hand.  Add -v to get verbose
 output about the linker invocation generated by the compiler
 front-end.

Ah - yes:

$ sh CMakeFiles/shiboken.dir/link.txt
ld: framework not found QtCore
collect2: ld returned 1 exit status

$ cat CMakeFiles/shiboken.dir/link.txt
/usr/bin/c++-Wall -fvisibility=hidden -Wno-strict-aliasing -O3
-DNDEBUG -isysroot /Developer/SDKs/MacOSX10.6.sdk
-mmacosx-version-min=10.6 -Wl,-search_paths_first
-Wl,-headerpad_max_install_names
CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o  -o shiboken
../ApiExtractor/libapiextractor.a -framework QtCore -framework QtXml
-framework QtXmlPatterns -framework QtXml

Removing the added -isysroot allows the command to run:

$/usr/bin/c++-Wall -fvisibility=hidden -Wno-strict-aliasing -O3
-DNDEBUG -mmacosx-version-min=10.6 -Wl,-search_paths_first
-Wl,-headerpad_max_install_names
CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o  -o shiboken
../ApiExtractor/libapiextractor.a -framework QtCore -framework QtXml
-framework QtXmlPatterns -framework QtXml
ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(abstractmetalang.cpp.o) and (hidden)
in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(typesystem.cpp.o) and (hidden) in
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::operator=(char const*)has different visibility
(default) in ../ApiExtractor/libapiextractor.a(typesystem.cpp.o) and
(hidden) in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(abstractmetabuilder.cpp.o) and
(hidden) in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o

Output of adding -v:

$ /usr/bin/c++-Wall -fvisibility=hidden -Wno-strict-aliasing -O3
-DNDEBUG -isysroot /Developer/SDKs/MacOSX10.6.sdk
-mmacosx-version-min=10.6 -Wl,-search_paths_first
-Wl,-headerpad_max_install_names
CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o  -o shiboken
../ApiExtractor/libapiextractor.a -framework QtCore -framework QtXml
-framework QtXmlPatterns -framework QtXml -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure
--disable-checking --enable-werror --prefix=/usr 

Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-05 Thread Brad King
On 11/04/2012 07:59 PM, Bradley Giesbrecht wrote:
 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

Thanks for tracking it down that far.  However, I think it is
43b74793 that actually introduced the problem.  The later
commit only changed the appearance of the error message.

 On Nov 3, 2012, at 7:06 PM, Matthew Brett wrote:
 export CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk/

CMake does not read this variable from the environment.  Try

 export SDKROOT=/Developer/SDKs/MacOSX10.6.sdk

instead to work around this.

 If I grep for 'DEPLOYMENT' in the PySide sources, I find nothing - so
 I do not believe these variables are being set by PySide.

I suspect that python is setting MACOSX_DEPLOYMENT_TARGET.
I can reproduce this in a small test case by building with
MACOSX_DEPLOYMENT_TARGET=10.6 set in my environment on a
10.7 host.

This should fix it:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15f5764e

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-05 Thread Matthew Brett
Hi,

On Mon, Nov 5, 2012 at 7:57 AM, Brad King brad.k...@kitware.com wrote:
 On 11/04/2012 07:59 PM, Bradley Giesbrecht wrote:
 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

 Thanks for tracking it down that far.  However, I think it is
 43b74793 that actually introduced the problem.  The later
 commit only changed the appearance of the error message.

 On Nov 3, 2012, at 7:06 PM, Matthew Brett wrote:
 export CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk/

 CMake does not read this variable from the environment.  Try

  export SDKROOT=/Developer/SDKs/MacOSX10.6.sdk

 instead to work around this.

This does get the compilation past that error message, but on to
another (that I do not get for cmake 2.8.9).  I will try and debug
further.

 If I grep for 'DEPLOYMENT' in the PySide sources, I find nothing - so
 I do not believe these variables are being set by PySide.

 I suspect that python is setting MACOSX_DEPLOYMENT_TARGET.

It is perfectly possible that python distutils does set this, it
certainly checks for this in the Python configuration.

 I can reproduce this in a small test case by building with
 MACOSX_DEPLOYMENT_TARGET=10.6 set in my environment on a
 10.7 host.

 This should fix it:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15f5764e

 -Brad

Thanks a lot for the help,

Matthew
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-05 Thread Bradley Giesbrecht
On Nov 5, 2012, at 12:44 PM, Matthew Brett wrote:

 Hi,
 
 On Mon, Nov 5, 2012 at 7:57 AM, Brad King brad.k...@kitware.com wrote:
 On 11/04/2012 07:59 PM, Bradley Giesbrecht wrote:
 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
 
 Thanks for tracking it down that far.  However, I think it is
 43b74793 that actually introduced the problem.  The later
 commit only changed the appearance of the error message.
 
 On Nov 3, 2012, at 7:06 PM, Matthew Brett wrote:
 export CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk/
 
 CMake does not read this variable from the environment.  Try
 
 export SDKROOT=/Developer/SDKs/MacOSX10.6.sdk
 
 instead to work around this.
 
 This does get the compilation past that error message, but on to
 another (that I do not get for cmake 2.8.9).  I will try and debug
 further.
 
 If I grep for 'DEPLOYMENT' in the PySide sources, I find nothing - so
 I do not believe these variables are being set by PySide.
 
 I suspect that python is setting MACOSX_DEPLOYMENT_TARGET.
 
 It is perfectly possible that python distutils does set this, it
 certainly checks for this in the Python configuration.

With MacPorts and a patched cmake I am able to configure py27-pyside.

Here is the working cmake command MacPorts is producing; maybe it will help you:
cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON 
-DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib 
-DCMAKE_SYSTEM_PREFIX_PATH=/opt/local;/usr 
-DCMAKE_MODULE_PATH=/opt/local/share/cmake/modules -Wno-dev 
-DBUILD_TESTS:BOOL=FALSE 
-DPYTHON_EXECUTABLE=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
 
-DPYTHON_LIBRARY=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
 
-DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
 
-DSITE_PACKAGE=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
 -DCMAKE_OSX_ARCHITECTURES=x86_64 
-DCMAKE_OSX_SYSROOT:PATH=/Developer/SDKs/MacOSX10.6.sdk 


Regards,
Bradley Giesbrecht (pixilla)



smime.p7s
Description: S/MIME cryptographic signature
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-05 Thread Matthew Brett
Hi,

On Mon, Nov 5, 2012 at 12:44 PM, Matthew Brett matthew.br...@gmail.com wrote:
 Hi,

 On Mon, Nov 5, 2012 at 7:57 AM, Brad King brad.k...@kitware.com wrote:
 On 11/04/2012 07:59 PM, Bradley Giesbrecht wrote:
 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

 Thanks for tracking it down that far.  However, I think it is
 43b74793 that actually introduced the problem.  The later
 commit only changed the appearance of the error message.

 On Nov 3, 2012, at 7:06 PM, Matthew Brett wrote:
 export CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk/

 CMake does not read this variable from the environment.  Try

  export SDKROOT=/Developer/SDKs/MacOSX10.6.sdk

 instead to work around this.

 This does get the compilation past that error message, but on to
 another (that I do not get for cmake 2.8.9).  I will try and debug
 further.

Looking further - the MACOSX_DEPLOYMENT_TARGET environment variable is
indeed being set in a call (in pyside-setup) to
``distutils.spawn.spawn``, and setting that variable does indeed
reproduce the CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' but
CMAKE_OSX_SYSROOT error when just running cmake on the shiboken
repository.

However, I now have another problem with 2.8.10 when running ``make``.

commands
mkdir /Users/mb312/tmp/shib-tmp2
cd /Users/mb312/tmp/shib-tmp2
git clone git://git.gitorious.org/pyside/shiboken.git
export MACOSX_DEPLOYMENT_TARGET=10.6
export SDKROOT=/Developer/SDKs/MacOSX10.6.sdk
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/shib-tmp2/shiboken-build \
/Users/mb312/tmp/shib-tmp2/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
/commands

runs the configuration OK, but compiles ending in an error:

[ 94%] Building CXX object
generator/CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
[ 96%] Building CXX object generator/CMakeFiles/shiboken.dir/main.cpp.o
Linking CXX executable shiboken
ld: framework not found QtCore
collect2: ld returned 1 exit status
make[2]: *** [generator/shiboken] Error 1
make[1]: *** [generator/CMakeFiles/shiboken.dir/all] Error 2
make: *** [all] Error 2

I get no such error running the same commands with 2.8.9.   The
cmake-generated Makefile between 2.8.9 and 2.8.10 differs only in the
full path to the cmake binary.  Running the ``cmake`` invocation above
in 2.8.9, and then the ``make`` phase with 2.8.10, results in the same
error (QtCore not found).

Is there something else I can do to find out where the problem is?

Thanks a lot,

Matthew
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-05 Thread Bill Hoffman

On 11/5/2012 8:31 PM, Matthew Brett wrote:

Is there something else I can do to find out where the problem is?

make VERBOSE=1 with both and see what the difference is with the link lines.

--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-05 Thread Matthew Brett
Hi,

On Mon, Nov 5, 2012 at 5:47 PM, Bill Hoffman bill.hoff...@kitware.com wrote:
 On 11/5/2012 8:31 PM, Matthew Brett wrote:

 Is there something else I can do to find out where the problem is?

 make VERBOSE=1 with both and see what the difference is with the link lines.

Thanks for the hint.

Output of 2.8.10 command causing error:

Linking CXX executable shiboken
cd /Users/mb312/tmp/shib-tmp2/generator  /Applications/CMake
2.8-10.app/Contents/bin/cmake -E cmake_link_script
CMakeFiles/shiboken.dir/link.txt --verbose=1
/usr/bin/c++-Wall -fvisibility=hidden -Wno-strict-aliasing -O3
-DNDEBUG -isysroot /Developer/SDKs/MacOSX10.6.sdk
-mmacosx-version-min=10.6 -Wl,-search_paths_first
-Wl,-headerpad_max_install_names
CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o  -o shiboken
../ApiExtractor/libapiextractor.a -framework QtCore -framework QtXml
-framework QtXmlPatterns -framework QtXml

ld: framework not found QtCore
collect2: ld returned 1 exit status
make[2]: *** [generator/shiboken] Error 1
make[1]: *** [generator/CMakeFiles/shiboken.dir/all] Error 2
make: *** [all] Error 2

Output of same command in 2.8.9:

Linking CXX executable shiboken
cd /Users/mb312/tmp/shib-tmp2/generator  /Applications/CMake
2.8-9.app/Contents/bin/cmake -E cmake_link_script
CMakeFiles/shiboken.dir/link.txt --verbose=1
/usr/bin/c++-Wall -fvisibility=hidden -Wno-strict-aliasing -O3
-DNDEBUG -mmacosx-version-min=10.6 -Wl,-search_paths_first
-Wl,-headerpad_max_install_names
CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o  -o shiboken
../ApiExtractor/libapiextractor.a -framework QtCore -framework QtXml
-framework QtXmlPatterns -framework QtXml

ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(abstractmetalang.cpp.o) and (hidden)
in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(typesystem.cpp.o) and (hidden) in
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::operator=(char const*)has different visibility
(default) in ../ApiExtractor/libapiextractor.a(typesystem.cpp.o) and
(hidden) in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(abstractmetabuilder.cpp.o) and
(hidden) in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o

Running the 2.8.10 line above with 2.8.9 gives no error.

cd /Users/mb312/tmp/shib-tmp2/generator  /Applications/CMake
2.8-9.app/Contents/bin/cmake -E cmake_link_script
CMakeFiles/shiboken.dir/link.txt --verbose=1 /usr/bin/c++-Wall
-fvisibility=hidden -Wno-strict-aliasing -O3 -DNDEBUG -isysroot
/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6
-Wl,-search_paths_first -Wl,-headerpad_max_install_names
CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o  -o shiboken
../ApiExtractor/libapiextractor.a -framework QtCore -framework QtXml
-framework QtXmlPatterns -framework QtXml

ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(abstractmetalang.cpp.o) and (hidden)
in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(typesystem.cpp.o) and (hidden) in
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::operator=(char const*)has different visibility
(default) in ../ApiExtractor/libapiextractor.a(typesystem.cpp.o) and
(hidden) in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
ld: warning: QString::~QString()has different visibility (default) in
../ApiExtractor/libapiextractor.a(abstractmetabuilder.cpp.o) and
(hidden) in CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o

Is there anything else I can try?

Cheers,

Matthew
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow 

Re: [CMake] OSX deployment target confusion for 2.8.10

2012-11-04 Thread Bradley Giesbrecht
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, 

[CMake] OSX deployment target confusion for 2.8.10

2012-11-03 Thread Matthew Brett
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.0