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

Unable to find long double symbols on aarch64-apple-darwin #567

Closed
tgross35 opened this issue Dec 28, 2023 · 4 comments
Closed

Unable to find long double symbols on aarch64-apple-darwin #567

tgross35 opened this issue Dec 28, 2023 · 4 comments

Comments

@tgross35
Copy link
Contributor

I am working on rust-lang/rust#114607 and unfortunately can't build on my system due to linker errors:

  = note: ld: warning: ignoring duplicate libraries: '-lSystem'
          ld: Undefined symbols:
            ___addtf3, referenced from:
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
            ___divtf3, referenced from:
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
            ___multf3, referenced from:
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
            ___subtf3, referenced from:
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
            ___trunctfdf2, referenced from:
                _$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$::fmt::h8dd8a3b2b4bc54ac in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.06.rcgu.o
                core::fmt::float::_$LT$impl$u20$core..fmt..Debug$u20$for$u20$f128$GT$::fmt::h0686fe3ef7164d45 in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.10.rcgu.o
            ___unordtf2, referenced from:
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
                std::num::test_num::h83194c034ce7125a in std-a7f7c4c812353510.std.3e4ab7aa3f61e492-cgu.12.rcgu.o
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
---
          ld: Undefined symbols:
            ___extenddftf2, referenced from:
                __RNvNtCsgSq1suy33ib_12clippy_utils6consts19lit_to_mir_constant in libclippy_utils-52261686d0193f09.rlib[10](clippy_utils-52261686d0193f09.clippy_utils.c495e003dc0e053d-cgu.07.rcgu.o)
            ___trunctfdf2, referenced from:
                __RINvXs1_NtCsgSq1suy33ib_12clippy_utils6constsNtB6_8ConstantNtNtCsdSdPP26wXhD_4core4hash4Hash4hashNtCsgzWzvnNrs6k_10rustc_hash8FxHasherEB8_ in libclippy_utils-52261686d0193f09.rlib[10](clippy_utils-52261686d0193f09.clippy_utils.c495e003dc0e053d-cgu.07.rcgu.o)

It seems like a fix similar to rust-lang/libc#1034 may work, I can submit a PR if this seems correct. @Amanieu

@Amanieu
Copy link
Member

Amanieu commented Jan 8, 2024

If we are supporting these types directly in Rust then we should add these intrinsics to compiler-builtins. For now you can just change the compiler-builtins build script to include the versions from compiler-rt, but eventually we will want to have these fully implemented in Rust.

@tgross35
Copy link
Contributor Author

@Amanieu are you able to move this issue to compiler-builtins?

It seems like they should be getting included already, so I'm not sure what is going on https://github.com/rust-lang/compiler-builtins/blob/47e64bfa0a387c811e4c409959a4d2668f0b1c37/build.rs#L506C20-L512. This is on aarch64-apple-darwin, I don't have any reason to think +nofp is set

@Amanieu Amanieu transferred this issue from rust-lang/libc Jan 16, 2024
@Amanieu
Copy link
Member

Amanieu commented Jan 16, 2024

Are you building with the "c" feature of compiler-builtins? We only enable this when building with x.py but not for -Zbuild-std.

@tgross35
Copy link
Contributor Author

This should be fixed by #593, #606, and others that are listed in the readme

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.

2 participants