From owner-freebsd-current@FreeBSD.ORG Fri Nov 9 18:28:11 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DB089BF; Fri, 9 Nov 2012 18:28:11 +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 44D8C8FC0C; Fri, 9 Nov 2012 18:28:11 +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 qA9ISAcU063509; Fri, 9 Nov 2012 10:28:10 -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 qA9ISA3f063508; Fri, 9 Nov 2012 10:28:10 -0800 (PST) (envelope-from sgk) Date: Fri, 9 Nov 2012 10:28:10 -0800 From: Steve Kargl To: Dimitry Andric Subject: Re: clang and static linking? Message-ID: <20121109182810.GA61338@troutmask.apl.washington.edu> References: <20121108231349.GA79485@troutmask.apl.washington.edu> <509D4548.7030806@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <509D4548.7030806@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2012 18:28:11 -0000 On Fri, Nov 09, 2012 at 07:02:48PM +0100, Dimitry Andric wrote: > On 2012-11-09 00:13, Steve Kargl wrote: > > Upgraded my amd64 system, yesterday. Needed to rebuild one > > of my projects, and hit > > > > /usr/local/openmpi-1.6.3/bin/mpif90 -static -O2 -pipe -march=native -mtune=native -funroll-loops -ftree-vectorize -Wall -rpath /usr/local/lib/gcc46 -I/home/kargl/modules -o sasmp sasmp.f90 -L/home/kargl/lib -L. -L/usr/local/lib -L. -loa -lm90 -llapack -lblas > > //usr/lib/libc.a(isnan.o): In function `isnanf': > > /usr/src/lib/libc/gen/isnan.c:(.text+0x40): multiple definition of `__isnanf' > > //usr/lib/libm.a(s_isnan.o):/usr/src/lib/msun/src/s_isnan.c:(.text+0x0): > > first defined here > > collect2: ld returned 1 exit status > > *** [sasmp] Error code 1 > > Can you please post a reduced testcase? I cannot reproduce this error > on -current, however much I tried. My testcases attempted calling > isnan() and isnanf(), then I tried statically linking with libc and > libm, but it worked just fine... I'll see what I can do. sasmp is a fairly large OpenMPI program. -- Steve