mdaffin/loopdev

Failed to install on Fedora 38(aarch64)

Qinka opened this issue · 4 comments

Qinka commented

I use fedora 38 (aarch64). Get error output:

error: failed to run custom build command for `loopdev v0.4.0`

Caused by:
  process didn't exit successfully: `/home/qinka/WorkSpaces/mcdcat/target/debug/build/loopdev-e5fd15abe1760b06/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/loop_h_16_1)" is not a valid Ident', /home/qinka/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-2eab394af869c8a2/proc-macro2-1.0.56/src/fallback.rs:811:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

uname -a output:

$ uname -a
Linux etvp-rpi 6.2.11-300.fc38.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Apr 13 20:30:09 UTC 2023 aarch64 GNU/Linux

@Qinka This is a known problem (see #63 ) and will be resolved in the next loopdev release. If you are building a project that depends on loopdev via cargo you can do a temporary fix like the one here: stratis-storage/libcryptsetup-rs#283 .

For completeness sake, the rust-loopdev package in Fedora installs because it's been patched to update its bindgen dependency, see koschei log[1] for the record of builds of the package.

So, that your build is failing indicates to me that you're probably using the "cargo-install" command or something to build something which relies on the loopdev crate from source.

[1] https://koschei.fedoraproject.org/package/rust-loopdev?last_seen_ts=1676838855&collection=f38

There is more information on the cause of the bug here: rust-lang/rust-bindgen#2488 .

@Qinka We decided to fork the project here: https://github.com/stratis-storage/loopdev-3/releases/tag/loopdev-3-v0.5.0 . It will resolve the problem you experienced.