Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 11643] build error on Debian testing: Couldn't compile Qt

Date: Fri, 06 Nov 2015 23:35:34 +0000

Comment # 6 on bug 11643 from
Sigh, GCC 5 / Qt 5 is a mess. Aside, for those who want to learn the
differences between -fPIC, -fPIE and no such flag, see
http://www.openbsd.org/papers/nycbsdcon08-pie/.

set(CMAKE_POSITION_INDEPENDENT_CODE on) enables -fPIE for executables and -fPIC
for libraries (which is done by default on Linux x86_64). -fPIE is already
added for dumpcap on autotools, it would be a nice addition for cmake and all
other binaries.

Apparently Qt5 + GCC 5 is broken with -fPIE which makes Qt cry aloud. For some
reason the compile check from https://code.wireshark.org/review/11079 results
in -fPIC -fPIE being tested which makes Qt unhappy.

On Debian testing, reverting 08a20705b4d03cb4460e13d3c270077930a75310, removing
the whole Qt5Widgets_EXECUTABLE_COMPILE_FLAGS check and removing fPIC from the
flags all fix the build (as does building with Clang instead of GCC). (I guess
that removing -fPIC is possible because CMAKE_POSITION_INDEPENDENT_CODE is
set).

Unconditionally removing fPIC should not hurt on modern versions of cmake, but
for older versions... I don't know. Let's try to revert the patch and remove
the flag for MSVC only.


You are receiving this mail because:
  • You are watching all bug changes.