[Development] Standard options & deploying on Mac OS X 10.6 while building on 10.7

Ziller Eike Eike.Ziller at digia.com
Fri Jun 7 15:57:15 CEST 2013


On 07.06.2013, at 14:41, Vincent <vincentb1981 at gmail.com> wrote:

> Hi,
> 
> 
> 
> Good news :-)
> 
> 
> 
> I was able to deploy on MacOS X 10.6 a Qt application linked against Qt 5.1.0 Beta 1 built by myself on MacOS X 10.7 with the following configure step (i.e.: -no-c++11 and against 10.8 sdk)
> 
>     ./configure -prefix $PWD/qtbase -opensource -debug-and-release -nomake examples -nomake demos -no-c++11

Right. I had a longer look at the sources, and in Qt 5.1 video support in QtWebKit is disabled if your "Qt deployment target" is different from the "Mac OS SDK". And disabled video support means that it is deployable on the "Qt deployment target". 
The configure option -no-c++11 sets the deployment target to 10.6 != your Mac SDK.
(without -no-c++11 the deployment target would be 10.7 != your Mac SDK too btw, so no video support in webkit either…)

Br, Eike

> While it was not working with qt-project.org's binary Qt 5.0.2 (problem with QtWebKit, see mails above) and qt-project.org's binary Qt 5.1.0 Beta 1.
> 
> Note that links of QtWebKit framework to MacOS X frameworks is different for 5.0.2 and my compiled version of 5.1.0 Beta 1 (see below).
> 
> 
> 
> My next step is to configure & compile Qt 5.1.0 Beta 1 with the same options as qt-project.org's version (except for C++11 support).
> 
> 
> 
> Cheers,
> 
> 
> 
> Cosmo
> 
> 
> 
> Here is the shared libraries in use by QtWebKit. Applications were bundled with the same macdeployqt utility.
> 
> 
> 
> * qt-project.org's binary Qt 5.0.2:
> 
> 
> 
> $ otool -L QtWebKit.framework/Versions/5/QtWebKit 
> 
> QtWebKit.framework/Versions/5/QtWebKit:
> 
> @executable_path/../Frameworks/QtWebKit.framework/Versions/5/QtWebKit (compatibility version 5.0.0, current version 5.0.2)
> 
> @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.0.0, current version 5.0.2)
> 
> @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.0.0, current version 5.0.2)
> 
> @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.0.0, current version 5.0.2)
> 
> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
> 
> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1138.32.0)
> 
> /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.3.0)
> 
> /usr/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.24.0)
> 
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
> 
> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit (compatibility version 1.0.0, current version 1.0.0)
> 
> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 1.0.0)
> 
> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0)
> 
> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.7.0)
> 
> /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit (compatibility version 1.0.0, current version 1.0.0)
> 
> /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 55110.0.0)
> 
> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
> 
> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
> 
> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.19.0)
> 
> /usr/lib/libsqlite3.dylib (compatibility version 9.0.0, current version 9.6.0)
> 
> /usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 46.1.0)
> 
> @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.0.0, current version 5.0.2)
> 
> @executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml (compatibility version 5.0.0, current version 5.0.2)
> 
> @executable_path/../Frameworks/QtSql.framework/Versions/5/QtSql (compatibility version 5.0.0, current version 5.0.2)
> 
> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
> 
> /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
> 
> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
> 
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
> 
> /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
> 
> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 53.0.0)
> 
> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 41.0.0)
> 
> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.24.0)
> 
> 
> 
> 
> 
> * Qt 5.1.0 Beta 1 compiled with the following options
> 
> ./configure -prefix $PWD/qtbase -opensource -debug-and-release -nomake examples -nomake demos -no-c++11
> 
> 
> 
> $ otool -L QtWebKit.framework/Versions/5/QtWebKit 
> 
> QtWebKit.framework/Versions/5/QtWebKit:
> 
> @executable_path/../Frameworks/QtWebKit.framework/Versions/5/QtWebKit (compatibility version 5.1.0, current version 5.1.0)
> 
> @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.1.0, current version 5.1.0)
> 
> @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.1.0, current version 5.1.0)
> 
> @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.1.0, current version 5.1.0)
> 
> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 155.0.0)
> 
> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1187.37.0)
> 
> /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.8.0)
> 
> /usr/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.26.0)
> 
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
> 
> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
> 
> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.18.0)
> 
> /usr/lib/libsqlite3.dylib (compatibility version 9.0.0, current version 9.6.0)
> 
> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
> 
> /usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 49.1.0)
> 
> @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.1.0, current version 5.1.0)
> 
> @executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml (compatibility version 5.1.0, current version 5.1.0)
> 
> @executable_path/../Frameworks/QtSql.framework/Versions/5/QtSql (compatibility version 5.1.0, current version 5.1.0)
> 
> @executable_path/../Frameworks/QtSensors.framework/Versions/5/QtSensors (compatibility version 5.1.0, current version 5.1.0)
> 
> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
> 
> /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
> 
> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
> 
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
> 
> /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
> 
> 
> 
> 2013/6/7 Vincent <vincentb1981 at gmail.com>
> OK, now I'm trying to build Qt against 10.6 sdk on the 10.7 machine. I've copied from XCode 4.3.3 the macosx10.6 sdk along 10.7 & 10.8 SDK's.
> 
> Then configuring with:
>  ./configure -prefix $PWD/qtbase -opensource -debug-and-release -nomake examples -nomake demos -no-c++11 -sdk macosx10.6 -v
> 
> It seems to accept the value of the argument -sdk (if I provide a wrong value, a warning is raised).
> 
> However, when looking at the clang++ option run during configure step, it seems MacOSX10.8 sdk is used (see -isysroot argument):
> 
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -o qcore_mac.o -pipe -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.6 -g -gdwarf-2 -fconstant-cfstrings -g -DQMAKE_OPENSOURCE_EDITION -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/qmake -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/qmake/library -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/qmake/generators -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/qmake/generators/unix -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/qmake/generators/win32 -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/qmake/generators/mac -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/qmake/generators/integrity -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/include -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/include/QtCore -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/include/QtCore/5.1.0 -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/include/QtCore/5.1.0/QtCore -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/src/corelib/global -DHAVE_QCONFIG_CPP -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/mkspecs/macx-clang -I/Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/tools/shared -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DPROEVALUATOR_DEBUG -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM /Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/src/corelib/kernel/qcore_mac.cpp
> 
> and the configure step ends up with an error (here 10.6 sdk seems at work):
> 
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -o stl stltest.o    
> ld: library not found for -lstdc++
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make: *** [stl] Error 1
> STL disabled.
> STL functionality check failed! Cannot build Qt with this STL library.
>  Turn on verbose messaging (-v) to /Users/user/Tools/2ndqt/qt-everywhere-opensource-src-5.1.0-beta1/qtbase/configure to see the final report.
> *** qtbase/configure exited with non-zero status.
> 
> 
> 2013/6/6 Ziller Eike <Eike.Ziller at digia.com>
> 
> > From: development-bounces+eike.ziller=digia.com at qt-project.org [development-bounces+eike.ziller=digia.com at qt-project.org] on behalf of Vincent [vincentb1981 at gmail.com]
> > Sent: 06 June 2013 18:20
> > To: development at qt-project.org
> > Subject: [Development] Standard options & deploying on Mac OS X 10.6 while building on 10.7
> > 
> > Hello,
> > 
> > I would like to be able to deploy Qt applications on Mac OS X 10.6. The development environment is on 10.7.
> > 
> > I tried with Qt 5.0.2 and Qt 5.1.0 Beta 1 (downloaded binaries from qt-project.org) and none of the compiled applications run on Mac OS X 10.6.
> > 
> > Then I tried to compile Qt 5.1.0 Beta 1 on 10.7, with the following configure options:
> >    ./configure -prefix $PWD/qtbase -opensource -debug-and-release -nomake examples -nomake demos
> > 
> > Still, applications don't run on 10.6. Note that I've then compiled Qt against 10.8 sdk.
> > 
> > After discussing with Tor it seems that I need to provide to ./configure the no-c+11 option.
> > 
> > I would like to be sure that the Qt build I'll be compiling is as close as possible as the standard Qt available through binary download at qt-project.org.
> > 
> > What is the full set of options for the configure script used by Qt Team in order release binaries?
> > 
> > Thanks,
> > 
> > Cosmo
> > 
> > 
> > Note: here are the runtime errors on 10.6:
> > 
> > * Output of running on 10.6 an app built against Qt 5.0.2:
> > 
> > dyld: Symbol not found: _kCFWebServicesProviderDefaultDisplayNameKey
> >   Referenced from: /Users/<snip>/Desktop/myapp/myapp.app/Contents/MacOS/../Frameworks/QtWebKit.framework/Versions/5/QtWebKit
> >   Expected in: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
> >  in /Users/<snip>/Desktop/myapp/myapp.app/Contents/MacOS/../Frameworks/QtWebKit.framework/Versions/5/QtWebKit
> > Trace/BPT trap
> 
> This is the weird way of QtWebKit to tell you that you need to build Qt directly against a Mac 10.6 SDK if you want to
> deploy Qt applications that use webkit on Mac OS X 10.6...
> 
> > * And running on 10.6 an app built against 5.1.0 Beta 1 (Qt was compiled on Mac OS X 10.7 with ./configure -prefix $PWD/qtbase -opensource -debug-and-release -nomake examples -nomake demos):
> > 
> > dyld: Library not loaded: /usr/lib/libc++.1.dylib
> >   Referenced from: /Users/<snip>/Desktop/myapp/myapp.app/Contents/MacOS/../Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets
> >   Reason: image not found
> > Trace/BPT trap
> 
> 
> -- 
> Eike Ziller
> Senior Software Engineer
>  
> Digia Germany GmbH
> Rudower Chaussee 13, D-12489 Berlin
> Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B,  
> Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
> 
> 
> 

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
 
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B




More information about the Development mailing list