librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Raspbian GNU/Linux 10 (buster) compile rs-software-device

Open bgilreath opened this issue 7 years ago • 8 comments


Required Info
Camera Model D435
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version Raspbian GNU/Linux 10 (buster)
Kernel Version (Linux Only) 4.19.58-v7l+
Platform Raspberry Pi 4
SDK Version 2.25
Language {C/opencv/python }
Segment {Robot }

Issue Description

Finished prerequisites of target file 'examples/software-device/CMakeFiles/rs-software-device.dir/build'. The prerequisites of 'examples/software-device/CMakeFiles/rs-software-device.dir/build' are being made. Live child 0x121af68 (examples/software-device/rs-software-device) PID 2773 [ 57%] Linking CXX executable rs-software-device Reaping winning child 0x121af68 PID 2773 Live child 0x121af68 (examples/software-device/rs-software-device) PID 2775 /usr/bin/ld: ../../librealsense2.so.2.25.0: undefined reference to __atomic_load_8' /usr/bin/ld: ../../librealsense2.so.2.25.0: undefined reference to __atomic_store_8' /usr/bin/ld: ../../librealsense2.so.2.25.0: undefined reference to __atomic_fetch_add_8' collect2: error: ld returned 1 exit status Reaping losing child 0x13e4590 PID 2762 make[2]: *** [examples/hello-realsense/CMakeFiles/rs-hello-realsense.dir/build.make:91: examples/hello-realsense/rs-hello-realsense] Error 1 Removing child 0x13e4590 PID 2762 from chain. Need a job token; we have children Live child 0x198ff68 (examples/software-device/CMakeFiles/rs-software-device.dir/all) PID 2772 Live child 0x198f8c0 (examples/hello-realsense/CMakeFiles/rs-hello-realsense.dir/all) PID 2758 Reaping losing child 0x198f8c0 PID 2758 make[1]: *** [CMakeFiles/Makefile2:455: examples/hello-realsense/CMakeFiles/rs-hello-realsense.dir/all] Error 2 Removing child 0x198f8c0 PID 2758 from chain. Released token for child 0x198f8c0 (examples/hello-realsense/CMakeFiles/rs-hello-realsense.dir/all). make[1]: *** Waiting for unfinished jobs.... Live child 0x198ff68 (examples/software-device/CMakeFiles/rs-software-device.dir/all) PID 2772 /usr/bin/ld: ../../librealsense2.so.2.25.0: undefined reference to __atomic_load_8' /usr/bin/ld: ../../librealsense2.so.2.25.0: undefined reference to __atomic_store_8' /usr/bin/ld: ../../librealsense2.so.2.25.0: undefined reference to __atomic_fetch_add_8' collect2: error: ld returned 1 exit status Reaping losing child 0x121af68 PID 2775 make[2]: *** [examples/software-device/CMakeFiles/rs-software-device.dir/build.make:91: examples/software-device/rs-software-device] Error 1 Removing child 0x121af68 PID 2775 from chain. Reaping losing child 0x198ff68 PID 2772 make[1]: *** [CMakeFiles/Makefile2:511: examples/software-device/CMakeFiles/rs-software-device.dir/all] Error 2 Removing child 0x198ff68 PID 2772 from chain. Reaping losing child 0xb45de0 PID 2713 make: *** [Makefile:130: all] Error 2 Removing child 0xb45de0 PID 2713 from chain.

bgilreath avatar Aug 05 '19 04:08 bgilreath

Same problem here ;(

filipematosinov avatar Aug 05 '19 10:08 filipematosinov

@bgilreath , thanks for reporting. Apparently this is a requirement specific to Raspbian builds (Link1 ,Link2). We need to add the fix to the SDK. In the meanwhile you can apply the fix from the links locally

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -latomic")

ev-mp avatar Aug 05 '19 19:08 ev-mp

@ev-mp hey there, I have the same problem. Where in the CMakelist.txt do I have to put the line?

Xxjojo avatar Aug 27 '19 16:08 Xxjojo

@ev-mp Thanks! The fix you suggested did fix my issue.

bgilreath avatar Sep 02 '19 22:09 bgilreath

@bgilreath Would you be able to share your CMakeLists.txt file? I'm struggling to understand how and where to add the line to the file

coriolan-v avatar Sep 12 '19 10:09 coriolan-v

Found the solution, I've got the Realsense working on my RPI4 now.

coriolan-v avatar Sep 13 '19 15:09 coriolan-v

Was the final solution to use the libuvc-backend installation instructions and update CMakeLists.txt with set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -latomic") ?

w3bm0nk3y avatar Oct 06 '19 02:10 w3bm0nk3y

I am trying to install on Raspberry PI 4. I am following the instructions from https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md

My installation wnet all the way up to 57% and failed as ./libuvc_installation.sh

57%] Linking CXX shared library librealsense2-gl.so [ 57%] Built target realsense2-gl make: *** [Makefile:130: all] Error 2

Any help will be appreciated. Thanks Sarathy

sarathynp avatar Feb 08 '20 04:02 sarathynp