Note that there are some explanatory texts on larger screens.

plurals
  1. POQt 5 cannot deploy on SnowLeopard
    text
    copied!<p>I have an issue where my app doesn't run on 10.6 Snow Leopard.</p> <p>I compile with these parameters:</p> <pre><code>qmake LSPRO.pro -r -spec macx-clang CONFIG+=release CONFIG+=x86_64 </code></pre> <p>in my Pro file, I have these elements:</p> <pre><code>TEMPLATE = app HEADERS = \ mainwindow.h \ app_mediamanager.h \ api.h \ tool_htmleditor.h \ tool_videoencoder.h \ tool_thumbnaileditor.h SOURCES = \ main.cpp \ mainwindow.cpp \ app_mediamanager.cpp \ api.cpp \ tool_htmleditor.cpp \ tool_videoencoder.cpp \ tool_thumbnaileditor.cpp QT += network webkitwidgets widgets concurrent sql QMAKE_CXXFLAGS_X86_64 += -mmacosx-version-min=10.6 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 ICON = icon.icns RESOURCES = lspro.qrc </code></pre> <p>But even with a simple Hello world or the example files, it doesn't work...</p> <p>I add the libraries with macdeployqt script. When running on 10.6 I get this as error in the report:</p> <pre><code>Dyld Error Message: Library not loaded: /usr/lib/libc++.1.dylib Referenced from: /Users/username/Desktop/LSPRO.app/Contents/MacOS/../Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets Reason: image not found </code></pre> <p>The question is simple: How can I target 10.6 from a clean Qt5 in 10.8?</p> <hr> <h2>Update 1:</h2> <p>Thanks to the comments, it looks like 10.6 didn't shipped with c++11 support yet, causing the app to crash when looking for it. I tried 2 solutions:</p> <p><strong>Failed solution1</strong> : I rebuild Qt5 with the noc++11 flag, the resulting app starts on snowleopard but fails some inner elements Videoplayer missing in Qwebkit, unable to call external binary /execute command (app crashes with EXC_BAD_ACCESS) although the binary just runs fine when called directly and probably more undiscovered.</p> <p><strong>Failed solution2</strong> : I tried naively to include the missing dylibs (libc++.1.dylib and libc++abi.dylib) in snowleopard, but the app still crashes with the message : </p> <pre><code>Dyld Error Message: Symbol not found: _NSPreferredScrollerStyleDidChangeNotification Referenced from: /Volumes/SANS TITRE/tests/LSPRO1.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit </code></pre> <hr> <h2>otool -L of a 5.1.0 rc1 build</h2> <pre><code>@executable_path/../Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets (compatibility version 5.1.0, current version 5.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/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) @executable_path/../Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.1.0, current version 5.1.0) @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.1.0, current version 5.1.0) @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.1.0, current version 5.1.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 19.0.0) @executable_path/../Frameworks/QtWebKit.framework/Versions/5/QtWebKit (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) @executable_path/../Frameworks/QtConcurrent.framework/Versions/5/QtConcurrent (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) </code></pre> <hr> <h2>SOLUTION:</h2> <p>ok finally got it to work. Compiled Qt5 (5.1.2) on snowleopard from git (have xcode 4.2 with 10.6 sdk) in my case simply with these config:</p> <pre><code>./configure -developer-build -opensource -nomake examples -nomake tests -qt-sql-mysql </code></pre> <p>I had to fix small elements in my code making the app crash without reason (variable names..) and then everything was ok.</p> <p>Just don't forget to use the mac deploy tool on 10.6 and the app runs ok on 10.8 (untested on 10.7 but I assume this is ok.)</p> <p>Hope this helps anyone.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload