Make not producing input_libcamera.so on Raspberry Pi 3B+ OctoPrint Arducam IMX219

Hey everyone, I’ve got an Arducam IMX219 on a Raspberry Pi 3B+ running OctoPrint. The camera works when I test it with libcamera-hello, I can see video fine, but OctoPrint just won’t show the stream. I was following the ‘Solution On OctoPrint’ steps from Arducam, but the command sudo mv /root/bin/webcamd /root/bin/webcamd.bak fails because /root/bin/ doesn’t exist. The instructions look like they’re written for an older Raspbian version. Has anyone run into this on a newer image?

That’s a known problem. The OS image Arducam publishes is Bullseye, not the latest kernel, and compatibility between the newest Bullseye OS and OctoPrint Pi isn’t great. The Solution On OctoPrint guide assumes the older image where /root/bin actually exists. The cleanest path is to burn the OS image linked at the top of the OctoPrint documentation page and follow it from there: Solution On OctoPrint - Arducam Wiki

Okay, I burned the image from the top of that docs page, so Raspbian Bullseye on my Pi 3B+ (hostname OctoPrintServer). Now I’m at the step where you build mjpg-streamer-libcamera. Running make in /home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental completes, but input_libcamera.so is never produced. It builds a bunch of other .so files but not the libcamera input plugin. What am I missing?

Can you paste the CMake configure part of the make output? The lines about libcamera and the plugin features are the important ones.

Sure, here’s the relevant part:
– The C compiler identification is GNU 10.2.1
– CMAKE_BUILD_TYPE = Release
CMake Warning at plugins/input_opencv/CMakeLists.txt:4 (find_package):
Could not find OpenCVConfig.cmake / opencv-config.cmake
– Checking for module ‘libcamera’
– No package ‘libcamera’ found
– Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR)
– Could NOT find protobuf-c (missing: PROTOBUF_C_LIBRARY PROTOBUF_C_INCLUDE_DIR)
– Disabled feature: * PLUGIN_INPUT_LIBCAMERA, Libcamera input plugin (unmet dependencies)
– Optional packages not found: * OpenCV, * Gphoto2, * SDL

After that, make builds: mjpg_streamer, input_file.so, input_http.so, input_uvc.so, output_file.so, output_http.so, output_rtsp.so, output_udp.so. No input_libcamera.so.

That output tells the story. The build skipped the libcamera input plugin because pkg-config couldn’t find libcamera: No package 'libcamera' found, and CMake disabled PLUGIN_INPUT_LIBCAMERA due to unmet dependencies. The other plugins still built, which is why you see mjpg_streamer and those .so files. It also couldn’t find OpenCV, Gphoto2, SDL, and protobuf-c, so input_libcamera.so was never generated.

I already started from the Raspbian image at the top of the website, though. I also tried the earlier suggestion of replacing /root/bin/ with ~/bin/ in the OctoPrint webcamd setup steps, but that didn’t work either. Is there a different way to get the libcamera plugin built?

Rather than fight the manual build, I can give you a prebuilt OS image that already has the right setup. I’ve sent the download link via private message. Burn it to your SD card, then do this:

  1. sudo vi /boot/config.txt
  2. Scroll to the bottom and replace dtoverlay=imx519 with dtoverlay=imx219
  3. Save and reboot the Raspberry Pi.

Thanks, I burned the prebuilt image and changed the overlay to imx219. Rebooted, and OctoPrint is now showing the camera. I’ll test it a bit more.

Good. For context, your earlier make output showed the real blocker: the build completed and produced mjpg_streamer and the other plugins, but the libcamera input plugin was disabled because libcamera wasn’t found, along with Gphoto2, OpenCV, SDL, and protobuf-c. That’s why input_libcamera.so never appeared. The prebuilt image sidesteps that whole build issue.

Thank you. This works.

Great to hear. Just to recap for anyone else hitting this: on the manual build path, the missing libcamera dependency stops input_libcamera.so from being generated even though make exits successfully. The workaround that got it going here was the prebuilt OS image plus changing the device tree overlay from imx519 to imx219 in /boot/config.txt and rebooting.