Skip to content

Failed to build aws-lc-rs with LLVM v19.1 due to rustc error E0425Β #476

@rami3l

Description

@rami3l

@justsmth thank you so much for your investigation and hard work so far! I'll see you again very soon in other follow-up issues 😢
#453 (comment)

Here we go πŸ€¦β€β™€οΈ

Problem

After merging rust-lang/rustup#3898, Rustup's FreeBSD CI has started failing.

rust-lang/rustup#3979 tries to set up the necessary dependencies for the build, namely cmake-core and llvm-devel-lite (for libclang.so). Since it's internal bindgen by default, bindgen-cli doesn't seem to be required.

But still, Compiling aws-lc-sys v0.20.1 seems to have failed with the following log:

  error[E0425]: cannot find function, tuple struct or tuple variant `ERR_GET_LIB_RUST` in this scope
    --> /home/runner/work/rustup/rustup/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.20.1/src/lib.rs:74:14
     |
  74 |     unsafe { ERR_GET_LIB_RUST(packed_error) }
     |              ^^^^^^^^^^^^^^^^ not found in this scope
  error[E0425]: cannot find function, tuple struct or tuple variant `ERR_GET_REASON_RUST` in this scope
    --> /home/runner/work/rustup/rustup/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.20.1/src/lib.rs:80:14
     |
  80 |     unsafe { ERR_GET_REASON_RUST(packed_error) }
     |              ^^^^^^^^^^^^^^^^^^^ not found in this scope
  error[E0425]: cannot find function, tuple struct or tuple variant `ERR_GET_FUNC_RUST` in this scope
    --> /home/runner/work/rustup/rustup/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.20.1/src/lib.rs:86:14
     |
  86 |     unsafe { ERR_GET_FUNC_RUST(packed_error) }
     |              ^^^^^^^^^^^^^^^^^ not found in this scope
  error[E0425]: cannot find function, tuple struct or tuple variant `BIO_ctrl` in this scope
    --> /home/runner/work/rustup/rustup/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.20.1/src/lib.rs:91:14
     |
  91 |     unsafe { BIO_ctrl(b, BIO_CTRL_INFO, 0, pp.cast::<c_void>()) }
     |              ^^^^^^^^ not found in this scope
  error[E0425]: cannot find function, tuple struct or tuple variant `CRYPTO_library_init` in this scope
    --> /home/runner/work/rustup/rustup/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.20.1/src/lib.rs:95:14
     |
  95 |     unsafe { CRYPTO_library_init() }
     |              ^^^^^^^^^^^^^^^^^^^ not found in this scope
  For more information about this error, try `rustc --explain E0425`.
  The following warnings were emitted during compilation:
  warning: aws-lc-sys@0.20.1: CMAKE environment variable set: cmake
  warning: aws-lc-sys@0.20.1: Generating bindings - internal bindgen. Platform: x86_64-unknown-freebsd
  error: could not compile `aws-lc-sys` (lib) due to 5 previous errors

https://github.com/rust-lang/rustup/actions/runs/10192459718/job/28195406529?pr=3979

Relevant details

FWIW, we use the following action for our FreeBSD tests:

- uses: vmactions/freebsd-vm@v1
  with:
    release: 13.2
    usesh: true
    copyback: false
    prepare: |
      pkg install -y git gmake bash sudo cmake-core llvm-devel-lite

https://github.com/rust-lang/rustup/blob/8fdc61316891cdb72acf406b2ac929227ceb0068/ci/actions-templates/freebsd-builds-template.yaml

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbuild problemBuild failure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions