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

"input_raspicam" plugin is not compiled #395

Open
Dephrilibrium opened this issue Sep 17, 2023 · 7 comments
Open

"input_raspicam" plugin is not compiled #395

Dephrilibrium opened this issue Sep 17, 2023 · 7 comments

Comments

@Dephrilibrium
Copy link

Dephrilibrium commented Sep 17, 2023

Heyho,

i tried to install the latest octoprint with "native" HQ-Cam support. So I followed the description of the manual installation. This guide relegates then to your experimental mjpg-streamer repo at Optional: Webcam.

When I run the build via make, my output skips a bunch of plugins and only builds the plugins:

  • input_file.so
  • input_http.so
  • input_uvc.so
  • output_file.so
  • output_http.so
  • output_rtsp.so
  • output_udp.so

Within the CMakeLists.txt, the raspi-plugin is added to the build-targets:

# Input plugins
add_subdirectory(plugins/input_file)
add_subdirectory(plugins/input_http)
add_subdirectory(plugins/input_opencv)
add_subdirectory(plugins/input_raspicam)    <---
add_subdirectory(plugins/input_ptp2)
add_subdirectory(plugins/input_uvc)

Unfortunately I'm not familiar with cmake, That's why I'm not sure about why some plugins are not built. May you have an idea to fix this.

Thanks in advance!

Edit:
Forgot to mention that I use a:

  • Raspberry Pi 3
  • with Raspbian OS Lite 64 running on it

Best regards,
Deph

@Dephrilibrium Dephrilibrium changed the title "input_raspicam" is not compiled "input_raspicam" plugin is not compiled Sep 17, 2023
@Dephrilibrium
Copy link
Author

Dephrilibrium commented Sep 17, 2023

Heyho again,

just solved the problem as I did a bit more search via google. By this I found Issue #259 of this repo.

This comment #259 (comment) explains what to do

The point with Raspbian64 and the raspicam-plugin is, that they moved a few dependencies from /opt/vc into /usr for more "standardization" (Ref to: https://forums.raspberrypi.com//viewtopic.php?t=275370 mentioned by #259 (comment)). So, go into the raspicam-plugin folder and adjust the dependency paths within the CMakeLists.txt file.

Short fix: Assuming, that you have entered the repositories' root in bash you can run:

sed -i 's_/opt/vc_/usr_g' mjpg-streamer-experimental/plugins/input_raspicam/CMakeLists.txt

from here, the make command should also try to build the input_raspicam.so

Edit:
Now the linker tells me, that I have missing libs, but I'm googling already a while, but I can't find out which packages I have to install to get the missing mmal libraries:

[ 44%] Linking C shared library input_raspicam.so
/usr/bin/ld: cannot find -lmmal_core
/usr/bin/ld: cannot find -lmmal_util
/usr/bin/ld: cannot find -lmmal_vc_client
collect2: error: ld returned 1 exit status

Kind regards,
Deph

@AkitaAttribute
Copy link

  • the need to fix this.

@Dephrilibrium
Copy link
Author

Heyho again,

I found a thread where it's mentioned to use sudo rpi-update and check if one line of the terminal-output says something like video-libraries updated.

As I searched for the lib-files I think I found them under /opt/vc/lib/*:

<user>@<host>:~/mjpg-streamer/mjpg-streamer-experimental $ sudo find / | grep mmal_
...
/opt/vc/lib/libmmal.so
/opt/vc/lib/libmmal_vc_client.so
/opt/vc/lib/libmmal_components.so
/opt/vc/lib/libmmal_util.so
/opt/vc/lib/libmmal_core.so
...

So the libs seem to be now available under the original paths (not replacing any paths in the CMakeLists.txt as described in my earlier post).

Then I tried a full rebuild under using:

make clean
make distclean
make

but now the output returns, that the libraries are incompatible and then they aren't found again:

[ 44%] Linking C shared library input_raspicam.so
/usr/bin/ld: skipping incompatible /opt/vc/lib/libmmal_core.so when searching for -lmmal_core
/usr/bin/ld: cannot find -lmmal_core
/usr/bin/ld: skipping incompatible /opt/vc/lib/libmmal_core.so when searching for -lmmal_core
/usr/bin/ld: skipping incompatible /opt/vc/lib/libmmal_util.so when searching for -lmmal_util
/usr/bin/ld: cannot find -lmmal_util
/usr/bin/ld: skipping incompatible /opt/vc/lib/libmmal_util.so when searching for -lmmal_util
/usr/bin/ld: skipping incompatible /opt/vc/lib/libmmal_vc_client.so when searching for -lmmal_vc_client
/usr/bin/ld: cannot find -lmmal_vc_client
/usr/bin/ld: skipping incompatible /opt/vc/lib/libmmal_vc_client.so when searching for -lmmal_vc_client
/usr/bin/ld: skipping incompatible /opt/vc/lib/libvcos.so when searching for -lvcos
/usr/bin/ld: skipping incompatible /opt/vc/lib/libbcm_host.so when searching for -lbcm_host
collect2: error: ld returned 1 exit status

Maybe someone has an idea of what's going on.

Kind regards,
Deph

@xia2206636330
Copy link

Has this problem been resolved? How to solve it, mine is the latest version of Raspberry Pi 32-bit

@onsimon
Copy link

onsimon commented Jan 30, 2024

Same problem here, getting the same as @Dephrilibrium's latest post. The files are found but stated to be incompatible as it says above. Fresh Raspian lite bookworm 64 bit install.

@spectroman
Copy link

spectroman commented Feb 6, 2024

for me the suggestion:

sed -i 's_/opt/vc_/usr_g' mjpg-streamer-experimental/plugins/input_raspicam/CMakeLists.txt

made the compiler generate the plugin properly and it ran with no problems as well...

it gave some warning on compiling time, but no fatalities:

image

and later:

mjpg_streamer -i "input_raspicam.so -x 960 -y 720" -o "output_http.so -w ./www"

ran as expected.

Debian 11.8 on Model : Raspberry Pi Zero W Rev 1.1

@Resousse
Copy link

Resousse commented Feb 15, 2024

On my RPI, freshly upgraded to bookworm, there is no libmmal.so at all...
I went from buster to bullseye and directly from bullseye to bookworm

RPI 3B

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

6 participants