Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emcc hello.c -o hello.js error in nodejs v18.20.2 #21901

Open
Zibri opened this issue May 7, 2024 · 2 comments
Open

emcc hello.c -o hello.js error in nodejs v18.20.2 #21901

Zibri opened this issue May 7, 2024 · 2 comments

Comments

@Zibri
Copy link

Zibri commented May 7, 2024

Node: v18.20.2
$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.5 ()
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

node test2.js
/home/runner/test2.js:146
      throw ex;
      ^

TypeError: Failed to parse URL from /home/runner/test2.wasm
    at node:internal/deps/undici/undici:12618:11 {
  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
      at new NodeError (node:internal/errors:405:5)
      at new URL (node:internal/url:676:13)
      at new Request (node:internal/deps/undici/undici:6108:25)
      at fetch (node:internal/deps/undici/undici:10396:25)
      at Object.fetch (node:internal/deps/undici/undici:12617:10)
      at fetch (node:internal/process/pre_execution:281:25)
      at instantiateAsync (/home/runner/test2.js:1710:14)
      at createWasm (/home/runner/test2.js:1746:3)
      at Object.<anonymous> (/home/runner/test2.js:1949:11)
      at Module._compile (node:internal/modules/cjs/loader:1364:14) {
    input: '/home/runner/test2.wasm',
    code: 'ERR_INVALID_URL'
  }
}

@kripken
Copy link
Member

kripken commented May 7, 2024

That error message is not familiar to me, but 3.1.5 is over two years old, so I would test with a new version, as there might have been a bug that was fixed here.

If that doesn't fix it, please attach a full testcase we can reproduce with.

@sbc100
Copy link
Collaborator

sbc100 commented May 7, 2024

A full set of link flags at least would be very useful in diagnosing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants