Wireshark mailing list archives
Build wireshark-qt with Clang : -fPIC or -fPIE
From: Alexis La Goutte <alexis.lagoutte () gmail com>
Date: Thu, 7 Nov 2013 14:34:32 +0100
Hi,
When i try to build wireshark-qt with clang (and autotools) i have the
following error message :
dev:~/wireshark-clang/ui/qt$ make
CXX accordion_frame.o
In file included from /usr/include/qt5/QtGui/qwindowdefs.h:45:0,
from /usr/include/qt5/QtWidgets/qwidget.h:45,
from /usr/include/qt5/QtWidgets/qframe.h:45,
from /usr/include/qt5/QtWidgets/QFrame:1,
from accordion_frame.h:27,
from accordion_frame.cpp:28:
/usr/include/qt5/QtCore/qglobal.h:1079:4: error: #error "You must build
your code with position independent code if Qt was built with
-reduce-relocations. " "Compile your code with -fPIC or -fPIE."
# error "You must build your code with position independent code if Qt
was built with -reduce-relocations. "\
^
I fixed the issue with :
--- a/configure.ac
+++ b/configure.ac
@@ -927,7 +927,7 @@ AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-needed])
# in the address space to make attacks more difficult.
#
CFLAGS_before_pie=$CFLAGS
-AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fPIE, C)
+AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fPIE)
if test "x$CLFAGS" != "x$CFLAGS_before_pie"
then
# Restore CFLAGS
There is any reason to limit -fPIE to only C ?
Regards,
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Build wireshark-qt with Clang : -fPIC or -fPIE Alexis La Goutte (Nov 07)
- Re: Build wireshark-qt with Clang : -fPIC or -fPIE Evan Huus (Nov 07)
- Re: Build wireshark-qt with Clang : -fPIC or -fPIE Alexis La Goutte (Nov 15)
- Re: Build wireshark-qt with Clang : -fPIC or -fPIE Evan Huus (Nov 07)
