Problem compiling mjpg-streamer on Buster

  1. Where did you get the camera module(s)?

Kickstarter

  1. Model number of the product(s)?

Arducam 16MP with Autofocus. SKU: B0371

  1. What hardware/platform were you working on?

RPi 4B 8GB with OctoPrint 1.18 and OctoPi 0.18.0

$ uname -a
Linux octoprint 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 10 (buster)
Release:	10
Codename:	buster
  1. Instructions you have followed. (link/manual/etc.)

I’m following below guide except the step of using the nightly version of Octopi. Instead I wanted to use the latest stable version that was just recently release. Unfortunately this version is still based in Buster, not Bullseye. So there’s some misalignment between the guide and the steps I’m taking

  1. Problems you were having?

I’ve been following the guide I shared above and everything was going well. I even tried taking pictures with libcamera-still and it worked well. However when I reached the part of compiling mjpg-streamer I’m experiencing troubles. When I run make I get this:

[ 34%] Building C object plugins/input_raspicam/CMakeFiles/input_raspicam.dir/input_raspicam.c.o
In file included from /home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/input_raspicam.c:51:
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/RaspiCamControl.c: In function 'raspicamcontrol_set_saturation':
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/RaspiCamControl.c:762:32: warning: implicit declaration of function 'mmal_port_parameter_set_rational'; did you mean 'mmal_port_parameter_set'? [-Wimplicit-function-declaration]
       ret = mmal_status_to_int(mmal_port_parameter_set_rational(camera->control, MMAL_PARAMETER_SATURATION, value));
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                mmal_port_parameter_set
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/RaspiCamControl.c: In function 'raspicamcontrol_set_ISO':
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/RaspiCamControl.c:864:30: warning: implicit declaration of function 'mmal_port_parameter_set_uint32'; did you mean 'mmal_port_parameter_set'? [-Wimplicit-function-declaration]
    return mmal_status_to_int(mmal_port_parameter_set_uint32(camera->control, MMAL_PARAMETER_ISO, ISO));
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              mmal_port_parameter_set
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/RaspiCamControl.c: In function 'raspicamcontrol_set_video_stabilisation':
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/RaspiCamControl.c:899:30: warning: implicit declaration of function 'mmal_port_parameter_set_boolean'; did you mean 'mmal_port_parameter_set'? [-Wimplicit-function-declaration]
    return mmal_status_to_int(mmal_port_parameter_set_boolean(camera->control, MMAL_PARAMETER_VIDEO_STABILISATION, vstabilisation));
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              mmal_port_parameter_set
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/RaspiCamControl.c: In function 'raspicamcontrol_set_exposure_compensation':
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/RaspiCamControl.c:913:30: warning: implicit declaration of function 'mmal_port_parameter_set_int32'; did you mean 'mmal_port_parameter_set'? [-Wimplicit-function-declaration]
    return mmal_status_to_int(mmal_port_parameter_set_int32(camera->control, MMAL_PARAMETER_EXPOSURE_COMP , exp_comp));
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              mmal_port_parameter_set
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/input_raspicam.c: In function 'worker_thread':
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/input_raspicam.c:885:10: warning: implicit declaration of function 'mmal_port_pool_create'; did you mean 'mmal_pool_create'? [-Wimplicit-function-declaration]
   pool = mmal_port_pool_create(encoder_output, encoder_output->buffer_num, encoder_output->buffer_size);
          ^~~~~~~~~~~~~~~~~~~~~
          mmal_pool_create
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/input_raspicam.c:885:8: warning: assignment to 'MMAL_POOL_T *' {aka 'struct MMAL_POOL_T *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
   pool = mmal_port_pool_create(encoder_output, encoder_output->buffer_num, encoder_output->buffer_size);
        ^
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_raspicam/input_raspicam.c:1057:5: warning: implicit declaration of function 'mmal_port_pool_destroy'; did you mean 'mmal_pool_destroy'? [-Wimplicit-function-declaration]
     mmal_port_pool_destroy(encoder->output[0], pool);
     ^~~~~~~~~~~~~~~~~~~~~~
     mmal_pool_destroy
[ 37%] Linking C shared library input_raspicam.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 37%] Built target input_raspicam
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 41%] Building C object plugins/input_uvc/CMakeFiles/input_uvc.dir/dynctrl.c.o
[ 44%] Building C object plugins/input_uvc/CMakeFiles/input_uvc.dir/input_uvc.c.o
[ 48%] Building C object plugins/input_uvc/CMakeFiles/input_uvc.dir/jpeg_utils.c.o
[ 51%] Building C object plugins/input_uvc/CMakeFiles/input_uvc.dir/v4l2uvc.c.o
[ 55%] Linking C shared library input_uvc.so
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 55%] Built target input_uvc
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
[ 58%] Building CXX object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/input_libcamera.cpp.o
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/input_libcamera.cpp:71:5: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
     " Help for input plugin..: "INPUT_PLUGIN_NAME"\n" \
     ^
[ 62%] Building CXX object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/LibCamera.cpp.o
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/LibCamera.cpp: In member function 'int LibCamera::startCapture()':
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/LibCamera.cpp:118:38: error: 'const class libcamera::FileDescriptor' has no member named 'get'
                             plane.fd.get(), 0);
                                      ^~~
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/LibCamera.cpp:119:41: error: 'const class libcamera::FileDescriptor' has no member named 'get'
                 mappedBuffers_[plane.fd.get()] =
                                         ^~~
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/LibCamera.cpp: In member function 'bool LibCamera::readFrame(LibcameraOutData*)':
/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/plugins/input_libcamera/LibCamera.cpp:208:54: error: 'const class libcamera::FileDescriptor' has no member named 'get'
                 void *data = mappedBuffers_[plane.fd.get()].first;
                                                      ^~~
make[3]: *** [plugins/input_libcamera/CMakeFiles/input_libcamera.dir/build.make:76: plugins/input_libcamera/CMakeFiles/input_libcamera.dir/LibCamera.cpp.o] Error 1
make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[2]: *** [CMakeFiles/Makefile2:483: plugins/input_libcamera/CMakeFiles/input_libcamera.dir/all] Error 2
make[2]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make[1]: *** [Makefile:130: all] Error 2
make[1]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build'
make: *** [Makefile:19: all] Error 2
  1. The dmesg log from your hardware?
[    5.637784] ak7375: loading out-of-tree module taints kernel.
[    5.669292] imx519 10-001a: Device found is imx519
[   31.835843] imx519_vddl: disabling
[   31.835865] imx519_vdig: disabling
[   31.835894] imx519_vana: disabling
  1. Troubleshooting attempts you’ve made?

When trying to use libcamera-still I had some problems caused by deps missing that I could fix by installing following deps:

sudo apt-get install libepoxy0
sudo apt-get install libqt5core5a
sudo apt-get install libqt5widgets5

However with compiling mjpg-streamer I’m not having any luck

  1. What help do you need?

Is there anything I can do to compile the arducam mjpg-streamer. Thanks in advance!

very sorry. This error is caused by different method names of libcamera of different system versions.

You can use an Octopi based system image from Bullseye.

If a Buster-based system must be used, the source code will need to be modified. Change “get” to “fd” in the three error locations in the image below.

1 Like

thanks for the quick reply. It worked like a charm