Bug 210418

Summary: devel/qmake5: qmake adds -L/usr/local/lib ahead of LIBS causing build to use the old versions of libraries
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: loise, tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   

Description Yuri Victorovich freebsd_committer freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 2016-06-21 05:53:15 UTC
Thanks.

To prevent similar complains I added an extra patching step to this port.
Comment 5 Tobias C. Berner freebsd_committer freebsd_triage 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 freebsd_triage 2016-11-03 08:13:02 UTC
Is there the upstream bug report number for this?
Comment 7 Tobias C. Berner freebsd_committer freebsd_triage 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 freebsd_triage 2016-11-03 08:25:13 UTC
Thanks!