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 compilation issue #44

Open
elcerdo opened this issue Jan 22, 2025 · 0 comments
Open

Emscripten compilation issue #44

elcerdo opened this issue Jan 22, 2025 · 0 comments

Comments

@elcerdo
Copy link

elcerdo commented Jan 22, 2025

Hello!
I might do something wrong, but I had to apply the following patch to the boost interval library (v1.82.0) in order to build it successfully using the emscripten toolchain (v3.1.51).

diff --git a/include/boost/numeric/interval/hw_rounding.hpp b/include/boost/numeric/interval/hw_rounding.hpp
index 46d452e..4211079 100644
--- a/include/boost/numeric/interval/hw_rounding.hpp
+++ b/include/boost/numeric/interval/hw_rounding.hpp
@@ -16,6 +16,7 @@
 #include <boost/numeric/interval/rounded_arith.hpp>

 #define BOOST_NUMERIC_INTERVAL_NO_HARDWARE
+#undef BOOST_NO_FENV_H

 // define appropriate specialization of rounding_control for built-in types
 #if defined(__x86_64__) && !defined(BOOST_NO_FENV_H)

This reverts to the c99 impl, which builds and works fine as far I can tell.
From what I gathered, the definition of BOOST_NO_FENV_H occurs in include/boost/config/platform/wasm.hpp:23 and commenting it out also fixes the issue.
This is, however, very hacky and I was wondering if there way a cleaner way to achieve the same results.

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

No branches or pull requests

1 participant