#808822 insufficient flags in pkgconfig --cflags

Package:
qtbase5-dev
Source:
qtbase-opensource-src
Description:
Qt 5 base development files
Submitter:
Goswin von Brederlow
Date:
2025-12-15 17:39:09 UTC
Severity:
normal
Tags:
#808822#5
Date:
2015-12-23 12:53:01 UTC
From:
To:
When building a trivial test case the following error appears:

% g++ -O2 -W -Wall -g $(pkg-config --cflags Qt5Widgets) -c foo.cc
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:37:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qapplication.h:37,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QApplication:,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1067: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)."
 #  error "You must build your code with position independent code if Qt was bui
    ^

Why isn't -fPIC included in the cflags?

MfG
	Goswin