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

emscripten builds need BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #1215

Closed
NickelWenzel opened this issue Oct 22, 2024 · 2 comments · Fixed by #1216
Closed

emscripten builds need BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #1215

NickelWenzel opened this issue Oct 22, 2024 · 2 comments · Fixed by #1216

Comments

@NickelWenzel
Copy link
Contributor

NickelWenzel commented Oct 22, 2024

Using boost::math when compiling to wasm32 via emscripten is not possible out of the box right now because BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS is not defined.

It seems like this is a regression that was introduced by the following PR #753 which seems to be related to #728 and #729.

@jzmaddock to me it looks like uncommenting the define in config.hpp

#if (defined(__NetBSD__) || defined(__EMSCRIPTEN__)\
   || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
   && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
//#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#endif`

would solve the problem and i'd happily prepare a PR if you see no negative consequences for NetBSD and hppa since they would also get affected by this change.

@mborland
Copy link
Member

I would recommend making a PR that only affects your platform. We do not have NetBSD in the CI nor do we have hppa since it requires specific hardware.

@NickelWenzel
Copy link
Contributor Author

Thanks for getting back so swiftly :) I did that feel free to have a look at #1216.

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

Successfully merging a pull request may close this issue.

2 participants