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

camera-streamer fails to compile on Bookworm #278

Closed
mryel00 opened this issue Nov 30, 2024 · 11 comments · Fixed by #280
Closed

camera-streamer fails to compile on Bookworm #278

mryel00 opened this issue Nov 30, 2024 · 11 comments · Fixed by #280
Labels
bug Something isn't working

Comments

@mryel00
Copy link
Member

mryel00 commented Nov 30, 2024

What happened

Currently Crowsnest fails to build on Bookworm installations. This is due to an error with camera-streamer during compilation.

What did you expect to happen

camera-streamer compilation without errors.

How to reproduce

Try to install Crowsnest on a Bookworm installation.

Additional information

This error only occurs on Bookworm installations!!!

Libcamera added a new ControlType, Point, with v0.3.2+rpt20241119. camera-streamer has an implementation error, that triggers, as soon as a new ControlType gets added, as it doesn't implement a default behavior for a not implemented ControlType.
This will be fixed with the merge of either ayufan/camera-streamer#160 into the camera-streamer main branch, or changing the repo, that gets cloned during installation, to a repo containing the fix.

@mryel00 mryel00 added the bug Something isn't working label Nov 30, 2024
@crim491
Copy link

crim491 commented Dec 1, 2024

I recreated this issue on a Rpi 3B using a fresh raspbian minimal install while installing klipper. The image that crowsnest is being built on was from the foundation dated 2024-11-19-raspios-bookworm-arm64-lite.

image

@mryel00
Copy link
Member Author

mryel00 commented Dec 1, 2024

To be clear, this issue will happen on all Bookworm installations, as we are updating the packages, before installing Crowsnest.

The merge into camera-streamer might take a few days, so you can do the following workaround until that:
Set CN_CAMERA_STREAMER_REPO in ~/crowsnest/tools/libs/config.sh to https://github.com/mryel00/camera-streamer.git. You should also make sure that the camera-streamer folder is deleted before you try the installation again: rm -rf ~/crowsnest/bin/camera-streamer

After the installation succeeded you should reset the file with cd ~/crowsnest && git restore tools/libs/config.sh

@crim491
Copy link

crim491 commented Dec 1, 2024

I recreated this issue on a Rpi 3B using a fresh raspbian minimal install while installing klipper. The image that crowsnest is being built on was from the foundation dated 2024-11-19-raspios-bookworm-arm64-lite.

image

The compile time error here are do to unhandled enumerated values not being handled in the switch statement. Really just warnings but all warnings are being treated as errors.

@mryel00
Copy link
Member Author

mryel00 commented Dec 1, 2024

I will not change the compiler settings, just to circumvent this warning. This would be even more work than the actual fix, as the current codebase is really annoying...
If you would look at the PR, it's implementing a clean fix instead of circumventing "errors" by just ignoring them. The warning is there for a good reason, as we would get weird behavior as soon as someone would try to use ControlTypePoint in any way.

It might sound rude, but please stop sending more messages that won't fix anything. I'm the maintainer of crowsnest, if you didn't know it yet. I know what this "error" means, I know how to fix it and I decided to only fix this correct within camera-streamer. So either I will change the repo to my own repo, or, what's more likely, I will wait for the camera-streamer dev to merge it. He already knows of this PR and will need some days before merging it.

So please just have patience, instead of sending informations that won't fix anything. The official workaround for now, is to use my branch of camera-streamer temporarily for one compilation.

@mryel00
Copy link
Member Author

mryel00 commented Dec 1, 2024

Also if you know your way around in C++, your time might be better spent to maybe review my code, so that we can fix issues, I might have missed, to save the camera-streamer dev some time 😄

@crim491
Copy link

crim491 commented Dec 1, 2024

I am just reporting what I saw. Maybe something was missed or overlooked. I figured the minimal effort I could put in is just alert to the issue. Its super annoying to encounter compile time problems like this while executing scripts on an unrelated but operational project..i.e. KIAUH. I have an embedded background and have an operational understanding of C/C++

@mryel00
Copy link
Member Author

mryel00 commented Dec 1, 2024

Its super annoying to encounter compile time problems like this while executing scripts on an unrelated but operational project..i.e. KIAUH

You should understand what KIAUH is doing. It's executing install scripts. So if you encounter any issues, it's nearly always connected to the project that you want to install (I guess you understood that much already). In case of Crowsnest it's even worse, as you are "just starting" another script that will just compile something else again. So Crowsnest is also completely operational and basically unrelated to camera-streamer, but you encounter a compile time error. That annoys me a lot more as it was again just introduced by some update again and hinders people to install it.

I am just reporting what I saw. Maybe something was missed or overlooked.

I'm thankful for that, but sometimes it's getting annoying if people just write, "I have the same issue", "That solved it for me too", .... It was just the content of your messages both didn't bring anything new to the table, that was the core idea of why I wrote "stop sending more messages". You just brought up a screenshot at first of the error, that was still fine, even if I already linked the fix. Then you pointed out the only error in your screenshot later, that is basically fixed with the PR that I already linked. This just lets me assume that you maybe don't have that much knowledge, that you obviously seem to have.

I hate how I always type that much, but I want that people can understand my intention behind decisions or messages. So now you hopefully understand, why I got a bit annoyed by your second message.

@crim491
Copy link

crim491 commented Dec 1, 2024

I only just realized I posted to the wrong project. My bad.

@spikeygg
Copy link

spikeygg commented Dec 1, 2024

To be clear, this issue will happen on all Bookworm installations, as we are updating the packages, before installing Crowsnest.

This totally works! Thanks for putting this together. I found this thread on Reddit that mentioned recompiling the camera-streamer but when I tried it died -- then looking through the issues I found yours about bookworm. I just got mine to compile, too. Hopefully, this change gets merged at some point.

BTW, in order to get my WebRTC to function correctly (to work in Fluidd/Mainsail and to be streamable by other devices on my network) I had to include: custom_flags: --camera-format=YUYV in every camera config which I found on the discord server posted by Mr Yel. -- and I think I just realized that you are Mr Yel. 👍

@DelusionalAI
Copy link

Thanks for this info! For me it was already installed, but the system updates broke my crowsnest anyway. In that case I was able to fix it by editing CROWSNEST_CAMERA_STREAMER_REPO_SHIP in ~crowsnest/bin/build.sh to be https://github.com/mryel00/camera-streamer.git and then running cd ~/crowsnest && make update. No need to delete the camera-streamer directory, the make command will do it.
Like Mr Yel's fix, you should run cd ~/crowsnest && git restore bin/build.sh after the fact.

Hopefully this is fixed upstream soon but I wanted to share in case someone else has a problem like mine in the mean time.

@mryel00
Copy link
Member Author

mryel00 commented Dec 7, 2024

Fixed temporarily by changing to my camera-streamer fork containing the fix.
I talked to Ayufan (dev of camera-streamer) and he might be able to merge it in about 1-2 weeks (no guarantee). After the merge I will swap back the repo to the official camera-streamer repo.

@mryel00 mryel00 closed this as completed Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants