From owner-freebsd-current@FreeBSD.ORG Thu Sep 5 07:50:03 2013 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BFB635CF; Thu, 5 Sep 2013 07:50:03 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF572488; Thu, 5 Sep 2013 07:50:02 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r857ns6b061037 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 5 Sep 2013 07:49:56 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: clang+libc++ using missing powl From: David Chisnall In-Reply-To: <20130905071433.GK82066@ithaqua.etoilebsd.net> Date: Thu, 5 Sep 2013 08:49:51 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20130904223842.GB82066@ithaqua.etoilebsd.net> <010BAA30-EFD0-4B5C-AC94-908130533741@FreeBSD.org> <20130905071433.GK82066@ithaqua.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.1508) Cc: Dimitry Andric , 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: Thu, 05 Sep 2013 07:50:03 -0000 On 5 Sep 2013, at 08:14, Baptiste Daroussin wrote: > On Thu, Sep 05, 2013 at 09:05:45AM +0200, Dimitry Andric wrote: >> On Sep 5, 2013, at 00:38, Baptiste Daroussin = wrote: >>> I'm running exp-run to build the whole ports tree with clang using = libc++ by >>> default. >>>=20 >>> As a result we have a lot of fallouts of ports complaining about: >>> undefined reference to `powl' >>>=20 >>> It seems like libc++ is relying on a function we don't have yet in = libm, am I >>> missing something? >>=20 >>=20 >> Do you have a concrete example of a port that gives this result? We = do >> have powl these days, but maybe some configure script is trying to be >> smart and does not pass -lm to the linker flags... >>=20 >> -Dimitry >>=20 >=20 > = http://pb2.nyi.freebsd.org/bulk/nogcc-default/2013-09-04_18h36m06s/logs/er= rors/domc-0.8.0_1.log This one doesn't seem to be complaining about powl(), it's a missing = -fPIC when building objects that will be linked into a shared object. > I tried adding -lm to the linker and it failed, when was powl added? It hasn't been: https://wiki.freebsd.org/Numerics?highlight=3D%28powl%29 We are exposing it in math.h though, which is somewhat unfortunate. We = should probably tweak cmath.h to not expose it, or we'll get things = trying to use it and then failing to link. > Here is another example: > = http://pb2.nyi.freebsd.org/bulk/nogcc-default/2013-09-04_18h36m06s/logs/er= rors/iverilog-0.9.6.log This is a real example. Is it actually using powl(), or is it just = using std::pow()? I think if we just comment out the long long version = of std::pow() then it should silently fall back to the lower-precision = version. Can you try that? =20 David