christianrauch / camera_ros

ROS 2 node for libcamera supported cameras (V4L2, Raspberry Pi Camera Modules)
https://libcamera.org
MIT License
69 stars 30 forks source link

Libcamera on Ubuntu 22 #19

Closed stackoverflow-123 closed 1 year ago

stackoverflow-123 commented 1 year ago

Hi, I would like to use your camera_ros package for my ROS humble project with Ubuntu 22.04 (Jammy Jellyfish). when i was installing "ninja -C build install" throw an error. Does libcamera having any issue with ubuntu 22.0 (jammy). Is their any other dependancy for installing libcamera fot ubuntu 22. i think their is an issue with libdrm.so. how to resolve this issue. The architectures are matching and version are up to date.

""""sudo ninja -C build install"""""

ninja: Entering directory `build'

[2/3] Linking target src/apps/cam/cam

FAILED: src/apps/cam/cam 

c++  -o src/apps/cam/cam src/apps/cam/cam.p/camera_session.cpp.o src/apps/cam/cam.p/capture_script.cpp.o src/apps/cam/cam.p/file_sink.cpp.o src/apps/cam/cam.p/frame_sink.cpp.o src/apps/cam/cam.p/main.cpp.o src/apps/cam/cam.p/drm.cpp.o src/apps/cam/cam.p/kms_sink.cpp.o src/apps/cam/cam.p/sdl_sink.cpp.o src/apps/cam/cam.p/sdl_texture.cpp.o src/apps/cam/cam.p/sdl_texture_yuv.cpp.o src/apps/cam/cam.p/sdl_texture_mjpg.cpp.o -Wl,--as-needed -Wl,--no-undefined -Wshadow -include /home/quest/Libcamera/libcamera/build/config.h '-Wl,-rpath,$ORIGIN/../../libcamera:$ORIGIN/../../libcamera/base:/usr/local/lib' -Wl,-rpath-link,/home/quest/Libcamera/libcamera/build/src/libcamera -Wl,-rpath-link,/home/quest/Libcamera/libcamera/build/src/libcamera/base -Wl,-rpath-link,/usr/local/lib -Wl,--start-group src/apps/common/libapps.a src/libcamera/libcamera.so.0.1.0 src/libcamera/base/libcamera-base.so.0.1.0 -latomic /usr/local/lib/libdrm.so /usr/lib/x86_64-linux-gnu/libevent_pthreads.so /usr/lib/x86_64-linux-gnu/libevent.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libSDL2.so /usr/lib/x86_64-linux-gnu/libtiff.so /usr/lib/x86_64-linux-gnu/libyaml.so -Wl,--end-group

/usr/bin/ld: /usr/local/lib/libdrm.so: error adding symbols: file in wrong format

collect2: error: ld returned 1 exit status

ninja: build stopped: subcommand failed.
christianrauch commented 1 year ago

Sorry, but this is not the right project to ask for help compiling libcamera. See https://libcamera.org/getting-started.html for compile instructions. If you encounter issues with this, then please ask the people there.

If you want to use libcamera in a colcon/ROS workspace, then I recommend using the binary package from the ROS repo (ros-humble-libcamera).