Skip to content
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

Building libuvc-rs on aarch64 fails with "error[E0425]: cannot find function uvc_mjpeg2rgb in this scope" #31

Open
andrii619 opened this issue Jun 14, 2024 · 0 comments

Comments

@andrii619
Copy link

andrii619 commented Jun 14, 2024

Hi, I am currently building libuvc-rs on an aarch64 architecture. I think my build fails since it cant find libjpeg on my system.
If I run cmake to compile a test app I can see what the current path of libjpeg is:
JPEG_INCLUDE_DIR: /usr/include | JPEG_LIBRARIES: /usr/lib/aarch64-linux-gnu/libjpeg.so

Any idea how I can let cargo know of the exact libjpeg path?

And here is a detailed cargo build output:
Compiling uvc v0.2.0 Running CARGO=/home/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=uvc CARGO_MANIFEST_DIR=/home/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uvc-0.2.0 CARGO_PKG_AUTHORS='Magnus Ulimoen <flymagnus@gmail.com>' CARGO_PKG_DESCRIPTION='Safe and ergonomic wrapper around libuvc, allowing capture of webcam streams' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=uvc CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/mulimoen/libuvc-rs.git' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/root/rust-uvc-server/target/debug/deps:/home/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib' /home/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustc --crate-name uvc --edition=2018 /home/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uvc-0.2.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=171 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=83bfea8dfb414f43 -C extra-filename=-83bfea8dfb414f43 --out-dir /home/root/rust-uvc-server/target/debug/deps -L dependency=/home/root/rust-uvc-server/target/debug/deps --extern uvc_sys=/home/root/rust-uvc-server/target/debug/deps/libuvc_sys-c9d07d5665601a18.rmeta --cap-lints warn error[E0425]: cannot find function 'uvc_mjpeg2rgb' in this scope --> /home/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uvc-0.2.0/src/frame.rs:39:39 | 39 | FrameFormat::MJPEG => uvc_mjpeg2rgb(self.frame.as_ptr(), new_frame.frame.as_ptr()), | ^^^^^^^^^^^^^ not found in this scope
For more information about this error, try 'rustc --explain E0425'. error: could not compile 'uvc' (lib) due to 1 previous error
Caused by:
process didn't exit successfully: 'CARGO=/home/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=uvc CARGO_MANIFEST_DIR=/home/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uvc-0.2.0 CARGO_PKG_AUTHORS='Magnus Ulimoen flymagnus@gmail.com' CARGO_PKG_DESCRIPTION='Safe and ergonomic wrapper around libuvc, allowing capture of webcam streams' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=uvc CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/mulimoen/libuvc-rs.git' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/root/rust-uvc-server/target/debug/deps:/home/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib' /home/root/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustc --crate-name uvc --edition=2018 /home/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/uvc-0.2.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=171 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=83bfea8dfb414f43 -C extra-filename=-83bfea8dfb414f43 --out-dir /home/root/rust-uvc-server/target/debug/deps -L dependency=/home/root/rust-uvc-server/target/debug/deps --extern uvc_sys=/home/root/rust-uvc-server/target/debug/deps/libuvc_sys-c9d07d5665601a18.rmeta --cap-lints warn (exit status: 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant