Skip to content

Undefined reference to getauxval in function init_have_lse_atomics when compiling to nightly aarch64-unknown-linux-musl #89626

Open
@XAMPPRocky

Description

@XAMPPRocky

Code

I received this pull request, which caught a regression for aarch64-unknown-linux-musl when compiling for nightly. The same process works for stable and beta. I don't have a machine that can easily compile to this platform, so I can't reduce it at the moment: librasn/rasn#49

Version it worked on

It most recently worked on: Works on stable and beta 1.56.0-beta.4 (e6e620e1c 2021-10-04)

Version with regression

rustc --version --verbose: 1.57.0-nightly (0eabf25 2021-10-06)

Backtrace

= note: /rust/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-cbf6a032efba8222.rlib(cpu_model.o): In function `init_have_lse_atomics':
          /cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.49/./lib/builtins/cpu_model.c:786: undefined reference to `getauxval'
          collect2: error: ld returned 1 exit status
          
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

Metadata

Metadata

Assignees

Labels

A-linkageArea: linking into static, shared libraries and binariesA-linkersArea: linkers... you gotta love linkersC-bugCategory: This is a bug.O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateO-muslTarget: The musl libcP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions