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.41k stars 1.11k forks source link

Build failed on mac m1 #10499

Closed zml1206 closed 1 month ago

zml1206 commented 1 month ago

Problem description

Commit 9c56ef3d39be7807dadc0b0fb531548b86a22ba5 can be built successfully. Build fails after upgrade.

System information

Velox System Info v0.0.2 Commit: 9c2ab9b9e31c871896ac4bd909e94c3d612ecff6 CMake Version: 3.30.0 System: Darwin-23.5.0 Arch: x86_64 C++ Compiler: /Library/Developer/CommandLineTools/usr/bin/c++ C++ Compiler Version: 15.0.0.15000309 C Compiler: /Library/Developer/CommandLineTools/usr/bin/cc C Compiler Version: 15.0.0.15000309 CMake Prefix Path: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr;/usr/local;/usr;/;/usr/local/Cellar/cmake/3.30.0;/usr/local;/usr/X11R6;/usr/pkg;/opt;/sw;/opt/local

CMake log

-- Build files have been written to: /Users/zml/Desktop/git_hub/velox/fbthrift/_build
+ cmake --build _build
[0/2] Re-checking globbed directories...
[58/353] Generating templates.cc
FAILED: thrift/compiler/generate/templates.cc /Users/zml/Desktop/git_hub/velox/fbthrift/_build/thrift/compiler/generate/templates.cc
cd /Users/zml/Desktop/git_hub/velox/fbthrift/_build/thrift/compiler/generate && /Users/zml/Desktop/git_hub/velox/fbthrift/_build/bin/compiler_generate_build_templates /Users/zml/Desktop/git_hub/velox/fbthrift/thrift/compiler/generate/templates > templates.cc
/bin/sh: line 1: 13568 Illegal instruction: 4  /Users/zml/Desktop/git_hub/velox/fbthrift/_build/bin/compiler_generate_build_templates /Users/zml/Desktop/git_hub/velox/fbthrift/thrift/compiler/generate/templates > templates.cc
[60/353] Building CXX object thrift/lib/cpp/CMakeFiles/concurrency.dir/concurrency/ThreadManager.cpp.o
ninja: build stopped: subcommand failed.
+ echo 'build failed'
build failed
+ exit 1
majetideepak commented 1 month ago

@zml1206 can you share the output of sysctl -a | grep machdep.cpu.features | awk '{print tolower($0)}'?

majetideepak commented 1 month ago

@zml1206 You said mac m1 but the system info you shared has Arch: x86_64? Are you building a container?

zml1206 commented 1 month ago

@zml1206 can you share the output of sysctl -a | grep machdep.cpu.features | awk '{print tolower($0)}'?

Thank you. machdep.cpu.features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clfsh ds acpi mmx fxsr sse sse2 ss htt tm pbe sse3 pclmulqdq dtse64 mon dscpl vmx est tm2 ssse3 cx16 tpr pdcm sse4.1 sse4.2 aes seglim64

zml1206 commented 1 month ago

@zml1206 You said mac m1 but the system info you shared has Arch: x86_64? Are you building a container?

Not in container, my mac seems to have the first generation M1 chip, 13-inch, M1, 2020.

majetideepak commented 1 month ago

I think all M1s are arm-based. Yours is likely an intel CPU. I recently removed sse support for macos here https://github.com/facebookincubator/velox/pull/10346 From your machdep.cpu.features there is only sse support. I will add the support for sse back.

majetideepak commented 1 month ago

@zml1206 Can you confirm this PR https://github.com/facebookincubator/velox/pull/10519 solves your build issue?

zml1206 commented 1 month ago

@zml1206 Can you confirm is this PR #10519 solves your build issue?

Of course, I'll try it right away.

zml1206 commented 1 month ago

10519 resolved this issue, thank you very much @majetideepak