From owner-freebsd-current@FreeBSD.ORG Fri Nov 9 18:02:45 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 3AF59BF for ; Fri, 9 Nov 2012 18:02:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id EB2318FC13 for ; Fri, 9 Nov 2012 18:02:44 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2CBF55C59; Fri, 9 Nov 2012 19:02:44 +0100 (CET) Message-ID: <509D4548.7030806@FreeBSD.org> Date: Fri, 09 Nov 2012 19:02:48 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Steve Kargl Subject: Re: clang and static linking? References: <20121108231349.GA79485@troutmask.apl.washington.edu> In-Reply-To: <20121108231349.GA79485@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:02:45 -0000 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...