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

Failure to build: v4l, confy, mozjpeg #2

Open
Progman2k opened this issue Nov 24, 2024 · 5 comments
Open

Failure to build: v4l, confy, mozjpeg #2

Progman2k opened this issue Nov 24, 2024 · 5 comments

Comments

@Progman2k
Copy link

Progman2k commented Nov 24, 2024

It appears that changes to the available packages on Cargo in the last few years have broken the build process since commit 250f2e5, at least under Xubuntu 24 with kernel 6.8.0-48.

With stock files:
"v4l2_pix_format_union_(anonymous_at_/usr/include/linux/videodev2_h_500_2)" is not a valid Ident

Based on comments under l1npengtul/nokhwa#147 I changed Cargo.toml to include

[target.'cfg(target_os = "linux")'.dependencies]
v4l = "0.14"
v4l2-sys-mit = "0.3"

Running 'cargo update' then gives

error: failed to select a version for `confy`.
    ... required by package `spectro-cam-rs v0.1.0 (/path/to/spectro-cam-rs-main)`
versions that meet the requirements `^0.4.0` are: 0.4.0

the package `spectro-cam-rs` depends on `confy`, with features: `yaml_conf` but `confy` does not have these features.

Changing 'confy' to v0.5.0 and re-running 'cargo update' gives

error: failed to select a version for the requirement `mozjpeg = "^0.8.24"`
candidate versions found which didn't match: 0.10.10, 0.10.9, 0.10.8, ...
location searched: crates.io index
required by package `nokhwa v0.9.4`
    ... which satisfies dependency `nokhwa = "^0.9.4"` of package `spectro-cam-rs v0.1.0 (/path/to/spectro-cam-rs-main)`

Blindly switching nokhwa to v0.10.5 is not sufficient. That is enough to get a clean run of 'cargo update' but the build fails with a number of errors such as

error[E0432]: unresolved imports `nokhwa::CameraFormat`, `nokhwa::FrameFormat`, `nokhwa::Resolution`, `nokhwa::ThreadedCamera`

I have not yet tried to chase down exactly what has changed between those versions, but it seems at least some modifications to the spectro-cam-rs code will be needed to accommodate it.

@DerFetzer
Copy link
Owner

Thanks for the bug report.
I've wanted to update the dependencies for some time but never found the time for it.
I started yesterday and there are quite a lot breaking changes, so this will probably take a while.

@wolfangpauli
Copy link

I have noticed the same errors as reported by Progman2k. Thanks for this piece of free software and the efforts of bug fixing!

@DerFetzer
Copy link
Owner

DerFetzer commented Dec 17, 2024

I've pushed the current working state and at least CI is running ok so it should build.
All dependencies were upgraded to their latest versions, but there are still some things missing.
The biggest issue is that camera controls are not working at the moment because the API has been heavily changed there.

@Joel-Mckay
Copy link

I built the version on 2024 Oct 13:

git rev-parse HEAD
250f2e5

uname -a
Linux ___ 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

If I could figure out how to build a flatpak for you guys I would, but so far no joy =)

Also, that version has a weird bug with some cameras in that the peaks can go negative under UVC lamps. I am working on a simple stepper filter wheel to help knock out peak aliases with cheap gratings (about 80% done with the 3D printed models.)

Best regards,
=)

uvc_wide

@DerFetzer
Copy link
Owner

@Joel-Mckay Looks great with the colors! Do you mind creating a pull request?

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

4 participants