Date: Thu, 5 Sep 2013 08:49:51 +0100 From: David Chisnall <theraven@FreeBSD.org> To: Baptiste Daroussin <bapt@FreeBSD.org> Cc: Dimitry Andric <dim@FreeBSD.org>, current@FreeBSD.org Subject: Re: clang+libc++ using missing powl Message-ID: <F18548E2-DDA1-419E-AC03-BAD3C9681485@FreeBSD.org> In-Reply-To: <20130905071433.GK82066@ithaqua.etoilebsd.net> References: <20130904223842.GB82066@ithaqua.etoilebsd.net> <010BAA30-EFD0-4B5C-AC94-908130533741@FreeBSD.org> <20130905071433.GK82066@ithaqua.etoilebsd.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5 Sep 2013, at 08:14, Baptiste Daroussin <bapt@freebsd.org> wrote: > On Thu, Sep 05, 2013 at 09:05:45AM +0200, Dimitry Andric wrote: >> On Sep 5, 2013, at 00:38, Baptiste Daroussin <bapt@freebsd.org> = 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F18548E2-DDA1-419E-AC03-BAD3C9681485>