Boost 1.76 beta - linking error when including Boost

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Boost 1.76 beta - linking error when including Boost

Boost - Dev mailing list
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
Reply | Threaded
Open this post in threaded view
|

Re: Boost 1.76 beta - linking error when including Boost

Boost - Dev mailing list
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 <[hidden email]>
wrote:

> 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
Reply | Threaded
Open this post in threaded view
|

Re: Boost 1.76 beta - linking error when including Boost

Boost - Dev mailing list
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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Boost 1.76 beta - linking error when including Boost

Boost - Dev mailing list
Thanks!

On Wed, Mar 24, 2021 at 4:52 PM Matt Borland <[hidden email]> 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
>
> Matt
>

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: Boost 1.76 beta - linking error when including Boost

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
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


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