emscripten-core / emscripten-core/emscripten

Link warning: seeing "19.0", expected "20" [-Wversion-check]

Open
#22,813 2 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

**Version of emscripten/emsdk:**

```
# emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.66-git
clang version 19.0.0git
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-devel/bin
```

As you can see, my version of emcc uses clang version 19. But when I build binaries out of object files, I often get this warning:

```
emcc: warning: LLVM version for clang executable "/opt/local/libexec/llvm-devel/bin/clang" appears incorrect (seeing "19.0", expected "20") [-Wversion-check]
```

Where does "20" come from? I have no clang 20 installed on my system for sure. clang 20 doesn't even exist yet.

I have clang/llvm 19 and 16 installed, standalone, and the emcc version above (which comes with its own llvm 19 copy) and all code linked by emcc has been built with this emcc version (all *.o files were created by the same emcc that also performs the linking) and thus with clang 19.

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.