Hello, this is an example of failure during configure step
configure:19582: checking whether a simple qt program can be built
configure:19593: g++ -o conftest -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/i386-gnu/qt5/QtCore -I/usr/include/i386-gnu/qt5 -fpic -specs=/usr/share/dpkg/pie-link.specs -Wl,-z,relro -Wl,-z,now conftest.cpp -lQt5Core >&5
In file included from /usr/include/i386-gnu/qt5/QtCore/qcoreapplication.h:43:0,
from /usr/include/i386-gnu/qt5/QtCore/QCoreApplication:1,
from conftest.cpp:32:
/usr/include/i386-gnu/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)."
# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
and this is a trivial patch that fixes the problem in Debian and Ubuntu, where pie is default
Description: Use -fPIC instead of -fpic.
Author: Adam Conrad <adconrad@ubuntu.com>
Last-Update: 2017-05-12
Index: gpgme1.0-1.8.0/m4/qt.m4
===================================================================
--- gpgme1.0-1.8.0.orig/m4/qt.m4
+++ gpgme1.0-1.8.0/m4/qt.m4
@@ -24,8 +24,9 @@ AC_DEFUN([FIND_QT],
[have_qt5test_libs="no"])
if ! test "$have_w32_system" = yes; then
+ GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS -shared"
if "$PKG_CONFIG" --variable qt_config Qt5Core | grep -q "reduce_relocations"; then
- GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS -fpic"
+ GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS -fPIC"
fi
fi
if test "$have_qt5_libs" = "yes"; then
please have a look at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870383 for more information and background!
thanks!
Gianfranco