By any gcc fails to detect target system byte order.
It seems that all qt4 bunch fails the same way, unable to detect byte order with any version of gcc, only clang works.
@Mikhail Please include (as attachments please) complete build logs for both GCC and Clang
Created attachment 163716 [details] gcc-clang-error-log-qt4.zip
Which FreeBSD release are you using? Do you have any form of non-standard setup (NFS, ports installed in a place other than /usr/local etc)? The GCC error looks related to GCC6, but the clang one seems to be caused by some problem in pkg(1) itself in your system.
(In reply to Raphael Kubo da Costa from comment #4) 10.2-release amd64 Everything is by default. Clang build log shows success, as it's mentioned in title, the only gcc fails (any version, not GCC6 only).
> Clang build log shows success I saw the "required shared library ... not found" messages and thought they were a problem.
I'm trying to check GCC now. I'm on HEAD here, installed lang/gcc and tried building the port like this: % env CC=gcc CXX=g++ make clean configure It worked fine. What different steps did you follow when trying out lang/gcc (as you said it's not GCC6 that is failing)?
Answering myself: lang/gcc and base gcc work because they provide binaries called "gcc" and "g++". The other ports have a version suffix in the binaries ("gcc48", "gcc6" etc), however the mkspec file we ship for GCC (freebsd-g++) assume the binaries do not have any suffix, so the configuration tests all fail like this: floatmath auto-detection... () g++ -c -pipe -O2 -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -fno-strict-aliasing -O2 -Wall -W -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt4 -I/usr/local/include -o floatmath.o floatmath.cpp /bin/sh: g++: not found *** Error code 127
Retitling once again because this also affects, for example, clang36.
*** Bug 200467 has been marked as a duplicate of this bug. ***
I'm working on this in upstream. I wouldn't consider this a bug, though the problem remains that for each new compiler version with a renamed compiler call you need to change the mkspecs of Qt (not just qt4 but also qt5). The original sources had an unsupported/freebsd-g++46 mkspec which we remove in qt5-qmake intentionally and is now even removed in upstream. OpenBSD has similar issues, also NetBSD (and just about anyone who has a renamed compiler for co-existence with default compilers on a system). I'll try to do a test with a $CC and $CXX mkspec that would probably work for everyone. Compiling qt from source would be simplified to test with different compilers then also. The issue reported though is not a bug, it's just the way qmake and the mkspecs are organized since ages.
Is this still relevant?
*** Bug 217762 has been marked as a duplicate of this bug. ***