ChokunPlayZ / arducam-libcamera-klippper

your only guide to getting MPEG-Streamer Working with your klipper setup!
GNU General Public License v3.0
5 stars 1 forks source link

dlopen: input_libcamera.so: wrong ELF class: ELFCLASS32 #1

Closed rickkiejjj closed 2 years ago

rickkiejjj commented 2 years ago

On the Pi 4 it will give a ELF class error.

See the error log:

● webcamd.service - Starts mjpg-streamer on startup
     Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
     Active: activating (start) since Tue 2022-05-31 10:08:19 CEST; 14s ago
Cntrl PID: 6021 (webcamd)
      Tasks: 2 (limit: 1770)
        CPU: 94ms
     CGroup: /system.slice/webcamd.service
             ├─6021 /bin/bash /usr/local/bin/webcamd
             └─6036 sleep 30

May 31 10:08:19 klipper systemd[1]: Starting Starts mjpg-streamer on startup...
May 31 10:08:19 klipper mjpg_streamer[6034]: MJPG-streamer [6034]: starting application
May 31 10:08:19 klipper mjpg_streamer[6034]: MJPG-streamer [6034]: MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
May 31 10:08:19 klipper mjpg_streamer[6034]: MJPG-streamer [6034]: ERROR: could not find input plugin
May 31 10:08:19 klipper mjpg_streamer[6034]: MJPG-streamer [6034]:        Perhaps you want to adjust the search path with:
May 31 10:08:19 klipper mjpg_streamer[6034]: MJPG-streamer [6034]:        # export LD_LIBRARY_PATH=/path/to/plugin/folder
May 31 10:08:19 klipper mjpg_streamer[6034]: MJPG-streamer [6034]:        dlopen: input_libcamera.so: wrong ELF class: ELFCLASS32

And the webcamd.log:

<13>May 31 10:33:06 pi: Starting Libcamera camera
Checking for VL805 (Raspberry Pi 4)...
  - It seems that you don't have VL805 (Raspberry Pi 4).
    There should be no problems with USB (a.k.a. select() timeout)
Running ./mjpg_streamer -o output_http.so -w ./www-mjpgstreamer --listen 0.0.0.0 -i input_libcamera.so -r 1920x1080 -f 15
MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
ERROR: could not find input plugin
       Perhaps you want to adjust the search path with:
       # export LD_LIBRARY_PATH=/path/to/plugin/folder
       dlopen: input_libcamera.so: wrong ELF class: ELFCLASS32
Done bringing up all configured video devices
Scanning again in two minutes
Terminated

Goodbye...

Starting up webcamDaemon...
Modified by ChokunPlayZ, use at your own risk

--- Configuration: ----------------------------
cfg_file:      /home/pi/klipper_config/webcam.txt
camera:        libcamera
usb options:   -r 640x480 -f 10
raspi options: -fps 10
libcamera options: -r 1920x1080 -f 15
http options:  -w ./www-mjpgstreamer --listen 0.0.0.0

Explicitly set USB device:
-----------------------------------------------

Found video devices:
/dev/video0
/dev/video1
/dev/video10
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video18
/dev/video20
/dev/video21
/dev/video22
/dev/video23
/dev/video31
config file='/home/pi/klipper_config/webcam.txt':Starting MJPG-streamer with video device: libcamera
<13>May 31 10:34:36 pi: Starting Libcamera camera
Checking for VL805 (Raspberry Pi 4)...
  - It seems that you don't have VL805 (Raspberry Pi 4).
    There should be no problems with USB (a.k.a. select() timeout)
Running ./mjpg_streamer -o output_http.so -w ./www-mjpgstreamer --listen 0.0.0.0 -i input_libcamera.so -r 1920x1080 -f 15
MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
ERROR: could not find input plugin
       Perhaps you want to adjust the search path with:
       # export LD_LIBRARY_PATH=/path/to/plugin/folder
       dlopen: input_libcamera.so: wrong ELF class: ELFCLASS32
Done bringing up all configured video devices
Scanning again in two minutes
ChokunPlayZ commented 2 years ago

So it seems that mjpeg-streamer cannot find the libcamera plug-in file you either did not copied the file to the mjpeg-streamer folder or the file does not have the right permission

please make sure that there is a file named ‘input_libcamera.so’ in your mjpeg-streamer folder

ChokunPlayZ commented 2 years ago

also please edit the logs you posted and put them in a code block or upload it to pastebin it will make them much easier to read

thanks

rickkiejjj commented 2 years ago

The file is in the folder and I've executed: chmod +x input_libcamera.so

Screenshot 2022-05-31 at 13 52 14
rickkiejjj commented 2 years ago

The other input*.so files in the folder are all compiled for 64-bit except for this file. Could you compile it for 64-bit?

Screenshot 2022-05-31 at 16 01 42
ChokunPlayZ commented 2 years ago

So I cannot compile the file for 64 bit yet because I cannot get 64 bit pios booted

https://github.com/ArduCAM/mjpg-streamer

You can try compiling this then copy 'input_libcamera.so' over to the mjpeg-streamer folder

rickkiejjj commented 2 years ago

Yes this worked perfectly. I've added the ELF64 version of input_libcamera.so in a zip file since GitHub doesn't let me upload the .so file. input_libcamera.so.zip

ChokunPlayZ commented 2 years ago

I'll get that file added to the repo once I'm back home Thanks