emscripten-core / emscripten-core/emscripten

Linker errors after switching to new Emscripten 2.0.25

Open
#14,622 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

Hello,

Today I updated emsdk hoping it has fixed for emscripten fetch API undefined symbols...
But unfortunately got additional problems:

The linker reports duplicated symbols, and I have no idea how to solve this:

wasm-ld: error: duplicate symbol: emscripten_GetProcAddress
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt.a(gl.o)
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt-webgl2.a(gl.o)

wasm-ld: error: duplicate symbol: emscripten_webgl_get_proc_address
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt.a(gl.o)
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt-webgl2.a(gl.o)

wasm-ld: error: duplicate symbol: _webgl1_match_ext_proc_address_without_suffix
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt.a(webgl1.o)
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt-webgl2.a(webgl1.o)

wasm-ld: error: duplicate symbol: emscripten_webgl1_get_proc_address
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt.a(webgl1.o)
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt-webgl2.a(webgl1.o)

wasm-ld: error: duplicate symbol: eglGetProcAddress
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt.a(libprocaddr.o)
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt-webgl2.a(libprocaddr.o)

wasm-ld: error: duplicate symbol: glfwGetProcAddress
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt.a(libprocaddr.o)
>>> defined in D:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libGL-mt-webgl2.a(libprocaddr.o)

The point is I have no idea why it uses libGL-mt.a at all, because I specify -s MIN_WEBGL_VERSION=2 and -s MAX_WEBGL_VERSION=2 during linking.

P.S. Previously I used emsdk 2.0.23 and it didn't have problems with duplicates...

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.