-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with building librealsense on Orin Nano (ARK) #12626
Comments
Hi @ta-jetson A RealSense Jetson user at #11634 experienced these errors and resolved it with a workaround of making an edit to the Python wrapper's CMakeLists.txt file. It should not be necessary to do this though in order to achieve a working installation. A popular guide to installing librealsense and the Python wrapper on Jetson boards from source code can be found at #6964 (comment) In regard to your apt-get instruction:
The official Jetson source code installation instructions at the link below suggest using the following apt-get command:
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md Of these recommended commands, only |
hey @MartyG-RealSense , I tried the new installation instructions provided by you, but the error persists. I had already referred to #11634 and #6964 (comment) before opening my issue. Regarding the CMakelists.txt, I added the following Error: Update the VERSION argument value or use a ... suffix to tell -- pybind11 v2.6.2 Call Stack (most recent call first): -- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.10") A user had mentioned to delete the development directory (Development directory from the cmake find python). That is something I haven't tried yet, cause I do not know where this directory is there. Could you share the location of this directory? |
I will ask the RealSense user who posted about the development directory workaround. @bhomaidan1990 Would it be possible to advise @ta-jetson please about how you removed the |
Hey @MartyG-RealSense , Is there any work around to this? What about any changes to the cmakelist that'll solve the problem? |
@ta-jetson There is not a clear reason why you are having these build difficulties. It may be easier if you are able to use the latest librealsense version (2.54.2) and then install the pyrealsense2 wrapper separately after librealsense has been successfully installed. First, build librealsense from source code with the libuvc backend build script at the link below. https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md Then build the pyrealsense2 wrapper from packages with the command pip install pyrealsense2 The pip install method can work with Python 3.8 on computing devices with the Arm architecture, as Python 3.7, 3.8 and 3.9 are currently supported by pip install pyrealsense2 on Arm. |
Hey @MartyG-RealSense ,
Error still persists |
In this situation and the requirement for a librealsense version no newer than 2.50.0, the only option that may be available is to compile librealsense first from source code without the Python wrapper to achieve a successful build and then compile the Python wrapper separately from source code afterwards in your librealsense source code folder's build directory using the instructions at the link below. |
Hey @MartyG-RealSense , These are the additional changes I tried : find_package(Python3 COMPONENTS Development.Module) I read (), If both Development.Embed and Development.Module are requested at once, the final result will be a module NOT found set(PYTHON_EXECUTABLE "/usr/bin/python3.8") And changed Python REQUIRED COMPONENTS to Python3 REQUIRED COMPONENTS. Error still persists. I am looking into the python Development.Module & Development.Embed, and will look into this error further. Do you have any suggestions or references to look into that could most likely be the root of this issue? |
Hey @MartyG-RealSense , I solved the issue. I'll expand on my solution.
Note: Mine was -j6 run with the lower number if you have less cores. You can check by using the command "nproc" on terminal In ~/.bashrc :
To get pyrealsense2 to run everywhere
In case you get => Failed to set power state error or UDEV-Rules are missing
Thanks again @MartyG-RealSense. |
It's great to hear that you achieved a solution. Thanks so much for sharing the details of it! |
Issue Description
Hey @MartyG-RealSense,
I was building librealsense 2.48.0 on my Orin Nano (ARK), and faced an error during it. This procedure was from #12377 and #10891.
This was my procedure:
Downloaded and unzipped librealsense-2.48.0 from librealsense-releases.
cd librealsense
cd librealsense && mkdir build && cd build
sudo apt-get -y install python3 python3-dev libssl-dev libxinerama-dev libxcursor-dev libcanberra-gtk-module libcanberra-gtk3-module
cmake ../ -DBUILD_PYTHON_BINDINGS:bool=true -DPYTHON_EXECUTABLE=/usr/bin/python3.8 -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true -DBUILD_WITH_CUDA:bool=true -DFORCE_RSUSB_BACKEND=ON
Error:
-- Build files have been written to: /home/tsalla/librealsense/build/external-projects/pybind11
[ 12%] Performing update step for 'pybind11'
[ 25%] No patch step for 'pybind11'
[ 37%] No configure step for 'pybind11'
[ 50%] No build step for 'pybind11'
[ 62%] No install step for 'pybind11'
[ 75%] Completed 'pybind11'
[100%] Built target pybind11
CMake Deprecation Warning at build/third-party/pybind11/CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- pybind11 v2.6.2
CMake Warning (dev) at build/third-party/pybind11/tools/FindPythonLibsNew.cmake:98 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
build/third-party/pybind11/tools/pybind11Tools.cmake:45 (find_package)
build/third-party/pybind11/tools/pybind11Common.cmake:201 (include)
build/third-party/pybind11/CMakeLists.txt:188 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at /usr/local/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python (missing: Python_INCLUDE_DIRS Development
Development.Module Development.Embed) (found version "2.7.18")
Call Stack (most recent call first):
/usr/local/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.27/Modules/FindPython.cmake:616 (find_package_handle_standard_args)
wrappers/python/CMakeLists.txt:62 (find_package)
i have looked at #10891 and #6964 (comment), which seemed to solve the same problem for the rest.
I even updated my cmake from 3.16 to 3.27 to see if this error is sorted. Tried building librealsense 2.50.0 as well.
I tried to change -DPYTHON_EXECUTABLE=/usr/bin/python3.8 to -DPYTHON_EXECUTABLE=/usr/bin/python3.
Only change in error being :
_-- Build files have been written to: /home/tsalla/librealsense/build/external-projects/pybind11
[ 12%] Performing update step for 'pybind11'
[ 25%] No patch step for 'pybind11'
[ 37%] No configure step for 'pybind11'
[ 50%] No build step for 'pybind11'
[ 62%] No install step for 'pybind11'
[ 75%] Completed 'pybind11'
[100%] Built target pybind11
CMake Deprecation Warning at build/third-party/pybind11/CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- pybind11 v2.6.2
CMake Warning (dev) at build/third-party/pybind11/tools/FindPythonLibsNew.cmake:98 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
build/third-party/pybind11/tools/pybind11Tools.cmake:45 (find_package)
build/third-party/pybind11/tools/pybind11Common.cmake:201 (include)
build/third-party/pybind11/CMakeLists.txt:188 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") This is the only change
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.8.so
CMake Error at /usr/local/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python (missing: Python_INCLUDE_DIRS Development
Development.Module Development.Embed) (found version "2.7.18")
Call Stack (most recent call first):
/usr/local/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.27/Modules/FindPython.cmake:616 (find_package_handle_standard_args)
wrappers/python/CMakeLists.txt:62 (find_package)
No luck with any step.
Could you please suggest on how to proceed with this error?
The text was updated successfully, but these errors were encountered: