-
Notifications
You must be signed in to change notification settings - Fork 67
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
linking with rust-lld
failed: exit status: 1
#87
Comments
I think there has been a slight breaking change in the Rust compiler. I had the same problem and was able to work around it by changing from
|
I also encountered the same problem in rustc 1.66.0-nightly. I was helped by rolling back to the version (nightly-2022-07-15-x86_64), rustc 1.64.0-nightly |
Thanks for reporting! This appears to be an accidental regression in See also rust-osdev/bootloader#271. |
This should be fixed on the latest Rust nightlies. |
Build Error ->
Building bootloader
Compiling bootloader v0.9.23 (/home/vishwak/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/bootloader-0.9.23)
error: linking with
rust-lld
failed: exit status: 1|
= note: "rust-lld" "-flavor" "gnu" "/tmp/rustce5sqQC/symbols.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.0.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.1.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.10.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.11.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.12.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.13.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.14.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.15.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.2.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.3.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.4.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.5.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.6.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.7.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.8.rcgu.o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.9.rcgu.o" "--as-needed" "-L" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps" "-L" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/release/deps" "-L" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/build/bootloader-fde440b665d7cabe/out" "-L" "/home/vishwak/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-bootloader/lib" "-Bstatic" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libxmas_elf-1b0eb3c9e888241a.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libzero-57189841b2339f05.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libx86_64-e25559ea51de7d3f.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libvolatile-d6ac5c40aab33080.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libbitflags-31a974eb394720c5.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libbit_field-9221251971479c34.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libusize_conversions-62d1ca308bc02994.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libfixedvec-ff02a9f57794635e.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libbootloader-2367883e8c24fdcd.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/librlibc-49b62c07f530266c.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/librustc_std_workspace_core-22c20f375a03a6ed.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libcore-12df7a30b9be6a65.rlib" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/libcompiler_builtins-b00de6a92c2e2781.rlib" "-Bdynamic" "--eh-frame-hdr" "-znoexecstack" "-L" "/home/vishwak/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-bootloader/lib" "-o" "/home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7" "--gc-sections" "-O1"
= note: rust-lld: error: undefined symbol: _rest_of_bootloader_start_addr
>>> referenced by bootloader.cc87495c-cgu.1
>>> /home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.1.rcgu.o:(.boot-first-stage+0x60)
>>> referenced by bootloader.cc87495c-cgu.1
>>> /home/vishwak/Desktop/rob_os/target/bootimage/bootloader/x86_64-bootloader/release/deps/bootloader-450374ad17af6ce7.bootloader.cc87495c-cgu.1.rcgu.o:(.boot-first-stage+0x7B)
error: could not compile
bootloader
due to previous errorError: Bootloader build failed.
Stderr:
The text was updated successfully, but these errors were encountered: