[boost] Boost 1.76 beta - linking error when including Boost

41 views
Skip to first unread message

Luigi Ballabio via Boost

unread,
Mar 24, 2021, 3:25:35 AM3/24/21
to bo...@lists.boost.org, Luigi Ballabio
Hello,
I'm afraid I don't have a minimal example yet, but I thought I'd give
you a heads-up in case it rings a bell.

I've been trying the Boost 1.76 beta to build a library I'm maintaining.
The library builds, but when I link it to an executable I'm getting an
"undefined reference to `bool boost::math::isnan<long double>(long
double)". Everything works with 1.75 and earlier. My code is not using
boost::math::isnan directly, so I'm guessing some other included boost
component is forward-declaring it or doing something similar?

The linking error disappears if I
include <boost/math/special_functions/fpclassify.hpp> in a config file that
is included by every file in the library. Today I'll try to pinpoint the
problem by removing it there and including it before specific boost headers
in the source files, but as I said, I'm posting this in case someone
already has an idea about the underlying issue.

Thanks,
Luigi

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Luigi Ballabio via Boost

unread,
Mar 24, 2021, 9:47:20 AM3/24/21
to bo...@lists.boost.org, Luigi Ballabio
Hello, I have a minimal example now. The program:
------
#include <boost/math/special_functions/atanh.hpp>

int main() {
auto x = boost::math::atanh(1.0);
return int(x);
}
------
fails to link in an Ubuntu 20.10 Docker image with g++ 10.2.0 if using
Boost 1.76.0.beta1. It links with 1.75.0, or with the beta if I also add
#include <boost/math/special_functions/fpclassify.hpp>

Thanks,
Luigi





On Wed, Mar 24, 2021 at 8:25 AM Luigi Ballabio <luigi.b...@gmail.com>
wrote:

Matt Borland via Boost

unread,
Mar 24, 2021, 11:52:49 AM3/24/21
to bo...@lists.boost.org, Matt Borland, Luigi Ballabio
On Wed, 2021-03-24 at 14:46 +0100, Luigi Ballabio via Boost wrote:

> Hello, I have a minimal example now. The program:
> ------
> #include <boost/math/special_functions/atanh.hpp>
>
> int main() {
> auto x = boost::math::atanh(1.0);
> return int(x);
> }
> ------
> fails to link in an Ubuntu 20.10 Docker image with g++ 10.2.0 if using
> Boost 1.76.0.beta1. It links with 1.75.0, or with the beta if I also add
> #include <boost/math/special_functions/fpclassify.hpp>
>
> Thanks,
> Luigi

Luigi,

I opened a PR to address your issue. See: https://github.com/boostorg/math/pull/580

Matt

Luigi Ballabio via Boost

unread,
Mar 24, 2021, 11:57:20 AM3/24/21
to Matt Borland, Luigi Ballabio, bo...@lists.boost.org
Thanks!

John Maddock via Boost

unread,
Mar 24, 2021, 2:33:27 PM3/24/21
to Matt Borland via Boost, John Maddock
On 24/03/2021 15:52, Matt Borland via Boost wrote:
> On Wed, 2021-03-24 at 14:46 +0100, Luigi Ballabio via Boost wrote:
>
>> Hello, I have a minimal example now. The program:
>> ------
>> #include <boost/math/special_functions/atanh.hpp>
>>
>> int main() {
>> auto x = boost::math::atanh(1.0);
>> return int(x);
>> }
>> ------
>> fails to link in an Ubuntu 20.10 Docker image with g++ 10.2.0 if using
>> Boost 1.76.0.beta1. It links with 1.75.0, or with the beta if I also add
>> #include <boost/math/special_functions/fpclassify.hpp>
>>
>> Thanks,
>> Luigi
> Luigi,
>
> I opened a PR to address your issue. See: https://github.com/boostorg/math/pull/580

Thanks Matt!

Baring in mind that these are "just" missing #includes, are these too
late for the release now?

Matt: I'll file a PR shortly that updates our tests on this, though I'm
curious how they slipped through - certainly the log1p case should
already be tested for (sf_log1p_incl_test.cpp).

John.


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Reply all
Reply to author
Forward
0 new messages