[odb-users] [Gentoo] dev-db/libodb-qt-2.4.0 build fails with Qt5

Boris Kolpackov boris at codesynthesis.com
Sun Aug 27 12:07:05 EDT 2017


pravorskyi.a at openmailbox.org <pravorskyi.a at openmailbox.org> writes:
 
> Strange, I have already sent message with config.log.

I just checked the mailing list spam inbox and there are not messages
from you. So looks like something on your side.

 
> config.log https://pastebin.com/Ret0fmqm


Ok, there are two issues:

> /usr/include/qt5/QtCore/qcompilerdetection.h:562:6: error: #error Qt
>   requires a C++11 compiler and yours does not seem to be that.

It looks like your version of Qt requires C++11 support ('-std=c++11'
GCC options, '--std c++11' ODB option).


> /usr/include/qt5/QtCore/qglobal.h:1113:4: error: #error "You must build
>   your code with position independent code if Qt was built with 
>   -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not 
>   enough)."

Again, Qt peculiarities. We've added this to the INSTALL file:

Note that if you are using Qt5 and building a static library, then you
may have to manually add the -fPIC C++ compiler flag to satisfy the Qt5
requirements, for example:

./configure CXXFLAGS="-fPIC -O3"


Boris



More information about the odb-users mailing list