From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Subject: bug#20358: MariaDB failed to link 'libgcc_s.so' with our ld-wrapper. Date: Fri, 17 Apr 2015 22:57:20 +0800 Message-ID: <87zj66kdkf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7hd-0004lh-72 for bug-guix@gnu.org; Fri, 17 Apr 2015 10:57:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj7hW-0007t9-Qa for bug-guix@gnu.org; Fri, 17 Apr 2015 10:57:09 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:41106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7hW-0007t5-Nm for bug-guix@gnu.org; Fri, 17 Apr 2015 10:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yj7hW-00068D-FL for bug-guix@gnu.org; Fri, 17 Apr 2015 10:57:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7hM-0004Iu-1i for bug-guix@gnu.org; Fri, 17 Apr 2015 10:56:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj7hI-0007pA-1I for bug-guix@gnu.org; Fri, 17 Apr 2015 10:56:51 -0400 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]:32933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7hH-0007oj-Og for bug-guix@gnu.org; Fri, 17 Apr 2015 10:56:47 -0400 Received: by pdbnk13 with SMTP id nk13so130555048pdb.0 for ; Fri, 17 Apr 2015 07:56:47 -0700 (PDT) Received: from localhost ([108.61.250.36]) by mx.google.com with ESMTPSA id z10sm10474192pas.18.2015.04.17.07.56.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 07:56:46 -0700 (PDT) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: 20358@debbugs.gnu.org In my patch for mariadb, I have to set LDFLAGS to '-lgcc_s': https://lists.gnu.org/archive/html/guix-devel/2015-04/msg00321.html without this, binaries are built linked with libstdc++.so, but have a not found entry for libgcc_s.so, eg: $ ldd ./build/sql/gen_lex_hash linux-vdso.so.1 (0x00007ffcfbfea000) libpthread.so.0 =3D> /gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-gl= ibc-2.21/lib/libpthread.so.0 (0x00007ff62a182000) libstdc++.so.6 =3D> /gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc= -4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../../libstdc++.so.6 (= 0x00007ff629e80000) libm.so.6 =3D> /gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.= 21/lib/libm.so.6 (0x00007ff629b7e000) libc.so.6 =3D> /gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.= 21/lib/libc.so.6 (0x00007ff6297de000) /gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib/ld-linux= -x86-64.so.2 (0x00007ff62a39f000) libgcc_s.so.1 =3D> not found The link script (sql/CMakeFiles/gen_lex_hash.dir/link.txt) contains: -------------------------------------------------------------------- /gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/bin/c++ -fno-exc= eptions -fno-rtti -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict= -aliasing -Wno-uninitialized -DDBUG_OFF CMakeFiles/gen_lex_hash.dir/gen_l= ex_hash.cc.o -o gen_lex_hash -lpthread -------------------------------------------------------------------- And the build script (sql/CMakefils/gen_lex_hash.dir/flags.make): ----------------------------------------------------------------- # CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 3.1 # compile CXX with /gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/bi= n/c++ CXX_FLAGS =3D -fno-exceptions -fno-rtti -O3 -g -static-libgcc -fno-omit-fr= ame-pointer -fno-strict-aliasing -Wno-uninitialized -DDBUG_OFF -I/var/tmp/n= ix-build-mariadb-10.0.17.drv-0/build/include -I/var/tmp/nix-build-mariadb-1= 0.0.17.drv-0/mariadb-10.0.17/include -I/var/tmp/nix-build-mariadb-10.0.17.d= rv-0/mariadb-10.0.17/sql -I/var/tmp/nix-build-mariadb-10.0.17.drv-0/mariadb= -10.0.17/zlib -I/var/tmp/nix-build-mariadb-10.0.17.drv-0/mariadb-10.0.17/ex= tra/yassl/include -I/var/tmp/nix-build-mariadb-10.0.17.drv-0/mariadb-10.0.1= 7/extra/yassl/taocrypt/include -I/var/tmp/nix-build-mariadb-10.0.17.drv-0/b= uild/sql -DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED CXX_DEFINES =3D -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREA= DS -DMYSQL_SERVER ------------------------------------------------------------------ As Ludovic Court=C3=A8s tell, '-static-libgcc' may be the issue.