[Pkg-javascript-devel] Bug#1003873: Bug#1003873: emscripten: emcc search for /usr/bin/clang (and other binaries) which doesn't exist

Jonas Smedegaard jonas at jones.dk
Mon Jan 17 12:30:07 GMT 2022


Control: tags -1 unreproducible

Which version of emscripten do you use, on which release of Debian?

(...because emscripten is currently uninstallable in unstable, and versions in unstable, testing and stable all use versioned clang).

Did you use a _clean_ Debian system?

Beware that on first use of emscripten it stores a config file in $HOME 
(and very explicitly notifies about that) - or if run as root then a 
config file is stored at /usr/share/emscripten/.emscripten so NEVER EVER 
execute emscripten tools as root!


> when trying to build a WASM file from a C file, emcc fails because it
> doesn't find /usr/bin/clang (and other clang binaries). In Debian, clang
> binaries are versionned (clang-13, clang++-13,...)
> 
> To reproduce, go to node-jest/cjs-module-lexer and launch:
> 
>   emcc src/lexer.c -s WASM=1 -I include-wasm -o lib/lexer.wasm

node-jest in unstable does not contain that directory.

In a clone of https://salsa.debian.org/js-team/node-jest.git running 
above command - on a clean Debian testing system - I get this failure 
(after some time of compiling with clang -13):

error: undefined symbol: main (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: _main may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
warning: To build in STANDALONE_WASM mode without a main(), use emcc --no-entry
Error: Aborting compilation due to previous errors
emcc: error: '/usr/bin/node /usr/share/emscripten/src/compiler.js /tmp/tmp4byge9ba.json' failed (returned 1)


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20220117/74677f3a/attachment.sig>


More information about the Pkg-javascript-devel mailing list