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

Yadd yadd at debian.org
Mon Jan 17 13:02:55 GMT 2022


On 17/01/2022 13:55, Jonas Smedegaard wrote:
> Quoting Yadd (2022-01-17 13:40:44)
>> On 17/01/2022 13:30, Jonas Smedegaard wrote:
>>> Control: tags -1 unreproducible
> 
>>>> 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 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)
> 
> [...]
> 
>> I'm using emscripten 3.1.1~dfsg+~1.39.6-3 with a clean Debian testing
>> (this is probably the last version available when `apt upgrade`).
>>
>> Yes, I got same error after fixing paths. This is another problem,
>> upstream uses a custom clang (from wasi-sdk)
> 
> I don't understand how "pristine system" and "after fixing paths" fit
> together.

I manually linked /usr/bin/clang-13 to /usr/bin/clang (and other binaries)

> Please provide a full build log (as attached file, not inline), so it is
> possible to see (and therefore replicate) the exact commands executed on
> the prisitne Debian testing system leading to the reported state.

This is just a manual test, before doing these manual links, I got:

   $ emcc src/lexer.c -s WASM=1 -I include-wasm -o lib/lexer.wasm
   emcc: error: clang executable not found at `/usr/bin/clang`

No more logs, just one command that returned one error



More information about the Pkg-javascript-devel mailing list