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

Build fails for x86_64-unknown-uefi on 0.1.22 #330

Closed
wangrunji0408 opened this issue Dec 8, 2019 · 4 comments · Fixed by #331
Closed

Build fails for x86_64-unknown-uefi on 0.1.22 #330

wangrunji0408 opened this issue Dec 8, 2019 · 4 comments · Fixed by #331

Comments

@wangrunji0408
Copy link
Contributor

wangrunji0408 commented Dec 8, 2019

See build log for uefi-rs:

909error: unknown directive
910            .pushsection .text.__rust_probestack
911            ^

Related change: #328

@alexcrichton
Copy link
Member

cc @tmandry, would you be able to help resolve this?

@tmandry
Copy link
Member

tmandry commented Dec 10, 2019

@wangrunji0408 What cfg flags can you use to detect when compiling for uefi?

I suspect that using the same version of define_rust_probestack! that's used for apple targets should work. Would you mind trying that? (Add the condition to this line and its negation to the definition above.)

@wangrunji0408
Copy link
Contributor Author

The cfg flag is target_os = "uefi".
I add this to the condition and it works!

Thank you!

@IsaacWoods
Copy link

Using compiler-builtins 0.1.23 on the x86_64-unknown-uefi target, I'm still getting an error related to this:

error: linking with `rust-lld` failed: exit code: 1
  |
  = note: "rust-lld" "rust-lld" "-flavor" "link" "/NOLOGO" "/NXCOMPAT" "/nodefaultlib" "/entry:efi_main" "/subsystem:efi_application" "/LIBPATH:/home/isaac/Documents/pebble/bootloader/target/sysroot/lib/rustlib/x86_64-unknown-uefi/lib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.0.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.1.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.10.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.11.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.12.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.13.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.14.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.15.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.2.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.3.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.4.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.5.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.6.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.7.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.8.rcgu.o" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.9.rcgu.o" "/OUT:/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.efi" "/OPT:REF,ICF" "/DEBUG" "/LIBPATH:/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps" "/LIBPATH:/home/isaac/Documents/pebble/bootloader/target/release/deps" "/LIBPATH:/home/isaac/Documents/pebble/bootloader/target/sysroot/lib/rustlib/x86_64-unknown-uefi/lib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/libucs2-34d7971def6cae6b.rlib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/libspin-23da354254f743df.rlib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/libx86_64-2e301c1904751972.rlib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/libbitflags-07b9cede61161c69.rlib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/libmer-cf09c753b2379a31.rlib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/libbit_field-c39c2f23f3f9e324.rlib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/libscroll-7da30c59d108e541.rlib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/liblog-2425fa268c335e43.rlib" "/home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/libcfg_if-10f276fd4b6390fc.rlib" "/home/isaac/Documents/pebble/bootloader/target/sysroot/lib/rustlib/x86_64-unknown-uefi/lib/librustc_std_workspace_core-9a07ce7eb7f29508.rlib" "/home/isaac/Documents/pebble/bootloader/target/sysroot/lib/rustlib/x86_64-unknown-uefi/lib/libcore-f602a4ad14de93f5.rlib" "/home/isaac/Documents/pebble/bootloader/target/sysroot/lib/rustlib/x86_64-unknown-uefi/lib/libcompiler_builtins-51b99276e9282327.rlib"
  = note: rust-lld: error: undefined symbol: __rust_probestack
          >>> referenced by /home/isaac/Documents/pebble/bootloader/target/x86_64-unknown-uefi/release/deps/bootloader-c380151c5d369801.bootloader.599nz8q7-cgu.0.rcgu.o:(efi_main)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants