emscripten-core / emscripten-core/emscripten

v4.0.8 doesn't compile on gcc 15

Open
#24,333 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I can't compile emscripten 4.0.8 with gcc 15:

```
/usr/bin/c++ -Dbinaryen_EXPORTS -I/build/emscripten/src/binaryen/src -I/build/emscripten/src/binaryen/build -isystem /build
/emscripten/src/binaryen/third_party/FP16/include -isystem /build/emscripten/src/binaryen/third_party/llvm-project/include
-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -fno-omit-frame-pointer -fno-rtti -fPIC -fdiagnostics-color=always -DBUILD_LLVM_DWARF -Wall -Werror -Wextra -Wno-unused-parameter -Wno-dangling-pointer -Wno-implicit-int-float-conversion -Wno-unknown-warning-option -Wswitch -Wimplicit-fallthrough -Wnon-virtual-dtor -O3 -DNDEBUG -UNDEBUG -std=c++17 -fPIC -MD -MT CMakeFiles/binaryen.dir/src/passes/Strip.cpp.o -MF CMakeFiles/binaryen.dir/src/passes/Strip.cpp.o.d -o CMakeFiles/binaryen.dir/src/passes/Strip.cpp.o -c /build/emscripten/src/binaryen/src/passes/Strip.cpp
In file included from /usr/include/c++/15.1.1/functional:61,
from /build/emscripten/src/binaryen/src/passes/Strip.cpp:22:
In copy constructor ‘std::function<_Res(_ArgTypes ...)>::function(const std::function<_Res(_ArgTypes ...)>&) [with _Res = bool; _ArgTypes = {wasm::CustomSection&}]’,
inlined from ‘wasm::Strip::Strip(Decider)’ at /build/emscripten/src/binaryen/src/passes/Strip.cpp:37:28,
inlined from ‘wasm::Pass* wasm::createStripDebugPass()’ at /build/emscripten/src/binaryen/src/passes/Strip.cpp:62:4:
/usr/include/c++/15.1.1/bits/std_function.h:393:17: error: ‘’ may be used uninitialized [-Werror=maybe-uninitialized]
393 | __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
| ~~~~^~~~~~~~~~
```

[emscripten-4.0.8-1-x86_64-build.log](https://github.com/user-attachments/files/20225847/emscripten-4.0.8-1-x86_64-build.log)

It's just a warning that I can turn off but this should still be fixed upstream.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.