-
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
Installing from source MacOS on M1 chip with Big Sur #8250
Comments
Hi @HansBambel We are aware of a couple of cases where difficulty has been encountered with installing librealsense on the new Apple Silicon M1 Mac models with Arm-based M1 processors instead of Intel processors that were launched in late 2020. Intel are looking into it. I have no update that I can provide at the time of writing this though. The instructions regarding what constitutes the top level when installing the Python wrapper can be a little unclear. In general though, I see the CMake command initiated from the build folder, like you have done. This is also the method used in a CMake installation guide for the Python wrapper on MacOS that has been successful for some Mac users (though the guide dates to before the introduction of M1 processors). Another RealSense user's version of a guide for a successful MacOS Python wrapper installation with CMake is here: If you encounter an error referencing target.h when installing the Python wrapper on MacOS, the advice in the link below may also be helpful. Ultimately though, there are currently no guarantees that I can provide about installing on M1. |
Thank you for your answer. Sadly, it did not help me directly, but I managed to make work around the
which I found here. |
I am sorry that you were not able to make progress with librealsense installation due to the x86 error aparently produced by the Arm-based M1 processor. |
Not your fault! I subscribed to the other issue and wait for a reply from intel then. In the meantime I have the luxury of using an intel-based MacBook as well. |
Thanks very much for your understanding! I'm pleased to hear that you have an alternative Intel-based Mac available. |
@MartyG-RealSense I fully share the understanding by others in this thread that supporting the new M1 architecture is not to be taken for granted:-) but still: it would be nice if we could get some indication of whether Intel has any plans for the foreseeable future, and/or whether the community can help. Maybe it would be good to create a specific issue "Port librealsense2 to Apple M1", where we could follow easily? |
Hi @jackjansen As #8090 is where I direct RealSense users who are having this issue with M1 Macs, I have placed an Enhancement tag on that case as a reminder to keep it open. It can then be used as a focal point for posting comments about this issue from all affected users, fulfilling the same function as your own idea to create a specific issue. At the moment, the situation status remains that Intel are looking into it. |
Case closed due to #8090 being kept open as the central location to post Mac M1 comments. |
Hi @HansBambel and @jackjansen A RealSense user shared the method that worked for them for building librealsense on their M1 Mac. |
Thanks for the info! I might be able to try it out again on the M1 as well |
To work around issues with building for M1 Macs where CMake will manage to not find a Threads library (IntelRealSense/librealsense#8250), just pretend we have Threads with some sensible settings even when we don't.
Hello @adamnovak and @HansBambel, I see that there are multiple CMakeLists.txt files in the package hierarchy. Which file do I make the changes to? Also, I installed using 'brew install --build-from-source librealsense' as I was getting the following error with 'brew install' 'Error: librealsense: no bottle available!' |
That is a good question. I did not try this solution yet. Dynamized from the comment #8090 (comment) should know. |
Thanks for the update! I will check with @dyamized. |
@jalapatip You mean to work around the missing |
If you have linking problems of '-latomic', use the following cmake command: If you still get some errors of missing CMAKE_CXX_COMPILER or something, please do: |
Thanks very much @zarathustr for sharing your knowledge . :) |
I'm stuck at this same spot. after running both cmake comands.. When I run those commands and try to run either |
on cmake command I get this response ... `CMake Warning (dev): MACOSX_RPATH is not specified for the following targets: realsense2-gl This warning is for project developers. Use -Wno-dev to suppress it.` |
ok... I'm making progress... i'm finding out now there is the cpuid.h file that is preventing the Xcode build. I'm not sure how to change it. |
in color-formats-converter.cpp this is causing the error |
this looks like the culprit! I'm not sure how to fix it though... `#if defined (ANDROID) || (defined (linux) && !defined (x86_64)) bool has_avx() { return false; } #else #ifdef _WIN32 bool has_avx() #endif `/*
typedef struct { /* Debug identification */ /* ID_AA64DFR0_EL1 */ typedef struct { #endif /* MACHINE_CPUID_H */ |
Hi everyone, I just wanted to highlight that the brew install librealsense method of installing librealsense on Mac now lists support for MacOS Monterey and for Apple Silicon M1. https://formulae.brew.sh/formula/librealsense A highly detailed and up to date MacOS installation guide created by a RealSense user has also been published. |
I am trying to use the D415 stereocamera via pyrealsense2, but I am struggling with installing the necessary libraries.
Since I am using not using an intel chip I found out that I need to install from source. I am following this tutorial, but I also need to follow this one for the Python-wrapper, right?
In point 3 in the latter link it says
What is meant by the top level cmake command? Does this mean that I need to add this to the command that is given in the first link:
so that the whole command will look like this:
cmake .. -DBUILD_EXAMPLES=true -DBUILD_WITH_OPENMP=false -DHWM_OVER_XU=false -DBUILD_PYTHON_BINDINGS:bool=true -DPYTHON_EXECUTABLE=/Users/kevin/opt/anaconda3/envs/p37/bin/python
If so, do I execute this command from the
librealsense/build
-folder or thelibrealsense/build/wrappers/python
-folder?I tried almost all combinations, but I receive the following error along with many warnings about deprecation:
and in the
librealsense/build/CMakeFiles/CmakeError.log
:CMakeError.log
The first error tells me that he can not find -lc++ and I don't know how do install that. Is it from a very old xcode version?
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: