-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On rust nightly: 0.88.8 build fails on macOS: Generator process panicked: Any { .. } #548
Comments
Please attach a full build log as produced by |
I also can confirm this fails on "hello world" app with this Cargo.toml:
|
I'm having this issue as well, seems like macOS devs have been running into similar problems a lot recently. I'm not a C/C++ dev, so there's a good chance that my environment is just borked, though the numerous thread panics are quite conspicuous. I've looked through the troubleshooting guide and applied some of the pointers there to the best of my knowledge, unfortunately to no avail, so I'll post my diagnostics/logs here to help narrow down the cause. Here's my setup info:➜ NoCashMoCap git:(main) ✗ rustc -V --verbose
rustc 1.78.0-nightly (d18480b84 2024-03-04)
binary: rustc
commit-hash: d18480b84fdbf1efc34f62070951334aa833d761
commit-date: 2024-03-04
host: x86_64-apple-darwin
release: 1.78.0-nightly
LLVM version: 18.1.0
➜ NoCashMoCap git:(main) ✗ sw_vers
ProductName: macOS
ProductVersion: 14.3.1
BuildVersion: 23D60
➜ NoCashMoCap git:(main) ✗ brew info opencv
==> opencv: stable 4.9.0 (bottled)
Open source computer vision library
https://opencv.org/
/usr/local/Cellar/opencv/4.9.0_4 (971 files, 258.7MB) *
Poured from bottle using the formulae.brew.sh API on 2024-03-05 at 02:00:23
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/o/opencv.rb
License: Apache-2.0
==> Dependencies
Build: cmake ✘, pkg-config ✔, python-setuptools ✔
Required: ceres-solver ✔, eigen ✔, ffmpeg ✔, glog ✔, harfbuzz ✔, jpeg-turbo ✔, libpng ✔, libtiff ✔, numpy ✔, openblas ✔, openexr ✔, openjpeg ✔, openvino ✔, protobuf ✔, [email protected] ✔, tbb ✔, vtk ✔, webp ✔
==> Analytics
install: 11,236 (30 days), 30,599 (90 days), 126,105 (365 days)
install-on-request: 10,434 (30 days), 28,308 (90 days), 117,814 (365 days)
build-error: 37 (30 days)
➜ NoCashMoCap git:(main) ✗ echo $DYLD_FALLBACK_LIBRARY_PATH
/Library/Developer/CommandLineTools/usr/lib/ Here's my project's `Cargo.toml`:[package]
name = "ncmcap"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
opencv = { version = "0.88.8", features = ["clang-runtime"] }
nalgebra = "0.32.4"
apriltag = "0.4.0" And here's my build log, exported via Since this is a CV project, I'd rather not have to use a container (performance, camera binding, etc.) but for now I think that's the best way to go. If I make any headway with this, I'll update this with my findings should anyone be interested. |
Following the updated macOS install tips found in #494 allowed me to compile the package with a reduced scope. At the moment, I only need the [dependencies]
opencv = { version = "0.88.8", default-features = false, features = [
"clang-runtime",
"highgui",
"videoio",
"calib3d",
] } I've been able to successfully open a |
Looks like at least "xphoto" and "face" modules are affected. The exact error produced is:
which happens in |
Hey, for those who want a quick-n-dirty fix, I've created a fork that can be compiled with the nightly version. The instructions on usage are inside the README. You can use it like so: [dependencies]
opencv = { git = "https://github.com/TDiblik/opencv-rust-nightly-compilation.git" } TLDR for @twistedfall; My fork only "merges" the fix to clang-rs and includes this fixed clang-rs as a dependency of The main goal of this fork is to be a temporary drop-in replacement for opencv until the mentioned clang-rs PR gets merged and opencv-rust "fixes itself", so that those who need to compile under nightly ASAP (my case) can. Hence, I will try to keep this fork up-to-date, until then. Are you ok with that? Alternatively, if you want to keep people from pointing to my fork, you could take the fork changes and drop them into some branch called "nightly-fix" (or something like that) so that people can refer to this repo instead of mine. Awesome project btw, keep it up! |
@TDiblik Thanks a lot for your work and investigation! Let's hope that the fix in clang will land before the the rust changes land in stable otherwise vendoring would be the only option however I'd like to avoid it. |
Small update: the PR in It's been on 2.0.0 for years now... 😅 |
While we wait for the new |
The text was updated successfully, but these errors were encountered: