Boost 1.76 beta - linking error when including Boost
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
Hello, I have a minimal example now. The program:
------
#include
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
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
On Wed, 2021-03-24 at 14:46 +0100, Luigi Ballabio via Boost wrote:
Hello, I have a minimal example now. The program: ------ #include
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
Thanks, Luigi
Luigi, I opened a PR to address your issue. See: https://github.com/boostorg/math/pull/580 Matt
Thanks!
On Wed, Mar 24, 2021 at 4:52 PM Matt Borland
On Wed, 2021-03-24 at 14:46 +0100, Luigi Ballabio via Boost wrote:
Hello, I have a minimal example now. The program: ------ #include
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
Thanks, Luigi
Luigi,
I opened a PR to address your issue. See: https://github.com/boostorg/math/pull/580
Matt
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
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
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
participants (3)
-
John Maddock
-
Luigi Ballabio
-
Matt Borland