Wireshark-bugs: [Wireshark-bugs] [Bug 11901] dpkg-buildpackage relocation R_X86_64_PC32 against
Date: Thu, 17 Dec 2015 10:29:05 +0000

Comment # 3 on bug 11901 from
I fetched master-2.0:

  wireshark-2.0.0-184-g6bf1d96

same problem though:

    DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --export

    export CFLAGS="-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security"
    export CPPFLAGS="-D_FORTIFY_SOURCE=2"
    export CXXFLAGS="-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security"
    export FFLAGS="-g -O2"
    export LDFLAGS="-fPIE -pie -Wl,-z,relro -Wl,-z,now"

    mkdir build
    cd build
    cmake ../
    make wsutil
    Linking C shared library ../run/libwsutil.so
    /usr/bin/ld: CMakeFiles/wsutil.dir/privileges.c.o: relocation R_X86_64_PC32
against symbol `started_with_special_privs' can not be used when making a
shared object; recompile with -fPIC
    /usr/bin/ld: final link failed: Bad value
    collect2: error: ld returned 1 exit status
    make[3]: *** [run/libwsutil.so.6.0.0] Error 1
    make[2]: *** [wsutil/CMakeFiles/wsutil.dir/all] Error 2
    make[1]: *** [wsutil/CMakeFiles/wsutil.dir/rule] Error 2
    make: *** [wsutil] Error 2

When disabling pie, it builds:

    DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie dpkg-buildflags --export
    ...
    Linking C shared library ../run/libwsutil.so
    [100%] Built target wsutil

Alternatively -Wl,-Bsymbolic

    export LDFLAGS="-fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,-Bsymbolic"

    Linking C shared library ../run/libwsutil.so
    [100%] Built target wsutil


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