Skip to content

can't finish LibUVC install on Raspberry Pi 4Β #4950

Closed

Description

@GOBish
Required Info
Camera Model { D435 }
Firmware Version (newest)
Operating System & Version Raspbian buster
Kernel Version (Linux Only) 4.19
Platform Raspberry Pi
SDK Version {
Language { }
Segment

Issue Description

I'm trying to install LibUVC on a raspberry pi 4, but when I try
./libuvc_installation.sh
I get to 66% of the process and get the error

[ 60%] Linking CXX shared library librealsense2-gl.so
[ 60%] Built target realsense2-gl
make: *** [Makefile:130: all] Error 2
pi@raspberrypi:~ $

I would love some help!
I have tried
sudo apt-get update && sudo apt-get upgrade && sudo apt-dist-upgrade -y

Activity

  1. dorodnic commented on Sep 29, 2019

    @dorodnic
    Contributor

    Are you using the script from libuvc_installation.md?

  2. GOBish commented on Sep 29, 2019

    @GOBish
    Author

    https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md

    @dorodnic I am using all the instructions there, do you have any other advice?
    thanks.

  3. dorodnic commented on Oct 2, 2019

    @dorodnic
    Contributor

    I'm waiting to get my Rpi4 to try the installation on. First steps of the script set-up swap file, without which installation fails due to lack of memory. If this is not the reason, I suspect something to do with OpenGL and graphics drivers. For Ubuntu 18 we ask to run:
    sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
    Probably something similar needs to be done on the Pi.

  4. AnupamYedida commented on Oct 5, 2019

    @AnupamYedida

    I got it working.
    Just add set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -latomic") to the CMakeLists.txt file and compile.

  5. GOBish commented on Oct 5, 2019

    @GOBish
    Author

    @AnupamYedida I really appreciate your help!
    Could you walk through the steps for me a little more clearly? I apologize, I don't have a ton of experience with this. How do I get to the cmakelists.txt file?

  6. AnupamYedida commented on Oct 5, 2019

    @AnupamYedida

    It's in the librealsense-master directory. (Provided you ran the script)

  7. GOBish commented on Oct 6, 2019

    @GOBish
    Author

    Hmm, I still get the same error at 60%.
    [ 60%] Linking CXX shared library librealsense2-gl.so
    [ 60%] Built target realsense2-gl
    make: *** [Makefile:130: all] Error 2

    @AnupamYedida are you using Raspbian Buster?

  8. GOBish commented on Oct 6, 2019

    @GOBish
    Author

    I tried it again, making all the changes to cmake files as described here (by @SirDifferential):

    #4375 (comment)

    and still could not complete the compile, got this error at 58%

    make[2]: *** [examples/software-device/CMakeFiles/rs-software-device.dir/build.make:63: examples/software-de/github.com//issues/4375#issuecomment-509968417vice/CMakeFiles/rs-software-device.dir/rs-software-device.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:511: examples/software-device/CMakeFiles/rs-software-device.dir/all] Error 2
    make: *** [Makefile:130: all] Error 2

  9. AnupamYedida commented on Oct 6, 2019

    @AnupamYedida

    It's the CMakeLists.txt file in the folder librealsense

  10. GOBish commented on Oct 6, 2019

    @GOBish
    Author

    Thanks @AnupamYedida -- I did that in #4950 (comment) and was still unsuccesful.
    Where in the CMakeLists.txt file did you put that line of code?
    Also, I just ran sudo apt-get install libatomic-ops-dev
    and I am re-compiling to see if that addresses my issue.

  11. AnupamYedida commented on Oct 6, 2019

    @AnupamYedida

    I kept it in the top. It fixed the issue for me. I'm running it on 4.19 kernel, Raspberry Pi4, Debian Buster

  12. GOBish commented on Oct 6, 2019

    @GOBish
    Author

    @AnupamYedida I don't know, I can't get it to work no matter what I try.

  13. w3bm0nk3y commented on Oct 6, 2019

    @w3bm0nk3y

    This is what worked for me. Your mileage may vary. 4.19 kernel, Raspberry Pi4, Debian Buster with Neural Computer Stick 2

    First run:
    sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev

    Per the LibUVC installation instructions
    wget https://github.com/IntelRealSense/librealsense/raw/master/scripts/libuvc_installation.sh
    chmod +x ./libuvc_installation.sh
    ./libuvc_installation.sh

    It will error at:
    [ 60%] Linking CXX shared library librealsense2-gl.so
    [ 60%] Built target realsense2-gl

    find the location of your librealsense_build directory:
    pwd ~/librealsense_build

    in my case it was /home/pi/librealsense_build

    nano libuvc_installation.sh
    or edit with whatever editor you like

    In libuvc_installation.sh
    change this:
    sudo rm -rf ./librealsense_build
    mkdir librealsense_build && cd librealsense_build

    to this:
    #sudo rm -rf ./librealsense_build
    cd /home/pi/librealsense_build

    *replace /home/pi/librealsense_build with your librealsense_build location

    Find the CMakesLists.txt file in the librealsense-master directory
    Add set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -latomic") to the top of the CMakeLists.txt file.

    Run: sudo ./libuvc_installation.sh

  14. GOBish commented on Oct 7, 2019

    @GOBish
    Author

    @w3bm0nk3y I appreciate the help - but I still get the error at 60% in the compile even following the steps you outlined.

  15. GOBish commented on Oct 7, 2019

    @GOBish
    Author

    OK, finally got it! I had to follow all the steps from both @AnupamYedida and @w3bm0nk3y . Thank you all for your help, very much appreciated.

  16. w3bm0nk3y commented on Oct 7, 2019

    @w3bm0nk3y

    OK, finally got it! I had to follow all the steps from both @AnupamYedida and @w3bm0nk3y . Thank you all for your help, very much appreciated.

    I realized I forgot to add the steps from @AnupamYedida to my response. I edited accordingly.

  17. GOBish commented on Oct 7, 2019

    @GOBish
    Author

    Thanks for adding that @w3bm0nk3y !
    Did you have any issues running the examples (i.e. rs-enumerate-devices, realsense-viewer, etc) after completing the compile? I am having errors in that it can't find the header info when I try to run anything even though I see the folders right there in the correct directory. Thanks!

  18. w3bm0nk3y commented on Oct 8, 2019

    @w3bm0nk3y
  19. GOBish commented on Oct 8, 2019

    @GOBish
    Author

    sorry, added to my post later -- any of the examples, like rs-enumerate-devices or realsense-viewer. I think there is just some path I have to add somewhere, I just can't figure out where.
    If you could copy here how you are running those examples as well (how you are running it in the shell) that may be helpful for me as well.

    rs-hello-realsense.cpp:4:10: fatal error: librealsense2/rs.hpp: No such file or directory
    #include <librealsense2/rs.hpp> // Include RealSense Cross Platform API

  20. soarwing52 commented on Oct 8, 2019

    @soarwing52

    I start with a fresh Rasbian on Raspberry pi 4, 4gb RAM
    start with install opencv
    and then follow Raspbian(RaspberryPi3) Installation

    also adding set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -latomic") to CMAKELIST.txt and it worked with build from source, not the Libuvc

    I remember seeing a method putting -D___CXX_FLAGS-latomic can also work, which is giving variable in the terminal, but I can'T find it now

  21. w3bm0nk3y commented on Oct 8, 2019

    @w3bm0nk3y
  22. GOBish commented on Oct 9, 2019

    @GOBish
    Author

    @soarwing52 - thanks for the input. I tried that, and the compile seems to stop at 57% with the message "Built target rs-benchmark" and no errors - is that what you got, too?

  23. soarwing52 commented on Oct 10, 2019

    @soarwing52

    @soarwing52 - thanks for the input. I tried that, and the compile seems to stop at 57% with the message "Built target rs-benchmark" and no errors - is that what you got, too?

    nope, mine stuck at 67% building realsense2-gl, same as in this issue. And it is fixed by adding the cmake -latomic

    And I start with a fresh raspbian, with only pip installed opencv-contrib-python.
    I suppose protobuf maybe didn't succeed to build, I used also pip install protobuf(or apt install)

  24. GOBish commented on Oct 10, 2019

    @GOBish
    Author

    @soarwing52 , mine happened with the cmake -latomic added.

  25. dorodnic commented on Dec 10, 2019

    @dorodnic
    Contributor

    Should be resolved now

  26. GOBish commented on Jan 12, 2020

    @GOBish
    Author

    @dorodnic I dowloaded the new SDK (downloaded the tar.gz), can you explain to me how I install it on Raspbian now? Thanks

  27. GOBish commented on Jan 12, 2020

    @GOBish
    Author

    Even with the new version, cMake fails at 58% after "built target realsense2-gl"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions