Wireshark-bugs: [Wireshark-bugs] [Bug 11230] Compilation fails with qt5 5.4.1 and autotools due

Date: Sun, 05 Jul 2015 05:57:23 +0000

Comment # 17 on bug 11230 from
At least in Qt 5.3.2, the #if test for that error is

#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) &&
defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__)

So:

1) we only need to do this on ELF-based systems (for which read "not Windows,
not OS X, not AIX, not IRIX, not Tru64 UNIX, and not 32-bit HP-UX");

2) we only need to do this if Qt is built with -reduce-relocations.

I would vote for doing this, in both autotools *and* CMake, with a test that
attempts to compile, with the current set of compiler flags, a file that ends
up including the relevant Qt headers and, if it fails, add -fPIC.  (That might
be the wrong flag, though, for, say, Sun C.)  A test compile is probably the
only way to determine whether Qt is built with -reduce-relocations, so that's
probably the best way to determine if we need to compile as PIC.


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