I'm seeing errors like this trying to integrate the latest emscripten changes that include emscripten-core/emscripten#25930
WARNING: For repository 'rules_cc', the root module requires module version rules_cc@0.2.16, but got rules_cc@0.2.17 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
INFO: Analyzed target //long_command_line:long_command_line_wasm (3 packages loaded, 6209 targets configured).
ERROR: /root/project/bazel/test_external/long_command_line/BUILD.bazel:48:10: Linking long_command_line/liblong_command_line.so failed: (Exit 1): emcc_link.sh failed: error executing CppLink command (from cc_binary rule target //long_command_line:long_command_line) external/emsdk+/emscripten_toolchain/emcc_link.sh @bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line.so-0.params
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file01_a.a(long_command_line_file01.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file01_a.a(long_command_line_file01.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file01_a.a(long_command_line_file01.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::ctype<char>::id`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file02_a.a(long_command_line_file02.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file02_a.a(long_command_line_file02.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file03_a.a(long_command_line_file03.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file03_a.a(long_command_line_file03.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file04_a.a(long_command_line_file04.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file04_a.a(long_command_line_file04.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file05_a.a(long_command_line_file05.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file05_a.a(long_command_line_file05.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file06_a.a(long_command_line_file06.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file06_a.a(long_command_line_file06.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file07_a.a(long_command_line_file07.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file07_a.a(long_command_line_file07.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file08_a.a(long_command_line_file08.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file08_a.a(long_command_line_file08.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file09_a.a(long_command_line_file09.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file09_a.a(long_command_line_file09.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `.L.str`; recompile with -fPIC
wasm-ld: error: bazel-out/wasm-fastbuild-ST-97b75ba167b6/bin/long_command_line/liblong_command_line_file10_a.a(long_command_line_file10.o): relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `std::__2::cout`; recompile with -fPIC
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
I guess what is happening here is that bazel has been historically been passing -shared but getting our fake dynamic libraries?
I'm seeing errors like this trying to integrate the latest emscripten changes that include emscripten-core/emscripten#25930
I guess what is happening here is that bazel has been historically been passing
-sharedbut getting our fake dynamic libraries?