Bug 210418 - devel/qmake5: qmake adds -L/usr/local/lib ahead of LIBS causing build to use the old versions of libraries
Summary: devel/qmake5: qmake adds -L/usr/local/lib ahead of LIBS causing build to use ...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: kde
Depends on:
Reported: 2016-06-20 22:20 UTC by Yuri Victorovich
Modified: 2016-11-03 08:25 UTC (History)
2 users (show)

See Also:
tcberner: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2016-06-20 22:20:08 UTC
I am looking at the databases/sqlitestudio port.

In this makefile /usr/ports/databases/sqlitestudio/work/SQLiteStudio3/guiSQLiteStudio/Makefile qmake always adds -L/usr/local/lib in front, so LIBS looks like this:

> LIBS          = $(SUBLIBS) -L/usr/local/lib -L/usr/ports/databases/sqlitestudio/work/SQLiteStudio3/../output/SQLiteStudio -lcoreSQLiteStudio -lQt5UiTools -lQt5Svg -lQt5Widgets -lQt5Gui -lQt5Xml -lQt5Core -lGL

This causes the build to first look at the pre-installed libraries, which is completely wrong.

I suspect this is a general problem for all Qt5-based ports that use internal shared libraries.
Comment 1 Yuri Victorovich freebsd_committer 2016-06-20 22:21:53 UTC
This causes the link failure for th new version of this package 3.1.0
Comment 2 Yuri Victorovich freebsd_committer 2016-06-20 22:56:21 UTC
It should add -L/usr/local/lib after project-defined libs.
Comment 3 Marie Loise Nolden 2016-06-21 05:10:57 UTC
Hi Yuri,

we're well aware of the problem as it is a problem for upgrading Qt itself, too. OpenBSD has patched qmake for this purpose and I intend to make a similar patch upstream (that we backport).

The solution for you now is to deinstall the port first before compiling (similar to Qt itself)
Comment 4 Yuri Victorovich freebsd_committer 2016-06-21 05:53:15 UTC

To prevent similar complains I added an extra patching step to this port.
Comment 5 Tobias C. Berner freebsd_committer 2016-09-28 20:39:12 UTC
I close this for now.  As Loise mentions this is an upstream issue/feature/wontfix in qmake itself. We work around it for the Qt ports by using the .qmake.cache file (see bsd.qt.mk).
You could maybe adapt this hack for your port too.
Comment 6 Yuri Victorovich freebsd_committer 2016-11-03 08:13:02 UTC
Is there the upstream bug report number for this?
Comment 7 Tobias C. Berner freebsd_committer 2016-11-03 08:22:35 UTC
From bsd.qt.mk:
665	# See QTBUG-40825 and ports bugs 194088, 195105 and 198720.

In short: https://bugreports.qt.io/browse/QTBUG-40825

mfg Tobias
Comment 8 Yuri Victorovich freebsd_committer 2016-11-03 08:25:13 UTC