From owner-freebsd-ports@FreeBSD.ORG Tue Feb 21 18:28:50 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C314B106566C; Tue, 21 Feb 2012 18:28:50 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 886628FC12; Tue, 21 Feb 2012 18:28:50 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q1LISoFf020882; Tue, 21 Feb 2012 10:28:50 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q1LISoEg020881; Tue, 21 Feb 2012 10:28:50 -0800 (PST) (envelope-from sgk) Date: Tue, 21 Feb 2012 10:28:50 -0800 From: Steve Kargl To: freebsd-current@freebsd.org, freebsd-ports@freebsd.org Message-ID: <20120221182850.GA20768@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: rtld or lang/gcc cannot find libgcc_s.so.1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2012 18:28:50 -0000 Sorry about the cross post, but I can't tell if this a -current issue of a -ports issue. Unfortunately, I updated my freebsd 10.0 systems and the lang/gcc port during the same timeframe. I have compiled my math library and several programs with gfortran, which is installed by lang/gcc (pkg_info shows gcc-4.6.2_1). When I try running the program I get troutmask:kargl[210] halfspace /lib/libgcc_s.so.1: version GCC_4.6.0 required by /home/kargl/bin/halfspace not foundtroutmask:kargl[211] (Note, the annoying absense of a newline character after the error message, which is a completely different issue.) I see this problem on both freebsd-i386 and freebsd-amd64. troutmask:kargl[212] ldd ~/bin/halfspace /home/kargl/bin/halfspace: liblapack.so.4 => /usr/local/lib/liblapack.so.4 (0x2008c3000) libblas.so.2 => /usr/local/lib/libblas.so.2 (0x201463000) libgfortran.so.3 => /usr/local/lib/gcc46/libgfortran.so.3 (0x20175d000) libm.so.5 => /lib/libm.so.5 (0x201a70000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x201c95000) libquadmath.so.0 => /usr/local/lib/gcc46/libquadmath.so.0 (0x201ea2000) libc.so.7 => /lib/libc.so.7 (0x2020d6000) troutmask:kargl[212] ldconfig -r | grep libgcc_s 29:-lgcc_s.1 => /lib/libgcc_s.so.1 723:-lgcc_s.1 => /usr/local/lib/gcc46/libgcc_s.so.1 So, it appears that rtld is finding the wrong libgcc_s.so.1 or the lang/gcc port is no longer providing sufficient information for rtld to choose the correct library. I have reverted revisions 230784, 299768, and 229508 (and various combinitions of these revisions) from rtld-elf. The result does not change the above error. I can work around the problem by specifying -static during the building of my programs. Or, I can work around the problem by *explicitly* adding '-rpath /usr/local/lib' to the command line, which I have never had to do. -- Steve