#50955 closed defect (fixed)
qwt61 does not build for variant +qt5
Reported by: | BSeppke (Benjamin Seppke) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | Cc: | RJVB (René Bertin), mkae (Marko Käning), dmarteau (David Marteau), SiggyF | |
Port: | qwt61 |
Description
Following Ticket #49143, which seems to have already been fixed, I encountered another problem for the qwt port. The build and installation pass for the +qt5 variant, but result in wrongly linked dylibs. This forces macports to rebuild qwt61 three times before giving up.
I pinned the errors down to the librarys for qwt and the designer plugin. Here, the prefix path is missing for both, the lib itself and the linked lib (for the designer plugin). If I install the qwt61 manually from source using /opt/local/libexec/qt5/bin/qmake after setting:
QWT_INSTALL_PREFIX = QT_INSTALL_PREFIX and QWT_CONFIG += QwtFramework
in qwtconfig.pri I get the same wrongly linked binaries, which I am able to fix using sudo of:
#Patch qwt lib (inside framework) install_name_tool -id /opt/local/libexec/qt5/lib/qwt.framework/Versions/6/qwt /opt/local/libexec/qt5/lib/qwt.framework/Versions/6/qwt #Patch designer plugin install_name_tool -id /opt/local/libexec/qt5/plugins/designer/libqwt_designer_plugin.dylib /opt/local/libexec/qt5/plugins/designer/libqwt_designer_plugin.dylib install_name_tool -change qwt.framework/Versions/6/qwt /opt/local/libexec/qt5/lib/qwt.framework/Versions/6/qwt /opt/local/libexec/qt5/plugins/designer/libqwt_designer_plugin.dylib
This should probably done in the Portfile, too. Another point is, that the qwt-Port currently promotes header and libs to the "global" /opt/local/include and /opt/local/lib directories. I think, we should disable this behaviour and always install qwt as a framework inside the corresponding qt4/5 directory. This will make it possible to have qwt61 installed for qt4 and qt5 in parallel without conflicts. All we would need for this is to promote the headers inside the corresponding qt installations. For qt5 e.g.:
#Promote headers ln -s /opt/local/libexec/qt5/lib/qwt.framework/Versions/6/Headers /opt/local/libexec/qt5/include/qwt
Maybe this defect is a good opportunity to think about not just fixing qwt, but really improving it.
Attachments (1)
Change History (21)
comment:1 Changed 9 years ago by BSeppke (Benjamin Seppke)
comment:2 Changed 9 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to michaelld@… |
---|
In the future, please Cc the port maintainers (port info --maintainers qwt61
), if any.
comment:3 Changed 9 years ago by RJVB (René Bertin)
I'll have a look at this too (also as a test-case for my proposed alternative qt5-kde port ... and because it'll expose any issues with building against 5.6.0).
In the meantime, may I suggest you compare with qca, which didn't pose any particular problems as far as coinstalling for Qt4 and Qt5 was concerned, as far as I can remember? Cf. https://github.com/RJVB/macstrop/tree/master/devel/qca for my implementation of a qca-qt5 subport.
comment:4 Changed 9 years ago by RJVB (René Bertin)
Without any hacking, I'm only getting things installed under ${prefix}/share. I did notice a qmake remark about a missing target.path
specification leading to things not being installed, I wonder if that's related.
In addition: why does this port not use the qmake PortGroup (qmake5, for Qt5)?
comment:5 Changed 9 years ago by RJVB (René Bertin)
I've attached a patch that tackles part of the problem. I haven't yet managed to get the proper "sonames" to be stored; neither the absolute_library_soname
config nor setting QMAKE_INSTALL_SONAME
in qwt.pro have the intended effect.
Still, it shouldn't be necessary to invoke install_name_tool
...
comment:11 Changed 8 years ago by BSeppke (Benjamin Seppke)
Hi,
to keep a long story short, I switched to the new QtCharts framework for my projects. The framework comes with Qt 5.7. However, since MacPorts only supports Qt 5.6, I needed to install them manually.
Best wishes Benjamin
comment:12 Changed 8 years ago by RJVB (René Bertin)
Benjamin: do you mean you got QtCharts to build against Qt 5.6? It's been on my list to upgrade my qt5-kde-devel port to 5.7, but I keep getting side-tracked (and I like the idea of a LTS release a bit too much...)
Either way, what are the remaining issus with qwt61 after applying my patch? My remarks above (comment 5) are still valid, though I see I could have been more specific. The real issue is that the rpath isn't stored in the frameworks.
comment:13 Changed 8 years ago by BSeppke (Benjamin Seppke)
OT: I downloaded qtcharts from GitHub and compiled it against 5.6, yes.
I didn't see any problems with the patch, but are the sonames fixed with it, too? Otherwise, I would suggest putting the commands of my initial posting (install_name_tool....) in a qt5-depending post-install section.
comment:14 Changed 8 years ago by RJVB (René Bertin)
No, your install_name_tool commands or similar are still required. There must be a better way to do that though, one where all dependents built by the port itself (the Designer plugin, the examples) use the correct rpath.
FWIW, building on Linux has the same issue; the build system is designed with the idea in mind that the libraries are installed somewhere where the dynamic loader (dyld, ld.so on Linux) can find them.
Changed 8 years ago by RJVB (René Bertin)
Attachment: | qwt61.diff added |
---|
comment:15 follow-up: 17 Changed 8 years ago by RJVB (René Bertin)
I think I've nailed it - possibly thanks in part by an upgrade to the latest qwt 6.1(.3).
Works for me now, no install_name_tool magic required.
comment:16 Changed 8 years ago by slarew
Cc: | slarew added |
---|
comment:17 Changed 8 years ago by slarew
Replying to RJVB:
I think I've nailed it - possibly thanks in part by an upgrade to the latest qwt 6.1(.3).
Works for me now, no install_name_tool magic required.
Your qwt61.diff patch worked for me. Thanks!
comment:18 Changed 8 years ago by SiggyF
Cc: | SiggyF added |
---|
comment:19 Changed 8 years ago by michaelld (Michael Dickens)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Looks like this issue was fixed in https://github.com/macports/macports-ports/commit/821897a06b932011c3edcb30c719ecc8bd882f60 . Thus I'm closing this ticket.
comment:20 Changed 10 months ago by slarew
Cc: | slarew removed |
---|
Sorry, there is a typo in the settings above. I actually used:
in the qwtconfig.pro file.