Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Emscripten compilation issue

Open
#44 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, wasm
Domain
build-system

Research direction

Start with include/boost/numeric/interval/hw_rounding.hpp and include/boost/config/platform/wasm.hpp, then inspect how BOOST_NO_FENV_H selects the rounding implementation for the Emscripten toolchain. Reproduce the Boost 1.82.0 build with Emscripten 3.1.51 and compare the C99 implementation against the failing path. Done means the library builds without the reported local patch and the resulting behavior is verified.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C++
Stars
31
Forks
49
Avg merge
2d 2h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/interval

All issues in boostorg/interval

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.