Intermittent problem with macdeployqt
-
Sorry, had to go out last night. Here it is:
QtPrintSupport:
@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.9.0, current version 5.9.2)
@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.9.0, current version 5.9.2)
@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.9.0, current version 5.9.2)
@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.9.0, current version 5.9.2)
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1404.32.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/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) -
One more item: Maybe my .pro file is not correct...
QT += core
QT += gui
QT += widgets
QT += printsupportVERSION = "10.0"
DEFINES = "MacX64"CONFIG -= console
CONFIG += app_bundle
CONFIG += staticlibTEMPLATE = app
TARGET = $$PWD/bin/Ifstool10.0
INCLUDEPATH += ../hdrSOURCES +=
main.cpp
ifstoolMainWindow.cpp
ifstool.cpp
subclassqapp.cpp
ifs2qt.cpp
ifstoolChildWindow.cpp
ifsOp.cpp
plotMainWindow.cpp
qcustomplot.cppFORMS +=
plotMainWindow.uiHEADERS +=
main.h
../hdr/flip.h
../hdr/ifs.h
../hdr/ifsdocs.h
../hdr/ifsequ.h
../hdr/ifserr.h
../hdr/ifsmatrix.h
../hdr/ifstypes.h
../hdr/nicedefs.h
../hdr/resample.h
../hdr/rfft.h
../hdr/stddefs.h
../hdr/cclC4.h
ifstoolMainWindow.h
ifstool.h
generictypes.h
subclassqapp.h
ifs2qt.h
ifstoolChildWindow.h
ifsOp.h
plotMainWindow.h
qcustomplot.hmacx {
QMAKE_MAC_SDK=macosx10.12
}macx: LIBS += -L$$PWD/../lib/macX64/ -lifs
INCLUDEPATH += $$PWD/../lib/macX64/ifslib
DEPENDPATH += $$PWD/../lib/macX64/ifslibmacx: PRE_TARGETDEPS += $$PWD/../lib/macX64/libifs.a
RESOURCES +=
images.qrcPlugins = PlugIns
-
Can you check with a more recent version of Qt ? IIRC the current is 5.9.3 but you can also test 5.10
-
I downloaded and tried 5.4. This fails with
This application failed to start because it could not find or load the Qt platform plugin "cocoa" and that is running under Qt Creator.
I tried the complete download/install on this twice. I'll go back to 5.9.3.
Wesley -
Is your code available somewhere to test the deployment ?
-
The source code is not on a public cloud at the moment, but I'll be glad to send it to you. But how do we do it without making our actual email addresses public? I have used Wetransfer and Dropbox both.
@Kasungu This may be a stupid question, but are you sure, that you use the correct macdeployqt-tool ?
Each installation of Qt - 5.9.3, 5.92, 5.4 etc. - each come with their own deploy-tool. If you're using the 5.4 tool for a 5.9.3 binary, than theres a high chance that it won't work.
A file is copied into the folder, but the wrong one.
-
It was a great idea! I was excited, but I checked and unfortunately I had done it right. But I double-checked, made sure no other versions of Qt existed, rebuilt using the version of Creator which was in 5.9.3, etc. It still fails in the same way.
(By the way, when I run the version of Creator in 5.9.3, and hit About Creator, I get
"Based on Qt 5.9.2". I presume this is because Creator did not change between 5.9.2 and 5.9.3, and this message didn't get changed. Right?)Sigh..
-
It was a great idea! I was excited, but I checked and unfortunately I had done it right. But I double-checked, made sure no other versions of Qt existed, rebuilt using the version of Creator which was in 5.9.3, etc. It still fails in the same way.
(By the way, when I run the version of Creator in 5.9.3, and hit About Creator, I get
"Based on Qt 5.9.2". I presume this is because Creator did not change between 5.9.2 and 5.9.3, and this message didn't get changed. Right?)Sigh..
@Kasungu said in Intermittent problem with macdeployqt:
"Based on Qt 5.9.2".
Means what Qt Creator was build with and it is not related to the version of Qt
you are using to build your application.
In fact you can have multiple version of Qt installed and use in the same Creator. -
I found the fix! all it required was the correct switch used withmacdeployqt:
/Users/[PathtoQt]/Qt/5.9.3/clang_64/bin/macdeployqt [space] /Users/[pathtoapp]/ThisApp.app - [note the dash] executable=/Users/[pathtoapp]ThisApp.app/Contents/MacOS/ThisApp
The online manual says this about that switch:
-executable=<path> Let the given executable also use the deployed frameworks
Perhaps this could be described a bit more clearly, since if you do this, all the stuff using Install_name_tool isn't needed. (Finding this took me weeks). Of course, I am not a Qt guru, maybe it's just me.
-
It's a bit surprising, in most cases you shouldn't need that option.
Anyway, glad you found out and thanks for sharing ! :)