• Bug#867553: thunderbird: Please add --disable-pie to ac_add_options on

    From John Paul Adrian Glaubitz@21:1/5 to All on Fri Jul 7 13:00:01 2017
    XPost: linux.debian.bugs.dist

    This is a multi-part MIME message sent by reportbug.


    Source: icedove
    Version: 1:52.2.1-4
    Severity: normal
    Tags: patch
    User: debian-superh@lists.debian.org
    Usertags: sh4

    Hi!

    Thunderbird currently fails to build from source on sh4 because it
    tries to build with PIE enabled which is currently disabled in the
    toolchain on sh4 as some packages segfault when built with PIE.

    Without passing --disable-pie for sh4, the build fails at the configure
    stage:

    configure: error: --enable-pie requires PIE support from the linker.
    DEBUG: <truncated - see config.log for full output>
    DEBUG: /usr/bin/ld: unrecognized option '--icf=safe'
    DEBUG: /usr/bin/ld: use the --help option for usage information
    DEBUG: collect2: error: ld returned 1 exit status
    DEBUG: configure:6533: checking whether removing dead symbols breaks debugging DEBUG: configure:6540: /usr/bin/gcc -std=gnu99 -o conftest.o -fno-lifetime-dse -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-delete-null-pointer-checks -fno-schedule-insns2 -fno-lifetime-dse -
    fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -g -c conftest.c 1>&2
    DEBUG: configure:6541: /usr/bin/gcc -std=gnu99 -o conftest -Wl,-z,relro -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -Wl,--stats -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -g -Wl,--gc-sections conftest.o 1>&2
    DEBUG: /usr/bin/ld: total time in link: 0.064000
    DEBUG: /usr/bin/ld: data size 1773568
    DEBUG: configure:6592: checking for PIE support
    DEBUG: configure:6603: /usr/bin/gcc -std=gnu99 -o conftest -fno-lifetime-dse -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-delete-null-pointer-checks -fno-schedule-insns2 -fno-lifetime-dse -
    fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -Wl,--stats -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -fPIC -pie conftest.c 1>&5
    DEBUG: /usr/bin/ld: read-only segment has dynamic relocations.
    DEBUG: collect2: error: ld returned 1 exit status
    DEBUG: configure: failed program was:
    DEBUG: #line 6596 "configure"
    DEBUG: #include "confdefs.h"
    DEBUG:
    DEBUG: int main() {
    DEBUG:
    DEBUG: ; return 0; }
    DEBUG: configure: error: --enable-pie requires PIE support from the linker. ERROR: old-configure failed
    *** Fix above errors and then restart with\
    "/usr/bin/make -f client.mk build"
    client.mk:360: recipe for target 'configure' failed
    make[2]: *** [configure] Error 1

    This is fixed by adding "--disable-pie" to ac_add_options for sh4 in debian/mozconfig.default. I am attaching a patch for this change.

    Thanks,
    Adrian

    --

    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    diff -Nru thunderbird.orig/icedove-52.2.1/debian/mozconfig.default thunderbird/icedove-52.2.1/debian/mozconfig.default
    --- thunderbird.orig/icedove-52.2.1/debian/mozconfig.default 2017-07-06 16:31:09.000000000 +0200
    +++ thunderbird/icedove-52.2.1/debian/mozconfig.default 2017-07-07 11:42:44.667306922 +0200
    @@ -114,6 +114,9 @@
    ac_add_options --disable-optimize
    ac_add_options --without-intl-api
    ;;
    + sh4)
    + ac_add_options --disable-pie
    + ;;
    sparc)
    ac_add_options --enable-optimize=-O1
    ac_add_options --without-intl-api

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)