Closed mrk-its closed 6 months ago
https://github.com/mrk-its/aoc2022/tree/new_rust
$ cargo run -p day05 error: linking with `mos-sim-clang` failed: exit status: 1 | = note: LC_ALL="C" PATH="/usr/local/rust-mos/lib/rustlib/x86_64-unknown-linux-gnu/bin:/vscode/vscode-server/bin/linux-x64/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/bin/remote-cli:/home/mos/.cargo/bin:/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "mos-sim-clang" "/workspaces/aoc2022/target/mos-sim-none/debug/deps/day05-1a225096d46c9da8.utils-18b4fb0c02a82c8a.kiaph6zru6fpqwm.rcgu.o.rcgu.o" "-Wl,--as-needed" "-L" "/workspaces/aoc2022/target/mos-sim-none/debug/deps" "-L" "/workspaces/aoc2022/target/debug/deps" "-L" "/usr/local/rust-mos/lib/rustlib/mos-sim-none/lib" "-Wl,-Bstatic" "/workspaces/aoc2022/target/mos-sim-none/debug/deps/libcompiler_builtins-9abd7b3e31c55817.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/local/rust-mos/lib/rustlib/mos-sim-none/lib" "-o" "/workspaces/aoc2022/target/mos-sim-none/debug/deps/day05-1a225096d46c9da8" "-Wl,--gc-sections" "-no-pie" "-Wl,--allow-multiple-definition" = note: mos-sim-clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument] ld.lld: warning: /workspaces/aoc2022/target/mos-sim-none/debug/deps/libcompiler_builtins-9abd7b3e31c55817.rlib: archive member 'lib.rmeta' is neither ET_REL nor LLVM bitcode ld.lld: error: undefined symbol: core::ptr::read_volatile::precondition_check::hc6e683b06660521a >>> referenced by compiler_builtins.341155e952fb7c36-cgu.0 >>> compiler_builtins-9abd7b3e31c55817.compiler_builtins.341155e952fb7c36-cgu.0.rcgu.o:(compiler_builtins::mem::memcpy::he53af0bf8242f996) in archive /workspaces/aoc2022/target/mos-sim-none/debug/deps/libcompiler_builtins-9abd7b3e31c55817.rlib >>> referenced by compiler_builtins.341155e952fb7c36-cgu.0 >>> compiler_builtins-9abd7b3e31c55817.compiler_builtins.341155e952fb7c36-cgu.0.rcgu.o:(compiler_builtins::mem::memmove::h4443803a7b3fd399) in archive /workspaces/aoc2022/target/mos-sim-none/debug/deps/libcompiler_builtins-9abd7b3e31c55817.rlib >>> referenced by compiler_builtins.341155e952fb7c36-cgu.0 >>> compiler_builtins-9abd7b3e31c55817.compiler_builtins.341155e952fb7c36-cgu.0.rcgu.o:(compiler_builtins::mem::memmove::h4443803a7b3fd399) in archive /workspaces/aoc2022/target/mos-sim-none/debug/deps/libcompiler_builtins-9abd7b3e31c55817.rlib mos-sim-clang: error: ld.lld command failed with exit code 1 (use -v to see invocation)
building it in release mode crashes mos-sim: https://github.com/llvm-mos/llvm-mos-sdk/issues/307
fixed by https://github.com/mrk-its/rust-mos/commit/8720a1d68b73e3c1d94e5d35d9ce333ee6c7ce06
https://github.com/mrk-its/aoc2022/tree/new_rust