Created attachment 202236 [details] patch Qt 5.12.1 made building with GCC on FreeBSD fail. Fix this by adding relevant system directories to QMAKE_DEFAULT_INCDIRS and QMAKE_DEFAULT_LIBDIRS since they are not added automatically when building with GCC (only with Clang). Also add %%LOCALBASE%%/lib/gcc%%GCC_DEFAULT%%/include and %%LOCALBASE%%/lib/gcc%%GCC_DEFAULT%%/include/c++ to EXTRA_INCLUDEPATH so that headers in those directories are detected during configuring. Tested by Poudriere build of devel/qt5 on powerpc64 and amd64. Hardware sponsored by IntegriCloud.
Created attachment 202578 [details] v2 Remove the commented out lines used for debugging.
Created attachment 202806 [details] v3 Add the part with devel/qt5/files/extrapatch-mkspecs_common_bsd_bsd.conf, removed earlier by mistake.
Sorry forcthe timeout. I'll look at it this weekend. Mfg Tobias
> - ${ECHO_CMD} 'QMAKE_DEFAULT_LIBDIRS = ${LOCALBASE}/lib' >> ${CONFIGURE_WRKSRC}/.qmake.cache > - ${ECHO_CMD} 'QMAKE_DEFAULT_INCDIRS = ${LOCALBASE}/include' >> ${CONFIGURE_WRKSRC}/.qmake.cache > + ${ECHO_CMD} 'QMAKE_DEFAULT_LIBDIRS += ${LOCALBASE}/lib /usr/lib /lib' >> ${CONFIGURE_WRKSRC}/.qmake.cache > + ${ECHO_CMD} 'QMAKE_DEFAULT_INCDIRS += ${LOCALBASE}/include /usr/include' >> ${CONFIGURE_WRKSRC}/.qmake.cache Can you explain why this is necessary? /usr/lib, /lib and /usr/include should all be part of the standard search paths. > ++EXTRA_INCLUDEPATH += %%LOCALBASE%%/lib/gcc%%GCC_DEFAULT%%/include %%LOCALBASE%%/lib/gcc%%GCC_DEFAULT%%/include/c++ Wouldn't that cause those lines to be included even one's not using GCC? Plus, aren't those added automatically by GCC itself?
(In reply to Raphael Kubo da Costa from comment #4) "Can you explain why this is necessary? /usr/lib, /lib and /usr/include should all be part of the standard search paths." Apparently that is true when you build using Clang, but not when using GCC. "Wouldn't that cause those lines to be included even one's not using GCC? Plus, aren't those added automatically by GCC itself?" I tried building QT with this patch on amd64 with Clang, it works. GCC from ports doesn't add those arguments automatically.
A commit references this bug: Author: pkubaj Date: Tue Apr 16 17:31:19 UTC 2019 New revision: 499101 URL: https://svnweb.freebsd.org/changeset/ports/499101 Log: Fix build when using GCC. Needed by GCC architectures. Tested for no breakage on amd64 with Clang. PR: 235921 Reviewed by: tcberner Approved by: tcberner (mentor) Changes: head/Mk/Uses/qt-dist.mk head/devel/qt5/files/extrapatch-mkspecs_common_bsd_bsd.conf
Fixed.
A commit references this bug: Author: tcberner Date: Tue Apr 16 19:37:12 UTC 2019 New revision: 499116 URL: https://svnweb.freebsd.org/changeset/ports/499116 Log: devel/qt5: Follow-up to r499101 - Move the GCC related path fix into freebsd-g++/qmake.conf Otherwise the inclusion of the GCC path would break clang based systems when gcc-${GCC_DEFAULT} was installed. - This might break GCC architectures again, and if so, that will be fixed in a follow up commit. PR: 235921 Changes: head/Mk/Uses/qt-dist.mk head/devel/qt5/files/extrapatch-mkspecs_common_bsd_bsd.conf head/devel/qt5/files/extrapatch-mkspecs_freebsd-g++_qmake.conf
A commit references this bug: Author: tcberner Date: Sat May 25 20:53:13 UTC 2019 New revision: 502634 URL: https://svnweb.freebsd.org/changeset/ports/502634 Log: MFH: r499101 r499116 r502628 Fix build when using GCC. Needed by GCC architectures. Tested for no breakage on amd64 with Clang. PR: 235921 Reviewed by: tcberner Approved by: tcberner (mentor) devel/qt5: Follow-up to r499101 - Move the GCC related path fix into freebsd-g++/qmake.conf Otherwise the inclusion of the GCC path would break clang based systems when gcc-${GCC_DEFAULT} was installed. - This might break GCC architectures again, and if so, that will be fixed in a follow up commit. PR: 235921 qt5: fix build on gcc architectures - the sed call was only replacing one of the %%LOCALBASE%% by ${LOCALBASE}, due to the missing 'g' flag to the sed call. - with this change the gcc architectures should be able to build Qt5 again. PR: 237745 Submitted by: Mark Millard <marklmi26-fbsd@yahoo.com>, jwb Reported by: pkubaj Approved by: ports-secteam (joneum via irc) Changes: _U branches/2019Q2/ branches/2019Q2/Mk/Uses/qt-dist.mk branches/2019Q2/devel/qt5/files/extrapatch-mkspecs_freebsd-g++_qmake.conf branches/2019Q2/devel/qt5-qmake/Makefile
A commit references this bug: Author: tcberner Date: Sat May 25 20:53:14 UTC 2019 New revision: 502634 URL: https://svnweb.freebsd.org/changeset/ports/502634 Log: MFH: r499101 r499116 r502628 Fix build when using GCC. Needed by GCC architectures. Tested for no breakage on amd64 with Clang. PR: 235921 Reviewed by: tcberner Approved by: tcberner (mentor) devel/qt5: Follow-up to r499101 - Move the GCC related path fix into freebsd-g++/qmake.conf Otherwise the inclusion of the GCC path would break clang based systems when gcc-${GCC_DEFAULT} was installed. - This might break GCC architectures again, and if so, that will be fixed in a follow up commit. PR: 235921 qt5: fix build on gcc architectures - the sed call was only replacing one of the %%LOCALBASE%% by ${LOCALBASE}, due to the missing 'g' flag to the sed call. - with this change the gcc architectures should be able to build Qt5 again. PR: 237745 Submitted by: Mark Millard <marklmi26-fbsd@yahoo.com>, jwb Reported by: pkubaj Approved by: ports-secteam (joneum via irc) Changes: _U branches/2019Q2/ branches/2019Q2/Mk/Uses/qt-dist.mk branches/2019Q2/devel/qt5/files/extrapatch-mkspecs_freebsd-g++_qmake.conf branches/2019Q2/devel/qt5-qmake/Makefile