Created attachment 521974 [details] dev-qt:qtcore-5.9.4-r2:20180302-204458.log.xz * Running emake INSTALL_ROOT=/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/image/ sub-qmake-qmake-aux-pro-install_subtargets install_syncqt install_mkspecs gmake -j1 INSTALL_ROOT=/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/image/ sub-qmake-qmake-aux-pro-install_subtargets install_syncqt install_mkspecs cd qmake/ && ( test -e Makefile.qmake-aux || /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/bin/qmake -o Makefile.qmake-aux /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake/qmake-aux.pro ) && gmake -f Makefile.qmake-aux install gmake[1]: Entering directory '/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake' gmake binary gmake[2]: Entering directory '/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake' clang++ -c -o qlibraryinfo_final.o -std=c++11 -ffunction-sections -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake/library -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake/generators -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake/generators/unix -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake/generators/win32 -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake/generators/mac -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/5.9.4 -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/5.9.4/QtCore -I../src/corelib/global -I/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/mkspecs/freebsd-clang -DQT_VERSION_STR=\"5.9.4\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=9 -DQT_VERSION_PATCH=4 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/src/corelib/global/qlibraryinfo.cpp In file included from /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/src/corelib/global/qlibraryinfo.cpp:41: In file included from /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/qdir.h:1: In file included from /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/../../src/corelib/io/qdir.h:43: In file included from /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/qstring.h:1: In file included from /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/../../src/corelib/tools/qstring.h:48: In file included from /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/qchar.h:1: In file included from /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/../../src/corelib/tools/qchar.h:43: In file included from /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/qglobal.h:1: /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/include/QtCore/../../src/corelib/global/qglobal.h:45:12: fatal error: 'type_traits' file not found # include <type_traits> ^ 1 error generated. gmake[2]: *** [Makefile:272: qlibraryinfo_final.o] Error 1 gmake[2]: Leaving directory '/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake' gmake[1]: *** [Makefile.qmake-aux:239: /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake/qmake] Error 2 gmake[1]: Leaving directory '/var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/qmake' gmake: *** [Makefile:136: sub-qmake-qmake-aux-pro-install_subtargets] Error 2 The compiler used for the build is gcc, and so here gcc should be used as well.
Created attachment 521976 [details] e-info.txt
I'm actually surprised it got that far, I don't think anybody has ever tried building on freebsd in a serious way. From the build log: > FreeBSD 10 autotools fix applied to /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/configure What does this do exactly? Qt configure is not autotools-generated. > Build type: freebsd-clang (x86_64, CPU features: mmx sse sse2) The eclass needs to force 'freebsd-g++' if the compiler is gcc. I suspected this was going to be an issue since there's no explicit mkspec handling in the eclass.
(In reply to Davide Pesavento from comment #2) > I'm actually surprised it got that far, I don't think anybody has ever tried > building on freebsd in a serious way. > > From the build log: > > > FreeBSD 10 autotools fix applied to /var/tmp/portage/dev-qt/qtcore-5.9.4-r2/work/qtbase-opensource-src-5.9.4/configure > > What does this do exactly? Qt configure is not autotools-generated. Nothing in this case, I suppose. It calls some eltpatch magic that does nothing if no patch applies. Curious enough, if I uninstall clang altogether I get: Project ERROR: Cannot run compiler 'clang++'. Output: =================== sh: clang++: not found =================== Maybe you forgot to setup the environment?
(In reply to Davide Pesavento from comment #2) > The eclass needs to force 'freebsd-g++' if the compiler is gcc. I suspected > this was going to be an issue since there's no explicit mkspec handling in > the eclass. Could you estimate how hard it would be to fix and what would be the ETA for some fix? I'm trying to fix depgraph breakage on amd64-fbsd and to do that, I either need to keyword qt5 or dekeyword kdelibs & revdeps, so I'd like to know which way to go.
Created attachment 521982 [details, diff] Potential fix This patch (for qt.git repository) might help. (Only tested with dev-qt/qtcore-5.11.9999 on Linux.)
I suppose that could work. I guess it will still use random 'g++' instead of my CXX, correct?
I can confirm that the attached patch make Qt5 build on FreeBSD.
(In reply to Michał Górny from comment #6) > I guess it will still use random 'g++' instead of my CXX, correct? In minimal number of places (as described in bug #649420). It is still a good idea to pass -platform option since qmake configuration files set slightly differing flags for GCC and Clang: https://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/common/g++-base.conf https://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/common/clang.conf
It would be even better to come up with our own platform that overrides upstream customizations and fully respects all system variables.
(In reply to Michał Górny from comment #9) > It would be even better to come up with our own platform that overrides > upstream customizations and fully respects all system variables. We cannot do that. Many qmake project files match against the mkspec name to do conditional things, so a custom mkspec name would break pretty much everything. Nevertheless, qt5-build.eclass tries to respect all build flags. Needless to say, that's always the ultimate goal. But the build system is complex and changes in incompatible ways almost at each release, for instance there was a major overhaul in 5.8 and I don't think we're 100% done adapting our eclass/ebuilds yet. And then there's the chronic lack of manpower...
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=c0679fd90abb0e90205754a2e41bcb3dc97e31e5 commit c0679fd90abb0e90205754a2e41bcb3dc97e31e5 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2018-03-03 03:15:19 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2018-03-07 12:47:13 +0000 qt5-build.eclass: Pass -platform option to configure on FreeBSD and Linux. Bug: https://bugs.gentoo.org/649406 eclass/qt5-build.eclass | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)}
I modified the patch to apply to 5.10 and later and pushed to the overlay for testing.
We could unconditionally apply *only the freebsd portion* to gentoo.git, so that mgorny can continue his testing/keywording on amd64-fbsd. The rest can wait, to avoid disrupting 5.9.4 stabilization.
(In reply to Davide Pesavento from comment #13) > We could unconditionally apply *only the freebsd portion* to gentoo.git, so > that mgorny can continue his testing/keywording on amd64-fbsd. The rest can > wait, to avoid disrupting 5.9.4 stabilization. That would work for me, thanks.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=2387fb8372d617c08ad5a63404c1699cd0a0d3b5 commit 2387fb8372d617c08ad5a63404c1699cd0a0d3b5 Author: Michael Palimaka <kensington@gentoo.org> AuthorDate: 2018-03-10 01:54:38 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2018-03-10 01:55:44 +0000 qt5-build.eclass: remove version conditional for passing -platform on freebsd Bug: https://bugs.gentoo.org/649406 eclass/qt5-build.eclass | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)}
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc29c68cf0dc302a94d1e1f11c95a6e17511381b commit dc29c68cf0dc302a94d1e1f11c95a6e17511381b Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2018-03-03 03:15:19 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2018-03-12 00:49:53 +0000 qt5-build.eclass: Pass -platform option to configure on FreeBSD and Linux. Closes: https://bugs.gentoo.org/649406 eclass/qt5-build.eclass | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)