Opened 12 years ago
Last modified 9 years ago
#36431 new defect
qt4-mac: macdeployqt shows errors when trying to copy in frameworks
Reported by: | mavaugha@… | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | willy.wolff.0@… | |
Port: | qt4-mac |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I just updated qt4-mac to version 4.8.3_0 which now always installs it as a framework and was supposed to help fix some issues with the macdeployqt tool. But now when I run macdeployqt on my app bundle it shows these errors:
ERROR: no file at "/opt/local/Library/Framework/QtSvg.framework/Versions/4/QtSvg" ERROR: no file at "/opt/local/Library/Framework/QtGui.framework/Versions/4/QtGui" ERROR: no file at "/opt/local/Library/Framework/QtCore.framework/Versions/4/QtCore" ERROR: no file at "/opt/local/Library/Framework/QtOpenGL.framework/Versions/4/QtOpenGL"
No frameworks are copied in. It only copies in the following dynamic libraries: libjpeg.8.dylib, liblcms.1.dylib, libmng.1.dylib, libpng15.15.dylib, libQtCore.4.dylib, libQtGui.4.dylib, libQtSvg.4.dylib, libqwt.6.dylib, libtiff.3.dylib, libz.1.dylib
The app also doesn't run after I run the deployment tool on it. I have attached the error report.
Also, as a side note... I have to manually move the plugins folder from /opt/local/share/qt4/ to /opt/local/ for the macdeployqt tool to find them to include in the bundle.
Attachments (3)
Change History (18)
Changed 12 years ago by mavaugha@…
Attachment: | error_report.txt added |
---|
comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to michaelld@… |
comment:3 Changed 12 years ago by michaelld (Michael Dickens)
comment:4 Changed 12 years ago by michaelld (Michael Dickens)
Yes, that's my bad: a typo in a patch. I'm updating qt4-mac later today anyway, which will require a rev-bump of qt4-mac (and, thus a rebuild too), so I'll also fix this at that time.
comment:5 Changed 12 years ago by michaelld (Michael Dickens)
And, I think the other issue (with plugins) is just a tweak to an existing patch. I'll do that too for the checkin and I'd appreciate it if you can provide feedback as to whether the change works. I don't use macdeployqt, so I rely on others in this regard :)
comment:6 Changed 12 years ago by mavaugha@…
Ah yes, I didn't even notice that typo. Thanks for adding these fixes in, I'll look out for the update and test it asap. Thank you!
comment:7 Changed 12 years ago by michaelld (Michael Dickens)
Done in r98334. The plugins worked for me without any other changes; please do "sudo port selfupdate" and then "sudo port upgrade outdated" (or, whatever you like for doing these) and see if the new macdeployqt works better. Hopefully it will. I'm leaving this ticket open for now.
comment:8 Changed 12 years ago by mavaugha@…
I rebuilt qt4-mac to version 4.8.3_1 and macdepolyqt now correctly finds and inserts the relevant frameworks with no errors reported.
I still needed to manually move the plugins folder to /opt/local/ for it to include the needed plugins. However, I did find that without moving the plugins folder, the first time I run macdeployqt it doesn't copy in any plugins. But then if I run it again on the same bundle it gives me some warning messages about the bundle being already deployed and the frameworks are already copied in, but this time it adds in the plugins... So somehow it's finding the plugins in /opt/local/share/qt4/ the second time around? Also, interestingly this method copies in less plugins than if I just move the plugins folder, but both methods still give me a runnable app...
Now my main problem lies in the fact that even after a successful run of macdeployqt with all frameworks and plugins added in, the app still fails to run (I attached an updated error report). The app compiles and runs fine until I deploy it. I looked at the error report and I think it has something to do with qwt, possibly related to #35975? The deployed app runs fine if I remove all qwt widgets.
Changed 12 years ago by mavaugha@…
Attachment: | error_report_updated.txt added |
---|
comment:9 Changed 12 years ago by michaelld (Michael Dickens)
So, progress! That's good. What is the actual command line you're using when you call "macdeployqt"? I've tried running macdeployqt with some of the qt-provided .app's and that seems to work OK -- nothing complicated here, but the Qt libraries and plugins are installed what seems to be correctly. I haven't tried executing the resulting apps though; that'll be next.
I had forgotten about that qwt ticket :) I'll look into that next and maybe that will help fix some more issues. It's always good for the software to work all around ...
comment:10 Changed 12 years ago by mavaugha@…
I'm just calling: bash$ macdeployqt build/Release/VolumeViewer4.app
Once I get this working I will also be using the -dmg flag to have it make a dmg image of the app: bash$ macdeployqt build/Release/VolumeViewer4.app -dmg
The plugin issue is not really that big a deal, it's just weird that it seems like it tries to look in both /opt/local/ and /opt/local/share/qt4/ for the plugins given different circumstances. But for me it works best when the plugins folder is in /opt/local/
I really think the issue is with apps that use qwt, since everything works fine if I don't use it :). But alas I need to use qwt...
comment:11 Changed 12 years ago by michaelld (Michael Dickens)
Can you use "qwt-devel" instead of "qwt-60"? I updated the former recently to version 6.0.1 without realizing that the latter existed :) That's what I have installed right now, and it seems to work well for me. I haven't tried it with macdeployqt yet; I think I can tell if that plugin is being used, but I don't know of a .app that uses it specifically -- so, you're probably in a better space to test it out to see if that's really one of the issues.
I'm guessing that the issue with where the plugins are located has to do with the way macdeployqt finds and copies the necessary frameworks; probably the second time, since nothing was copied, the "pluginpath" comes up empty and hence the default is used (the /opt/local/share/qt4/ value). The first time, I'm guessing that the "pluginpath" comes up as "/opt/local" ... but that's just guessing.
This is pretty simple to test if you install qt4-mac with "-k" as an option to keep the build directory; then you can edit the macdeployqt, build it, and test out the resulting executable without reinstalling it -- this is what I've been doing to see how macdeployqt works internally.
comment:12 Changed 12 years ago by mavaugha@…
Well I just installed qwt-devel and recompiled everything. I tried running macdeployqt on my app and now it seems to run fine without crashing! :)
I'll test it some more and try the app on a computer without qt to make sure it's working properly. But I think this ticket can probably be closed now.
Also, I don't know if #35975 is an issue anymore since I did get both qwt-60 and qwt-devel to at least compile against qt4-mac installed as frameworks (which was the issue in that ticket), but qwt-devel is the only one that works with app deployment.
I noticed that qwt-devel uses qwt as a framework where as qwt-60 used it as a library. I don't why the library would cause issues, but in the end it makes more sense to use qwt as a framework now that qt is force installed as frameworks.
comment:13 Changed 12 years ago by willy.wolff.0@…
The problem is still present. But i have another problem with dbus, i do another ticket fort that.
Changed 12 years ago by willy.wolff.0@…
comment:15 Changed 12 years ago by michaelld (Michael Dickens)
I just checked in r102010, which might address this issue (indirectly; not intentionally). Please seflupdate, then upgrade and see what happens.
comment:16 Changed 9 years ago by michaelld (Michael Dickens)
No response for 3 years. Anybody still have this issue with Qt 4.8.7?
Should be ".../frameworks/...", not ".../framework/...". Maybe I made a typo in a patch? Let me look ...