rust-lang / log

Logging implementation for Rust
https://docs.rs/log
Apache License 2.0
2.16k stars 250 forks source link

Building log as a dependency doesn't work on arm64 #542

Closed lirannl closed 1 year ago

lirannl commented 1 year ago

I have an arm64 machine, and I'm trying to build a package that requires log.

Version: 0.4.17

error: failed to run custom build command for 'log v0.4.17'

Caused by:
  could not execute process '/tmp/cargo-installvKtAeG/release/build/log-b353450b8bd9d1bd/build-script-build' (never executed)

Caused by:
  Permission denied (os error 13)

(I assume this is an x86_64 executable that's being run, which obviously won't work on my machine)

NobodyXu commented 1 year ago

Looking at the error message, it seems like the executable of build script does not have its executable bit set.

This is probably a bug of rustc, not a bug of log, since it does not distribute any pre-compiled binaries.

I think upgrading to the latest rustc might fix the problem.

lirannl commented 1 year ago

I just installed rust nightly on this machine a few minutes ago. Is that not new enough?

As for it not being log, why would it fail (consistently) while building log?

NobodyXu commented 1 year ago

I just installed rust nightly on this machine a few minutes ago. Is that not new enough?

You need to runn "cargo +nightly build" in order to use the nightly compiler.

As for it not being log, why would it fail (consistently) while building log?

That's probably because of the caching. Try removing target, it might give different result.

Thomasdezeeuw commented 1 year ago

I think this is a duplicate of https://github.com/rust-lang/log/issues/503, https://github.com/rust-lang/log/issues/425 and https://github.com/rust-lang/log/issues/424. See:

TL;DR as @NobodyXu said cargo clean and try again.

JohnTitor commented 1 year ago

Triage: Closing as duplicate, feel free to re-open if the issue still exists after running cargo clean. Thanks for reporting!