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

Emscripten Targets Fail with Container Images #839

Closed
Alexhuszagh opened this issue Jun 22, 2022 · 1 comment · Fixed by #840
Closed

Emscripten Targets Fail with Container Images #839

Alexhuszagh opened this issue Jun 22, 2022 · 1 comment · Fixed by #840
Labels
A-emscripten Area: emscripten targets bug

Comments

@Alexhuszagh
Copy link
Contributor

The container images are currently disabled on CI, however, they can be built. Unfortunately, attempting to do so produces:

error: linking with `emcc` failed: exit status: 1
  |
  = note: "emcc" "-s" "EXPORTED_FUNCTIONS=[\"_main\",\"_rust_eh_personality\"]" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.1hwx1m4z77xgklfq.rcgu.o" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.3olwem368bbcwnj6.rcgu.o" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.42n3za5etetqf8wx.rcgu.o" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.4bj48wwofmo2wxg5.rcgu.o" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.4jy695kpqag0b4sv.rcgu.o" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.kbgciut9opgn29.rcgu.o" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.weu0i7ngo91mteq.rcgu.o" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.2i5frysyjwi3f262.rcgu.o" "-L" "/target/asmjs-unknown-emscripten/debug/deps" "-L" "/target/debug/deps" "-L" "/target/asmjs-unknown-emscripten/debug/build/hellopp-b9600f35a3c2512d/out" "-L" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib" "-l" "hellopp" "-l" "stdc++" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/libstd-fb2df19118db310d.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/libpanic_unwind-8386994b3a04ec77.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/libstd_detect-a104798db2201fc8.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/librustc_demangle-757cd8e06e392eda.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/libhashbrown-2c8bb84b50611da0.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/librustc_std_workspace_alloc-4a1eb87aaa56a6c1.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/libunwind-83c302b3cc8b7dbd.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/libcfg_if-9ada802475829674.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/liblibc-f9e2f3b41c6b1d5a.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/liballoc-ecb78a21f9518a04.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/librustc_std_workspace_core-58e0792c29686b11.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/libcore-ebe70f38647fc4a3.rlib" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/libcompiler_builtins-2c31a05cb537eb0d.rlib" "-l" "c" "-s" "DISABLE_EXCEPTION_CATCHING=0" "-L" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib" "-L" "/rust/lib/rustlib/asmjs-unknown-emscripten/lib/self-contained" "-o" "/target/asmjs-unknown-emscripten/debug/deps/hellopp-4c6a3d6639ab24e0.js" "-O0" "--memory-init-file" "0" "-g4" "-s" "DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[]" "-s" "ERROR_ON_UNDEFINED_SYMBOLS=1" "-s" "ASSERTIONS=1" "-s" "ABORTING_MALLOC=0" "-Wl,--fatal-warnings" "-s" "WASM=0"
  = note: emcc: warning: please replace -g4 with -gsource-map [-Wdeprecated]
          emcc: error: wasm2js does not support source maps yet (debug in wasm for now)
@Alexhuszagh Alexhuszagh added bug A-emscripten Area: emscripten targets labels Jun 22, 2022
@Alexhuszagh
Copy link
Contributor Author

Looks like we can re-enable asmjs-unknown-emscripten once rust-lang/rust#98216 lands on stable, as long as we ensure the compiler version is high enough.

Alexhuszagh added a commit to Alexhuszagh/cross that referenced this issue Jun 22, 2022
Uses a trick described in
rust-lang/rust/issues#85821#issuecomment-969369677. Note that this still
allows it to run, despite there seemingly being no entry point: this has
no effect on the resulting code.

Related to cross-rs#609. Partially fixes cross-rs#839.
bors bot added a commit that referenced this issue Jun 24, 2022
840: Re-enable wasm32-unknown-emscripten target. r=Emilgardis a=Alexhuszagh

Uses a trick described in rust-lang/rust/issues#85821#issuecomment-969369677. Note that this still allows it to run, despite there seemingly being no entry point: this has no effect on the resulting code.

Related to #609. Partially fixes #839.

Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
@bors bors bot closed this as completed in #840 Jun 24, 2022
@bors bors bot closed this as completed in f59d468 Jun 24, 2022
Emilgardis pushed a commit to Emilgardis/cross that referenced this issue Jun 24, 2022
Uses a trick described in
rust-lang/rust/issues#85821#issuecomment-969369677. Note that this still
allows it to run, despite there seemingly being no entry point: this has
no effect on the resulting code.

Related to cross-rs#609. Partially fixes cross-rs#839.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-emscripten Area: emscripten targets bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant