Skip to content

wasm-ld: error: unknown file type: #19466

@MaeThird

Description

@MaeThird

Version of emscripten/emsdk:

root@a206427d23c4:/# emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.39-git
clang version 16.0.4
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /native/emcc-docker/llvm-project-llvmorg-16.0.4/output/bin

Failing command line in full:

Just compile the "hello world" example to get the output. It seems that the 'wasm-ld' can't recognize the stub object which is in the form of xxxlibemscripten_js_symbols.so added by create_stub_object in building.py anymore.

root@a206427d23c4:/native/emcc-docker# emcc ./t0.c
wasm-ld: error: unknown file type: /tmp/tmpc5kyiwfilibemscripten_js_symbols.so
emcc: error: '/native/emcc-docker/llvm-project-llvmorg-16.0.4/output/bin/wasm-ld -o a.out.wasm /tmp/emscripten_temp_1nrrovxj/t0_0.o -L/native/emcc-docker/emscripten-3.1.39/cache/sysroot/lib/wasm32-emscripten -lGL -lal -lhtml5 -lstubs-debug -lnoexit -lc-debug -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-debug-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmpc5kyiwfilibemscripten_js_symbols.so --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export-if-defined=fflush --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_get_base --export=emscripten_stack_get_current --export=emscripten_stack_init --export=stackSave --export=stackRestore --export=stackAlloc --export=__errno_location --export=__get_temp_ret --export=__set_temp_ret --export=__wasm_call_ctors --export-table -z stack-size=65536 --initial-memory=16777216 --no-entry --max-memory=16777216 --stack-first' failed (returned 1)
root@a206427d23c4:/native/emcc-docker# cat t0.c
#include <stdio.h>
int main() {
  printf("hello, world!\n");
  return 0;
}
root@a206427d23c4:/native/emcc-docker#

emscripten is 3.1.39

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions