From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10658 Path: news.gmane.org!.POSTED!not-for-mail From: Samuel Sadok Newsgroups: gmane.linux.lib.musl.general Subject: Unable to build with --enable-shared Date: Sat, 22 Oct 2016 22:37:46 +0200 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1477168714 19118 195.159.176.226 (22 Oct 2016 20:38:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 20:38:34 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10671-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 22 22:38:29 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1by33L-0001Zm-Ee for gllmg-musl@m.gmane.org; Sat, 22 Oct 2016 22:38:03 +0200 Original-Received: (qmail 16348 invoked by uid 550); 22 Oct 2016 20:38:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 16316 invoked from network); 22 Oct 2016 20:37:59 -0000 X-Authenticated-Sender-Id: innovation-labs@appinstall.ch X-Gm-Message-State: ABUngvd1n54IvEqAy/KYEMAvd7JRGnM+dsR5bWKypwCd4v0zSkEt6d71JJr8c0C7eQHPKahpDSY/XykVE4zJLA== X-Received: by 10.25.72.14 with SMTP id v14mr3556171lfa.12.1477168667021; Sat, 22 Oct 2016 13:37:47 -0700 (PDT) X-Gmail-Original-Message-ID: Xref: news.gmane.org gmane.linux.lib.musl.general:10658 Archived-At: Hi! I am unable to build musl with --enable-shared. Multiple issues in unrelated projects (e.g. here: https://bugs.swift.org/browse/SR-1023) suggest that the culprit is a change in behaviour between binutils 2.25 and 2.26. This is what I did: $ make clean $ ./configure --prefix=/usr/packages/musl --target=x86_64-pc-linux-gnu CFLAGS='-B/usr/local/bin/x86_64-pc-linux-gnu-' --enable-static --enable-shared --disable-gcc-wrapper $ make [...] x86_64-pc-linux-gnu-gcc -D_XOPEN_SOURCE=700 -I./arch/x86_64 -I./arch/generic -Iobj/src/internal -I./src/internal -Iobj/include -I./include -include vis.h -B/usr/local/bin/x86_64-pc-linux-gnu- -fPIC -c -o obj/src/process/posix_spawn.lo src/process/posix_spawn.c [...] x86_64-pc-linux-gnu-gcc -D_XOPEN_SOURCE=700 -I./arch/x86_64 -I./arch/generic -Iobj/src/internal -I./src/internal -Iobj/include -I./include -include vis.h -B/usr/local/bin/x86_64-pc-linux-gnu- -nostdlib -shared -Wl,-e,_dlstart -o lib/libc.so obj/src/aio/aio.lo [a ton of objects] obj/ldso/dynlink.lo /usr/local/bin/x86_64-pc-linux-gnu-ld: obj/src/process/posix_spawn.lo: relocation R_X86_64_PC32 against protected symbol `execve' can not be used when making a shared object /usr/local/bin/x86_64-pc-linux-gnu-ld: final link failed: Bad value collect2: error: ld returned 1 exit status make: *** [lib/libc.so] Error 1 This is the toolchain I am using: $ /usr/local/bin/x86_64-pc-linux-gnu-ld -v GNU ld (GNU Binutils) 2.27 $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/usr/local/bin/x86_64-pc-linux-gnu-gcc-original COLLECT_LTO_WRAPPER=/usr/packages/gcc-x86_64-pc-linux-gnu/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /Data/Projects/Linux/gcc/fetch/gcc-6.1.0/configure --enable-languages=all --without-headers --disable-multilib --disable-shared --enable-static --target=x86_64-pc-linux-gnu --with-gmp=/usr/packages/gmp --with-mpfr=/usr/packages/mpfr --with-mpc=/usr/packages/mpc --prefix=/usr/packages/gcc-x86_64-pc-linux-gnu : (reconfigured) /Data/Projects/Linux/gcc/fetch/gcc-6.1.0/configure --enable-languages=all --without-headers --disable-multilib --disable-shared --enable-static --target=x86_64-pc-linux-gnu --with-gmp=/usr/packages/gmp --with-mpfr=/usr/packages/mpfr --with-mpc=/usr/packages/mpc --prefix=/usr/packages/gcc-x86_64-pc-linux-gnu Thread model: posix gcc version 6.1.0 (GCC) Can anyone confirm this issue with binutils >= 2.26? It seems strange to me that this would not have come up yet, so maybe someone has an idea what else might be the problem? Samuel