Binary depending on spd does not compile #4

Open
opened 2023-03-23 17:11:42 -06:00 by emma · 0 comments
Owner
╭ emma@noire-carnation
│ ~/s/e/spd-testing 
╰─[main]# cargo build --release
   Compiling spd-testing v0.1.0 (/home/emma/src/TiB/emma/spd-testing)
error: linking with `gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/emma/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/emma/.local/share/cargo/bin:/home/emma/.local/bin:/home/emma/.local/games:/home/emma/.local/bin:/home/emma/.local/games:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/cmdline-tools/latest/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "gcc" "-m64" "/tmp/rustcaNeIVI/symbols.o" "/home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528.spd_testing.f462ad24-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/emma/src/TiB/emma/spd-testing/target/release/deps" "-L" "/home/emma/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/emma/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-87185c5e58e44fea.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/emma/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-Wl,--strip-all" "-nodefaultlibs" "-fuse-ld=mold"
  = note: mold: error: undefined symbol: __libc_start_main
          >>> referenced by /usr/lib/Scrt1.o:(.text)
          >>>               /usr/lib/Scrt1.o:(_start)
          mold: error: undefined symbol: strlen
          >>> referenced by spd_testing.f462ad24-cgu.0
          >>>               /home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528.spd_testing.f462ad24-cgu.0.rcgu.o:(main)
          mold: error: undefined symbol: puts
          >>> referenced by spd_testing.f462ad24-cgu.0
          >>>               /home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528.spd_testing.f462ad24-cgu.0.rcgu.o:(spd::entry::invalid_cli_args_error::h151de11646f0d865)
          mold: error: undefined symbol: write
          >>> referenced by spd_testing.f462ad24-cgu.0
          >>>               /home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528.spd_testing.f462ad24-cgu.0.rcgu.o:(spd::macros::libc_write::hf1a375eef5d3ba6c)
          collect2: error: ld returned 1 exit status
          

warning: `spd-testing` (bin "spd-testing") generated 1 warning
error: could not compile `spd-testing` due to previous error; 1 warning emitted

The source file in question:

#![no_main]
#![no_std]

use spd::*;
	
#[no_mangle]
fn rust_main(_: entry::Args) -> isize {
    println!("Hello, world!");
    0
}
```sh ╭ emma@noire-carnation │ ~/s/e/spd-testing ╰─[main]# cargo build --release Compiling spd-testing v0.1.0 (/home/emma/src/TiB/emma/spd-testing) error: linking with `gcc` failed: exit status: 1 | = note: LC_ALL="C" PATH="/home/emma/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/emma/.local/share/cargo/bin:/home/emma/.local/bin:/home/emma/.local/games:/home/emma/.local/bin:/home/emma/.local/games:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/cmdline-tools/latest/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "gcc" "-m64" "/tmp/rustcaNeIVI/symbols.o" "/home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528.spd_testing.f462ad24-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/emma/src/TiB/emma/spd-testing/target/release/deps" "-L" "/home/emma/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/emma/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-87185c5e58e44fea.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/emma/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-Wl,--strip-all" "-nodefaultlibs" "-fuse-ld=mold" = note: mold: error: undefined symbol: __libc_start_main >>> referenced by /usr/lib/Scrt1.o:(.text) >>> /usr/lib/Scrt1.o:(_start) mold: error: undefined symbol: strlen >>> referenced by spd_testing.f462ad24-cgu.0 >>> /home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528.spd_testing.f462ad24-cgu.0.rcgu.o:(main) mold: error: undefined symbol: puts >>> referenced by spd_testing.f462ad24-cgu.0 >>> /home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528.spd_testing.f462ad24-cgu.0.rcgu.o:(spd::entry::invalid_cli_args_error::h151de11646f0d865) mold: error: undefined symbol: write >>> referenced by spd_testing.f462ad24-cgu.0 >>> /home/emma/src/TiB/emma/spd-testing/target/release/deps/spd_testing-0d07c6eb41d5e528.spd_testing.f462ad24-cgu.0.rcgu.o:(spd::macros::libc_write::hf1a375eef5d3ba6c) collect2: error: ld returned 1 exit status warning: `spd-testing` (bin "spd-testing") generated 1 warning error: could not compile `spd-testing` due to previous error; 1 warning emitted ``` The source file in question: ```rs #![no_main] #![no_std] use spd::*; #[no_mangle] fn rust_main(_: entry::Args) -> isize { println!("Hello, world!"); 0 } ```
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: emma/spd#4
No description provided.