From owner-freebsd-current@FreeBSD.ORG Thu Nov 8 23:25:03 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 1312FC2A for ; Thu, 8 Nov 2012 23:25:03 +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 C58F88FC08 for ; Thu, 8 Nov 2012 23:25:02 +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 qA8NDnWW026042 for ; Thu, 8 Nov 2012 15:13:49 -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 qA8NDn88026041 for freebsd-current@freebsd.org; Thu, 8 Nov 2012 15:13:49 -0800 (PST) (envelope-from sgk) Date: Thu, 8 Nov 2012 15:13:49 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: clang and static linking? Message-ID: <20121108231349.GA79485@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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: Thu, 08 Nov 2012 23:25:03 -0000 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 Stop in /usr/home/kargl/trunk/oa. Can't rebuild gcc46 due to clang issue. Rebuilding openmpi does not help as openmpi uses gfortran46. Maybe there's a library problem. Error clang base/gcc yes libc,libm yes libm libc no libc libm no libc,libm libm.a compiled with clang % nm /usr/lib/libm.a | grep isnan U __isnanl U __isnanf U __isnanl U isnan U __isnanf U isnan U isnanf s_isnan.o: 0000000000000000 T __isnanf 0000000000000030 T __isnanl 0000000000000000 W isnanf U isnan libm.a compiled with /usr/lib/gcc troutmask:fvwm:kargl[232] nm /usr/lib/libm.a | grep isnan U __isnanl U __isnanf U __isnanl U __isnanf s_isnan.o: 0000000000000000 T __isnanf 0000000000000030 T __isnanl 0000000000000000 W isnanf -- Steve