velox icon indicating copy to clipboard operation
velox copied to clipboard

Cannot build velox on Apple M1 Max

Open ChengjieLi28 opened this issue 2 years ago • 6 comments

Hi, I am trying to build velox on MacBook Pro M1 Max. I have installed all the prerequisites and run the command mentioned #2016 successfully: sudo INSTALL_PREREQUISITES=N CPU_TARGET="arm64" ./scripts/setup-macos.sh.

Then I run CPU_TARGET="arm64" make EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_MINIMAL=ON" But I got these errors: logs.txt

No matter I execute CPU_TARGET="arm64" make or CPU_TARGET="arm64" make EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_MINIMAL=ON", I got the same errors.

velox commit: b9d7e887d82471eb7df1311cdb0b3e5de4046099

xsimd commit: 2d34f00a984d9b62ace283f621adb9a4b2d69396

clang version: Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.3.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Could someone please help check this issue? Thanks.

ChengjieLi28 avatar Aug 18 '22 11:08 ChengjieLi28

Thanks @ChengjieLi28 , I am working on a fix in this PR: https://github.com/facebookincubator/velox/pull/2318

kgpai avatar Aug 18 '22 15:08 kgpai

Hi @kgpai , Thanks for your fix. With this commit 8a71886b8d4f5cfc41f3b3289e7d51bf3097e1f4, I can run CPU_TARGET="arm64" make EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_MINIMAL=ON" successfully.

But when I execute CPU_TARGET="arm64" make release EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_BENCHMARKS_LARGE=ON -DVELOX_ENABLE_BENCHMARKS=ON -DVELOX_ENABLE_BENCHMARKS_BASIC=ON" for TPCH benchmark, I got these errors: logs2.txt

Related cmake logs: CMakeError.log CMakeOutput.log

And when I just ran CPU_TARGET="arm64" make, the above errors still happen.

It says that cmake cannot find boost, but I have installed them through the setup_macos script...

Update: Since I ran CPU_TARGET="arm64" make release EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_BENCHMARKS_LARGE=ON -DVELOX_ENABLE_BENCHMARKS=ON -DVELOX_ENABLE_BENCHMARKS_BASIC=ON" once and it downloaded the arrow, now the command CPU_TARGET="arm64" make EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_MINIMAL=ON" failed with the above errors too. When I delete the "_build" dictionary manually, then the command CPU_TARGET="arm64" make EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_MINIMAL=ON" can be successfully run again.

ChengjieLi28 avatar Aug 19 '22 04:08 ChengjieLi28

@Yuhta Can arrow's find boost be somehow messing around with this ?

-- ARROW_ZSTD_BUILD_VERSION: v1.5.1
-- ARROW_ZSTD_BUILD_SHA256_CHECKSUM: dc05773342b28f11658604381afd22cb0a13e8ba17ff2bd7516df377060c18dd
CMake Error at /opt/homebrew/Cellar/cmake/3.24.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR system filesystem)
  (Required is at least version "1.58")
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.24.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /opt/homebrew/Cellar/cmake/3.24.0/share/cmake/Modules/FindBoost.cmake:2376 (find_package_handle_standard_args)
  cmake_modules/FindBoostAlt.cmake:41 (find_package)
  cmake_modules/ThirdpartyToolchain.cmake:247 (find_package)
  cmake_modules/ThirdpartyToolchain.cmake:977 (resolve_dependency)
  CMakeLists.txt:552 (include)

kgpai avatar Aug 19 '22 17:08 kgpai

@ChengjieLi28 I will try and replicate this on my M1; Please give me a day or two.

kgpai avatar Aug 19 '22 17:08 kgpai

Hi, @kgpai . Is there any update please?

ChengjieLi28 avatar Aug 24 '22 08:08 ChengjieLi28

Hi @ChengjieLi28 , Apologies , did not get to it yet, will work on it shortly and give you a fix.

kgpai avatar Aug 24 '22 15:08 kgpai