File wireshark-1.12.6-fix-QT-PIC-PIE.patch of Package wireshark
From: Andreas Stieger <email@example.com>
Date: Mon, 13 Jul 2015 11:30:56 +0200
Subject: Compilation fails with qt5 5.4.1 and autotools due to lack of -fPIC
Upstream: not yet
Workaround for compilation error on Factory:
[ 1248s] In file included from /usr/include/qt5/QtGui/qwindowdefs.h:37:0,
[ 1248s] from /usr/include/qt5/QtWidgets/qwidget.h:37,
[ 1248s] from /usr/include/qt5/QtWidgets/qframe.h:37,
[ 1248s] from /usr/include/qt5/QtWidgets/QFrame:1,
[ 1248s] from accordion_frame.h:25,
[ 1248s] from accordion_frame.cpp:26:
[ 1248s] /usr/include/qt5/QtCore/qglobal.h:1052: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)."
[ 1248s] # error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
[ 1248s] ^
Should be considered a temporary fix.
Some discussion: https://build.opensuse.org/request/show/314996
@@ -1079,18 +1079,18 @@ AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-nee
# in the address space to make attacks more difficult.
if test "x$can_add_to_cflags" = "xyes"
# Restore CFLAGS
- AC_WIRESHARK_LDFLAGS_CHECK([-fPIE -pie])
+ AC_WIRESHARK_LDFLAGS_CHECK([-fPIC -pie])
if test "x$LDFLAGS" != "x$LDFLAGS_before_pie"
# We can use PIE
# Restore LDFLAGS