emscripten-core / emscripten-core/emscripten

Clearer linker error due to sjlj ABI mismatch?

Open
#23,732 3 comments 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

Source file:
```a.c
#include

jmp_buf buf;

int main() {
longjmp(buf, 8);
}
```
Compile/link:
```sh
$ emcc -c a.c
$ emcc a.o -fwasm-exceptions
error: undefined symbol: emscripten_longjmp (referenced by root reference (e.g. compiled C/C++ code
```
Would be nice if the error could say something roughly like:
```
a.o uses setjmp/longjmp but was compiled with incompatible ABI. Pass -fwasm-exceptions as a compile flag.
```

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.