-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
setup-macos.sh fails on Apple M1 #1446
Comments
also this error:
|
seems because brew install libs to a different folder. velox expect
|
We also saw the same error recently. @xumingming will you be able to fix the setup-macos.sh by adding the line above? Ideally it will be nice to detect the brew install directory automatically, then link it to /usr/local. |
@yingsu00 sure, will open an PR soon. |
Hi @xumingming , Velox doesnt build on an Apple M1 yet. @Yuhta is working on that and we hope to have this ready by end of May; we will be fixing the scripts for the M1 in that process. |
@kgpai This is a permission issue on directory /usr/local. We got it on Intel processor too (MacOS). |
@xumingming Were you able to resolve below error by adding sudo to cmake_install? CMake Error at cmake_install.cmake:64 (file): Itried the similar way but still not able to resolve this issue. It will be helpful if you add somemore insight on this errror |
It seems there is still build error for m1
Any workaround or PR to fix? |
It is recommended to use |
On MacOS, you have to set |
Hi @majetideepak, + ninja -C _build install
ninja: Entering directory `_build'
[0/1] Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:57 (file):
file cannot create directory: /usr/local/lib/cmake/range-v3. Maybe need
administrative privileges.
FAILED: CMakeFiles/install.util However, I'm unable to correctly apply the fixes you shared, namely the addition of the Can you please share where the two changes must be applied in the file Thanks. |
@rishitc Run |
Thanks @jayzhan211. For future reference to anyone who stumbles on the same issue, here is the list of steps I followed for successfully setting up Velox on M1 Macs.
NOTE: The command for exporting @majetideepak I think adding these commands to the project If it makes sense, I would love to create a PR. Thanks. |
|
Hi @majetideepak, |
@majetideepak Also, I noticed a similar bug wherein Velox requires a specific dependency version. Still, Velox does not track the path to that particular version's folder, causing a build error if the default system version is incompatible with Velox. For example, even in the case of Protobuf, my system already had version I'd solved this issue by uninstalling the Edit: I added some more details of a similar I faced. |
Hi @majetideepak, Is it normal for these test cases to fail? i.e. they don't work correctly in specific dev environments as they may not be applicable there, or is there some other root case?
|
23.x protobuf issue is very recent. We could throw an error, but it is cumbersome to keep track of and maintain such incompatible versions on different OSes. |
This is expected. The unit tests are not tested on MacOS and some of them fail as you reported. |
…#5309) Summary: Folly needs OpenSSL 1.1 version to function. In the presence of other OpenSSL versions, it is possible that folly in bundled mode can pick up other incompatible versions causing the build to fail. Currently, in the `setup-macos.sh` script, we set OPENSSL_ROOT_DIR=$(brew --prefix [email protected]). We require a similar change for the bundled folly installs as well. To achieve this goal, we now set the `OPENSSL_ROOT_DIR` environment variable via the CMake file to set the path to the correct version of OpenSSL. Resolves facebookincubator#1446, facebookincubator#5309
…#5309) Summary: Folly needs OpenSSL 1.1 version to function. In the presence of other OpenSSL versions, it is possible that folly in bundled mode can pick up other incompatible versions causing the build to fail. Currently, in the `setup-macos.sh` script, we set OPENSSL_ROOT_DIR=$(brew --prefix [email protected]). We require a similar change for the bundled folly installs as well. To achieve this goal, we now set the `OPENSSL_ROOT_DIR` environment variable via the CMake file to set the path to the correct version of OpenSSL. Resolves facebookincubator#1446, facebookincubator#5309
…#5309) Summary: Folly needs OpenSSL 1.1 version to function. In the presence of other OpenSSL versions, it is possible that folly in bundled mode can pick up other incompatible versions causing the build to fail. Currently, in the `setup-macos.sh` script, we set OPENSSL_ROOT_DIR=$(brew --prefix [email protected]). We require a similar change for the bundled folly installs as well. To achieve this goal, we now set the `OPENSSL_ROOT_DIR` environment variable via the CMake file to set the path to the correct version of OpenSSL. Resolves facebookincubator#1446, facebookincubator#5309
…#5309) Summary: Folly needs OpenSSL 1.1 version to function. In the presence of other OpenSSL versions, it is possible that folly in bundled mode can pick up other incompatible versions causing the build to fail. Currently, in the `setup-macos.sh` script, we set OPENSSL_ROOT_DIR=$(brew --prefix [email protected]). We require a similar change for the bundled folly installs as well. To achieve this goal, we now set the `OPENSSL_ROOT_DIR` environment variable via the CMake file to set the path to the correct version of OpenSSL. Resolves facebookincubator#1446, facebookincubator#5309
…#5309) Summary: Folly needs OpenSSL 1.1 version to function. In the presence of other OpenSSL versions, it is possible that folly in bundled mode can pick up other incompatible versions causing the build to fail. Currently, in the `setup-macos.sh` script, we set OPENSSL_ROOT_DIR=$(brew --prefix [email protected]). We require a similar change for the bundled folly installs as well. To achieve this goal, we now set the `OPENSSL_ROOT_DIR` environment variable via the CMake file to set the path to the correct version of OpenSSL. Resolves facebookincubator#1446, facebookincubator#5309
I had tried with the commands above, however it can't pass the last step. This message may be a bit out of the blue, but my guess after looking through the README docs and some mac-related config issue is that this seems to be the latest development here. The problem I'm having now also seems similar to some existing problems(such as fmt version), and i fixed some of them, except below one. ![]() i found #5421 seems have similar problem, but it fixed after all. anyone could help ? @majetideepak i just want to learn how to build database from velox, and the info above help me generate compile_comands.json successfully, so I can read the source code happily, tks! Mac m2, clang 14.0, Mac OSX 13.4.1, protobuf@21, commit-id : 5b32965 Not sure if this way of writing supports the M2 chip, but when I comment out this condition and re-run, it still reports ![]()
|
Hi @jensenojs, I think the issue you are facing is related to OpenSSL because of the error messages displayed in the first screenshot; it appears that you are using OpenSSL version 3.x when version 1.1 is required for building Velox[1]. Note: |
@rishitc thanks for helping! and yes i used OpenSSL in wrong version, The OpenSSL under my /usr/bin is version 3.x, but unfortunately it is really quite difficult to solve it (this seems to be related to System Integrity Protection, so I can't delete it directly even after i turn off it (chmod, sudo)... ), and homebrew Refused to use 1.1 as the default, so I added [email protected] to the environment variable. however, i don't know how to set LDFLAGS and CPPFLAGS in velox, this CMake project is just too complicated for me ![]() so folly complain about opensslv.h not found, but opensslv.h is there. Am I on the right path to troubleshoot the problem and any advice? |
@jensenojs you have to |
@majetideepak thanks for reply! But I seem to have encountered a new problem, which looks somewhat similar to this issue #5218 , but i have to go to work and i will check later ![]() |
i used same way to deal with protobuf, and finally suceessed! @majetideepak @rishitc thanks you so much! |
I am still facing the error running the script by itself. Can I contribute to the setup-macos.sh to add |
@dulvinw sure! We have to make this change to the other OS setup scripts as well. |
hi, I also complie velox in mac m1: export INSTALL_PREFIX=/Users/{username}/velox/velox_dependency_install
CPU_TARGET="arm64" ./scripts/setup-macos.sh
make but, output error: CMake Error at CMake/resolve_dependency_modules/re2.cmake:38 (if):
if given arguments:
"STREQUAL" "BUNDLED"
Unknown arguments specified
Call Stack (most recent call first):
CMake/ResolveDependency.cmake:43 (include)
CMake/ResolveDependency.cmake:75 (build_dependency)
CMakeLists.txt:411 (resolve_dependency) |
I tried it worked on macos M2!! Can you add this step to README and update build scripts? Thank you |
@unigof we should not need |
…#5309) Summary: Folly needs OpenSSL 1.1 version to function. In the presence of other OpenSSL versions, it is possible that folly in bundled mode can pick up other incompatible versions causing the build to fail. Currently, in the `setup-macos.sh` script, we set OPENSSL_ROOT_DIR=$(brew --prefix [email protected]). We require a similar change for the bundled folly installs as well. To achieve this goal, we now set the `OPENSSL_ROOT_DIR` environment variable via the CMake file to set the path to the correct version of OpenSSL. Resolves facebookincubator#1446, facebookincubator#5309
…#5309) Summary: Folly needs OpenSSL 1.1 version to function. In the presence of other OpenSSL versions, it is possible that folly in bundled mode can pick up other incompatible versions causing the build to fail. Currently, in the `setup-macos.sh` script, we set OPENSSL_ROOT_DIR=$(brew --prefix [email protected]). We require a similar change for the bundled folly installs as well. To achieve this goal, we now set the `OPENSSL_ROOT_DIR` environment variable via the CMake file to set the path to the correct version of OpenSSL. Resolves facebookincubator#1446, facebookincubator#5309
Closing this as original issue is already solved. |
Summary: Tested on MacOS 14.4.1 w/ M1 chip. * Per #1446 (comment), `CPU_TARGET="arm64"` is not needed any more. ``` ++ arch + '[' arm64 == arm64 ']' ``` * Add `INSTALL_PREFIX` to address dependency installation permission issues in #2016 CC: majetideepak Pull Request resolved: #9717 Reviewed By: xiaoxmeng Differential Revision: D57072389 Pulled By: bikramSingh91 fbshipit-source-id: 4a48333b5034afc4db8ffac411769323b4f77a82
Summary: Tested on MacOS 14.4.1 w/ M1 chip. * Per facebookincubator#1446 (comment), `CPU_TARGET="arm64"` is not needed any more. ``` ++ arch + '[' arm64 == arm64 ']' ``` * Add `INSTALL_PREFIX` to address dependency installation permission issues in facebookincubator#2016 CC: majetideepak Pull Request resolved: facebookincubator#9717 Reviewed By: xiaoxmeng Differential Revision: D57072389 Pulled By: bikramSingh91 fbshipit-source-id: 4a48333b5034afc4db8ffac411769323b4f77a82
Summary: Tested on MacOS 14.4.1 w/ M1 chip. * Per facebookincubator#1446 (comment), `CPU_TARGET="arm64"` is not needed any more. ``` ++ arch + '[' arm64 == arm64 ']' ``` * Add `INSTALL_PREFIX` to address dependency installation permission issues in facebookincubator#2016 CC: majetideepak Pull Request resolved: facebookincubator#9717 Reviewed By: xiaoxmeng Differential Revision: D57072389 Pulled By: bikramSingh91 fbshipit-source-id: 4a48333b5034afc4db8ffac411769323b4f77a82
env: Apple M1
error message:
I have to add
sudo
forcmake_install
to walk around.The text was updated successfully, but these errors were encountered: