Skip to content

Unable to build ruff on aarch64 alpine docker #10159

Closed as not planned
Closed as not planned
@matejsp

Description

@matejsp

I am getting undefined reference to `getauxval' using ruff 0.2.2 and rust 1.75.0

I saw mentioning this issue very often and in rust-lang/rust#89626 there is potencial workaround:
CFLAGS=-mno-outline-atomics but I don't know if same solution applies to ruff and where to put it.

d5eeb851975c9e9d.yansi_term.b1b943cb7c038b2f-cgu.0.rcgu.o.rcgu.o" "/tmp/pip-req-build-g44dfv8y/target/release/deps/ruff-40440a78eac19877.yansi_term-d5eeb851975c9e9d.yansi_term.b1b943cb7c038b2f-cgu.1.rcgu.o.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/pip-req-build-g44dfv8y/target/release/deps" "-L" "/tmp/pip-req-build-g44dfv8y/target/release/build/tikv-jemalloc-sys-c62787d9c96f094e/out/build/lib" "-L" "/usr/local/lib/rustlib/aarch64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/tmp/rustc4x3SZs/libtikv_jemalloc_sys-a7374e6d0308fde8.rlib" "-lunwind" "-lc" "/usr/local/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-38b80b5b9028b8db.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/usr/local/lib/rustlib/aarch64-unknown-linux-musl/lib" "-L" "/usr/local/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained" "-o" "/tmp/pip-req-build-g44dfv8y/target/release/deps/ruff-40440a78eac19877" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-s" "/usr/local/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtend.o" "/usr/local/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtn.o"
        = note: /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /usr/local/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-38b80b5b9028b8db.rlib(45c91108d938afe8-cpu_model.o): in function `init_have_lse_atomics':
                /cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.103/./lib/builtins/cpu_model.c:1075: undefined reference to `getauxval'
                /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /usr/local/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-38b80b5b9028b8db.rlib(45c91108d938afe8-cpu_model.o): in function `init_cpu_features':
                /cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.103/./lib/builtins/cpu_model.c:1373: undefined reference to `getauxval'
                /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.103/./lib/builtins/cpu_model.c:1374: undefined reference to `getauxval'
                collect2: error: ld returned 1 exit status
        = note: 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)
      error: aborting due to previous error
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/source/python311/bin/python3.11', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for support or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions