Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost: special functions are unavailable on ppc64el #16390

Closed
tamiko opened this issue Dec 28, 2023 · 6 comments · Fixed by #16434
Closed

Boost: special functions are unavailable on ppc64el #16390

tamiko opened this issue Dec 28, 2023 · 6 comments · Fixed by #16434

Comments

@tamiko
Copy link
Member

tamiko commented Dec 28, 2023

See [1]:

/usr/include/boost/math/tools/promotion.hpp:267:27: error: static assertion failed: Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059349

@tamiko
Copy link
Member Author

tamiko commented Dec 28, 2023

In file included from /usr/include/boost/math/special_functions/detail/round_fwd.hpp:12,
                 from /usr/include/boost/math/special_functions/math_fwd.hpp:29,
                 from /usr/include/boost/math/special_functions/legendre.hpp:16,
                 from /<<PKGBUILDDIR>>/include/deal.II/base/std_cxx17/cmath.h:32,
                 from /<<PKGBUILDDIR>>/source/base/function_lib.cc:20:

Judging from cmath.h the easiest course of action would be to simply override DEAL_II_HAVE_CXX17_BESSEL_FUNCTIONS and DEAL_II_HAVE_CXX17_LEGENDRE_FUNCTIONS to true and live with the fact that the functions are unavailable on ppc64el.

Opinions?

@bangerth
Copy link
Member

We don't actually need the long double overload. The only place where we use the legendre function is in fe_series_legendre.cc where we use it with a double argument. The right approach might be to just remove the non-C++17 legendrel() function in our own cmath.h. I would be greatly surprised if anyone used it.

@bangerth
Copy link
Member

Separately, though -- in the current dev sources, we're using C++17. How come we fall back to the BOOST versions? Is this with a compiler that doesn't have these implemented, even though they claim to support C++17?

@masterleinad
Copy link
Member

https://en.cppreference.com/w/cpp/17 shows that support for mathematical special functions is pretty limited.
You either need

  • libstdc++ >= 7, or
  • MSVC STL >= 19.14 (VS 2017)

E.g., libc++ hasn't implement them yet.

@masterleinad
Copy link
Member

I agree with just removing the long double overloads.

@tamiko
Copy link
Member Author

tamiko commented Dec 30, 2023

Roger. Let's just remove the long double overloads. I'll also prepare a patch for 9.5.1 and update the debian package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants