Link error OS X Yosemite
-
Hi Guys...
I'm trying to make the deploy of my application in OS X. My application is a qtwidget application.
The problem is when i run otool over the executable file. Let me explain my self:
I had develop the backend as a QtLubrary project. I have 7 different libraries developed like that. My qtwidget application link against this libraries, and until this point there is not a problem. When I run the application from qtcreator, my application run veru well, but if make double click in finder, the application said that it can't find the libraries of my back which eachone is defined in my .pro file.
After that, I run otool -L command over the executable and I found that in the list of libraries to link each of my libraries of my backend has not a a full path like each Qt library has.
so, when I run the https://github.com/dshav/qtappmacdeploy: to make the deploy of my app over OS X, it can't find my backend libraries and for that, my app does not run in other mac.And the same problem when I try to make double clic over the executable from finder.
Someone has this problem??? i don't know if I need to give more info...sorry if didn't do...if I must post more info, please, just ask about...
best regards
-
Hi,
Before that, did you try to just run macdeployqt ?
How does your project look like ? A subdir template ?
-
Hi SGaist and thank for you answer
Yes, I'm trying to run qtappmacdeploy and it make the deploy, but he doesn't put my backend libraries inside...
my project look like this:
the backend project is where I have all my libraries and its .pro file is like this:
@TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS +=
common
system_manager
task_manager
communication_manager
forms_manager \
formula_manager
queries_manager
rules_manager
db_manager
security_manager
periods_manager
reports_manager
procedure_manager
anclan_server @after that and in another external project, I have my qtwidget project where I link against someone of this libraries:
@win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/forms_manager/release/ -lforms_manager
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/forms_manager/debug/ -lforms_manager
else:unix:mac: LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/forms_manager/ -lforms_managerINCLUDEPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/forms_manager
DEPENDPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/forms_managerwin32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/system_manager/release/ -lsystem_manager
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/system_manager/debug/ -lsystem_manager
else:unix:mac: LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/system_manager/ -lsystem_managerINCLUDEPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/system_manager
DEPENDPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/system_managerwin32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/common/release/ -lcommon
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/common/debug/ -lcommon
else:unix:mac: LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/common/ -lcommonINCLUDEPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/common
DEPENDPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/commonwin32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/task_manager/release/ -ltask_manager
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/task_manager/debug/ -ltask_manager
else:unix:mac: LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/task_manager/ -ltask_managerINCLUDEPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/task_manager
DEPENDPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/task_managerwin32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/communication_manager/release/ -lcommunication_manager
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/communication_manager/debug/ -lcommunication_manager
else:unix:mac: LIBS += -L$$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/build-anclan_kernel-Desktop_Qt_5_4_0_clang_64bit-Debug/communication_manager/ -lcommunication_managerINCLUDEPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/communication_manager
DEPENDPATH += $$PWD/../../../../Volumes/Data/anclan/src/git/update-29-12-2014/update/anclan_kernel/communication_manager@I had added each library using right click over my project.
Well, the problem is that I can run the application from QtCreator, but not executing it from finder. To make that, I had to copy my backend libraries in /usr/local/lib and that what I don't wanna do.
-
the output of the otool -L command is this:
@[freddy@Freddys-MacBook-Pro][12:49 PM][~] otool -L /Users/freddy/Public/build-acces-anclan-Desktop_Qt_5_4_0_clang_64bit-Debug/NautamDesigner.app/Contents/MacOS/NautamDesigner
/Users/freddy/Public/build-acces-anclan-Desktop_Qt_5_4_0_clang_64bit-Debug/NautamDesigner.app/Contents/MacOS/NautamDesigner:
libcommunication_manager.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libcommon.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libtask_manager.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libsystem_manager.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libforms_manager.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/Qt5.4/5.4/clang_64/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.4.0, current version 5.4.0)
/Applications/Qt5.4/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.4.0, current version 5.4.0)
/Applications/Qt5.4/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.4.0, current version 5.4.0)
/Applications/Qt5.4/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.4.0, current version 5.4.0)
/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)
/Applications/Qt5.4/5.4/clang_64/lib/QtDesigner.framework/Versions/5/QtDesigner (compatibility version 5.4.0, current version 5.4.0)
/Applications/Qt5.4/5.4/clang_64/lib/QtXml.framework/Versions/5/QtXml (compatibility version 5.4.0, current version 5.4.0)
/Applications/Qt5.4/5.4/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.4.0, current version 5.4.0)
/Applications/Qt5.4/5.4/clang_64/lib/QtScript.framework/Versions/5/QtScript (compatibility version 5.4.0, current version 5.4.0)
/Applications/Qt5.4/5.4/clang_64/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.4.0, current version 5.4.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.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)@as you can see, the first 5th libraries look like if they are in the same directory of the executable, and I think (is my opinion because I'm not sure) that for that reason, when I try to run the application from the Finder I got an error, because this libraries are not in the directory where the executable is...
for that, qtappmacdeploy can't find it and can't make the deploy of each library... that is may problem
regards
PD: Sorry for send 2 messages, to large in only one
-
Not qtappmacdeploy, but macdeployqt which is bundled with Qt.
-
yea, I had try with macdeployqt and the same result... My libraries are not in the Framework folder
I got this errors too using macdeployqt
@ERROR: no file at "/opt/local/lib/mysql55/lib/libmysqlclient.18.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/platforms/libqcocoa.dylib"
ERROR: to "/Users/freddy/Public/build-acces-anclan-Desktop_Qt_5_4_0_clang_64bit-Debug/NautamDesigner.app/Contents/PlugIns/platforms/libqcocoa.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/printsupport/libcocoaprintersupport.dylib"
ERROR: to "/Users/freddy/Public/build-acces-anclan-Desktop_Qt_5_4_0_clang_64bit-Debug/NautamDesigner.app/Contents/PlugIns/printsupport/libcocoaprintersupport.dylib"
WARNING:
WARNING: "/Users/freddy/Public/build-acces-anclan-Desktop_Qt_5_4_0_clang_64bit-Debug/NautamDesigner.app/Contents/Resources/qt.conf" already exists, will not overwrite.
WARNING: To make sure the plugins are loaded from the correct location,
WARNING: please make sure qt.conf contains the following lines:
WARNING: [Paths]
WARNING: Plugins = PlugIns@ -
You should call it on a "non-deployed" app so delete your app, rebuild it and then run macdeployqt
-
I did it... but i got the same result :(
-
Wait… Do you have several versions of Qt installed ?
-
Hi SGaist
I have only Qt5.4 installed on /Application/ folder...
The other thing which I could try is make a pkg file and put my libraries in /usr/local/lib but I have to go to search in google how can I do this... but I think that make a good bundle folder is the better solution, for that reason I'm asking...
another advise ??
best regards
-
A simple application should not install anything especially in /usr/local/
You should run macdeployqt with verbose activated to see exactly what is happening with your application.
By the way, do you really need that much libraries ?