facebookincubator / velox

A C++ vectorized database acceleration library aimed to optimizing query engines and data processing systems.
https://velox-lib.io/
Apache License 2.0
3.48k stars 1.14k forks source link

Cannot build velox on Apple M1 Max #2322

Open ChengjieLi28 opened 2 years ago

ChengjieLi28 commented 2 years ago

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.

kgpai commented 2 years ago

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

ChengjieLi28 commented 2 years ago

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.

kgpai commented 2 years ago

@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 commented 2 years ago

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

ChengjieLi28 commented 2 years ago

Hi, @kgpai . Is there any update please?

kgpai commented 2 years ago

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