Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610782 - dev-qt/qtcore:5 - qconfig.pri stores compiler settings
Summary: dev-qt/qtcore:5 - qconfig.pri stores compiler settings
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Qt Bug Alias
Depends on: 649420
  Show dependency tree
Reported: 2017-02-24 09:10 UTC by Alexey
Modified: 2022-03-18 03:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

build.log (build.log,227.16 KB, text/plain)
2017-02-24 09:12 UTC, Alexey
build environment (environment,133.57 KB, text/plain)
2017-02-24 09:13 UTC, Alexey
emerge --info '=app-text/calibre-2.78.0::gentoo' (emerge-info.txt,18.51 KB, text/plain)
2017-02-24 09:13 UTC, Alexey
generated from build dir (,1.67 KB, text/plain)
2017-02-24 09:15 UTC, Alexey
generated Makefile (Makefile,28.28 KB, text/x-matlab)
2017-02-24 09:15 UTC, Alexey
/usr/lib/qt5/mkspecs/qconfig.pri refering to clang (qconfig.pri,1.25 KB, text/plain)
2017-02-24 09:16 UTC, Alexey

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2017-02-24 09:10:47 UTC
I have 2 compilers installed: sys-devel/clang-3.9.0-r100 and sys-devel/gcc-4.9.4
make.conf contains CXX="clang++"
With this setup calibre couldn't be built with neither clang nor gcc. Regardless of CXX chosen, calibre compiles some stuff using clang++, some stuff using g++.

The error message: g++: error: unrecognized command line option ‘-std=c++1z’

I found this in one of generated Makefiles:
CC            = gcc
CXX           = g++
CXXFLAGS      = -pipe -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC $(DEFINES)

And in /usr/lib/qt5/mkspecs/qconfig.pri:
QT_CONFIG += ... c++11 c++14 c++1z ...

When I tried to run qmake directly on a test minimal .pro, it generated correct Makefile.
When I rebuilt qtcore with gcc, it built calibre successfully, but some parts of calibre were using clang anyway (I had CXX=clang++ at that moment). I guess the errors would be reverse if gcc were new enough to support -std=c++1z and clang old enough to not support it.

Reproducible: Always

Steps to Reproduce:
1. Compile qtcore with clang
2. Try to compile calibre
Actual Results:  

Expected Results:  
Comment 1 Alexey 2017-02-24 09:12:03 UTC
Created attachment 464968 [details]
Comment 2 Alexey 2017-02-24 09:13:08 UTC
Created attachment 464970 [details]
build environment
Comment 3 Alexey 2017-02-24 09:13:58 UTC
Created attachment 464972 [details]
emerge --info '=app-text/calibre-2.78.0::gentoo'
Comment 4 Alexey 2017-02-24 09:15:20 UTC
Created attachment 464974 [details]
generated from build dir
Comment 5 Alexey 2017-02-24 09:15:49 UTC
Created attachment 464976 [details]
generated Makefile
Comment 6 Alexey 2017-02-24 09:16:57 UTC
Created attachment 464978 [details]
/usr/lib/qt5/mkspecs/qconfig.pri refering to clang