Summary: | devel/qt5-qmake: fails to build when CXX contains absolute path | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Mikael Urankar <mikael> | ||||
Component: | Individual Port(s) | Assignee: | freebsd-kde (group) <kde> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Many People | CC: | jbeich, w.schwarzenfeld | ||||
Priority: | --- | Keywords: | regression | ||||
Version: | Latest | Flags: | rakuco:
maintainer-feedback+
|
||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Mikael Urankar
2018-01-07 13:11:15 UTC
I see the following diff in the configure phase: -platform freebsd-$(ccver="$(c++ --version)" (with make CXX=c++) -platform c++ --version)" (with make CXX=/usr/bin/c++) The following patch fixes the problem for me but I don't know why the T modifier was added: Index: bsd.qt.mk =================================================================== --- bsd.qt.mk (revision 458335) +++ bsd.qt.mk (working copy) @@ -135,7 +135,7 @@ -demosdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/demos . else CONFIGURE_ARGS+=-nomake examples -nomake tests \ - -platform ${QMAKESPEC:T} \ + -platform ${QMAKESPEC} \ -archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \ -libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \ -qmldir ${PREFIX}/${QT_QMLDIR_REL} \ Created attachment 189491 [details] Revert unintended change /nxb-bin/usr/bin/c++ is a cross compiler created by a poudriere jail -x. On https://pkg-status.freebsd.org/ that'd be builders for mips, mips64, armv6, armv7. To reproduce on amd64 host the following would be enough: # -x (native-xtools) before FreeBSD 12.0 requires /usr/src to match jail $ svn checkout https://svn.freebsd.org/base/releng/11.1 /usr/src $ poudriere jail -cxj 111aarch64 -a arm64.aarch64 -v 11.1-RELEASE $ poudriere bulk -Ctj 111aarch64 devel/qt5-qmake or $ poudriere jail -cxj head-aarch64 -a arm64.aarch64 -v head -m svn+https $ poudriere bulk -Ctj head-aarch64 devel/qt5-qmake The build broke because CONFIGURE_ARGS now tries to chop directory off QMAKESPEC , something completely unnecessary given the expression never evaluates to any other string than "clang" or "g++". However, qt5-qmake doesn't really respect CXX and calls clang++ instead which ends up being emulated via qemu-user-static rather than use cross-compiler. Oops, forgot to refresh the page in browser. ;) A commit references this bug: Author: rakuco Date: Sun Jan 7 15:03:08 UTC 2018 New revision: 458339 URL: https://svnweb.freebsd.org/changeset/ports/458339 Log: Correctly pass -platform to qtbase's configure script when CXX is an absolute path. With the update to Qt 5.9.3, the configure script and qmake expect an mkspec name, not an absolute path, which is why r458293 switched to using ${QMAKESPEC:T}. However, the :T modifier breaks things when CXX is set to an absolute path instead of just "c++", QMAKE_COMPILER is a shell string that will be evaluated only after make invokes `configure' with CONFIGURE_ARGS. In other words, we end up turning something like $$(ccver="$$(/usr/bin/c++ --version)"; case "$$ccver" in *clang*) echo clang ;; *) echo g++ ;; esac) into /c++ --version)"; case "$$ccver" in *clang*) echo clang ;; *) echo g++ ;; esac) which is obviously invalid. We now just avoid being too smart and set a separate variable called QMAKESPECNAME, which contains only the mkspec name and that we use both when setting CONFIGURE_ARGS as well as to create QMAKESPEC. PR: 224971 Changes: head/Mk/bsd.qt.mk Comment on attachment 189491 [details]
Revert unintended change
The change was actually intended, it's just the implementation that was buggy. r458339 contains a better explanation for why this is needed.
Thanks for the report, everything should be working fine now. |