Bug 204923 - devel/qt4-moc: Build fails with compilers not called "clang" or "gcc"
Summary: devel/qt4-moc: Build fails with compilers not called "clang" or "gcc"
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords: needs-qa
: 200467 217762 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-30 22:15 UTC by mikhail.rokhin
Modified: 2018-06-21 21:43 UTC (History)
6 users (show)

See Also:
koobs: maintainer-feedback? (kde)


Attachments
gcc-clang-error-log-qt4.zip (6.69 KB, application/x-zip-compressed)
2015-12-01 16:47 UTC, mikhail.rokhin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mikhail.rokhin 2015-11-30 22:15:53 UTC
By any gcc fails to detect target system byte order.
Comment 1 mikhail.rokhin 2015-11-30 22:31:01 UTC
It seems that all qt4 bunch fails the same way, unable to detect byte order with any version of gcc, only clang works.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-01 03:11:46 UTC
@Mikhail Please include (as attachments please) complete build logs for both GCC and Clang
Comment 3 mikhail.rokhin 2015-12-01 16:47:51 UTC
Created attachment 163716 [details]
gcc-clang-error-log-qt4.zip
Comment 4 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-01 17:18:36 UTC
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.
Comment 5 mikhail.rokhin 2015-12-01 20:09:33 UTC
(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).
Comment 6 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-01 21:39:02 UTC
> Clang build log shows success

I saw the "required shared library ... not found" messages and thought they were a problem.
Comment 7 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-01 22:04:56 UTC
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)?
Comment 8 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-03 14:50:43 UTC
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
Comment 9 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-03 17:27:43 UTC
Retitling once again because this also affects, for example, clang36.
Comment 10 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-03 17:28:23 UTC
*** Bug 200467 has been marked as a duplicate of this bug. ***
Comment 11 Marie Loise Nolden 2016-06-07 18:43:07 UTC
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.
Comment 12 Walter Schwarzenfeld 2018-02-07 10:05:58 UTC
Is this still relevant?
Comment 13 Walter Schwarzenfeld 2018-02-28 16:48:48 UTC
*** Bug 217762 has been marked as a duplicate of this bug. ***