Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 610782

Summary: dev-qt/qtcore:5 - qconfig.pri stores compiler settings
Product: Gentoo Linux Reporter: Alexey <alexey+gentoo>
Component: Current packagesAssignee: Qt Bug Alias <qt>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=595574
https://bugs.gentoo.org/show_bug.cgi?id=784620
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 649420    
Bug Blocks:    
Attachments: build.log
build environment
emerge --info '=app-text/calibre-2.78.0::gentoo'
generated headless.pro from build dir
generated Makefile
/usr/lib/qt5/mkspecs/qconfig.pri refering to clang

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
3.
Actual Results:  
Error

Expected Results:  
Success
Comment 1 Alexey 2017-02-24 09:12:03 UTC
Created attachment 464968 [details]
build.log
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 headless.pro 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