facebookincubator / velox

A composable and fully extensible C++ execution engine library for data management systems.
https://velox-lib.io/
Apache License 2.0
3.52k stars 1.15k forks source link

Build Velox on mac m1 #3400

Closed amorynan closed 1 year ago

amorynan commented 1 year ago

Problem description

After I executed scripts/setup-macos.sh And then executed CPU_TARGET="arm64" make debug here something happend.

System information

Velox System Info v0.0.1 Commit: f076c302bb708f2a7dd8d65e5f8c434a25bd72d0 CMake Version: System: Arch: C++ Compiler: C++ Compiler Version: C Compiler: C Compiler Version: CMake Prefix Path:

CMake log

The system is: Darwin - 21.5.0 - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /Library/Developer/CommandLineTools/usr/bin/cc 
Build flags: 
Id flags: -c 

The output was:
0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"

The C compiler identification is AppleClang, found in "/Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/3.25.0/CompilerIdC/CMakeCCompilerId.o"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /Library/Developer/CommandLineTools/usr/bin/c++ 
Build flags: 
Id flags: -c 

The output was:
0

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"

The CXX compiler identification is AppleClang, found in "/Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/3.25.0/CompilerIdCXX/CMakeCXXCompilerId.o"

Detecting C compiler ABI info compiled with the following output:
Change Dir: /Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-GBF2y2

Run Build Command(s):/usr/local/bin/ninja cmTC_49333 && [1/2] Building C object CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang: warning: -Wl,-v: 'linker' input unused [-Wunused-command-line-argument]
 "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx12.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-strict-return -fno-rounding-math -munwind-tables -target-sdk-version=12.3 -fvisibility-inlines-hidden-static-local-var -target-cpu penryn -tune-cpu generic -debugger-tuning=lldb -target-linker-version 763 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6 -dependency-file CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o.d -skip-unused-modulemap-deps -MT CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o -sys-header-deps -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -Wno-objc-load-method -fdebug-compilation-dir=/Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-GBF2y2 -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcommon -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o -x c /usr/local/Cellar/cmake/3.25.0/share/cmake/Modules/CMakeCCompilerABI.c
clang -cc1 version 13.1.6 (clang-1316.0.21.2.5) default target x86_64-apple-darwin21.5.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include
 /Library/Developer/CommandLineTools/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)
End of search list.
[2/2] Linking C executable cmTC_49333
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
 "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -platform_version macos 12.0.0 12.3 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -o cmTC_49333 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a
@(#)PROGRAM:ld  PROJECT:ld64-764
BUILD 11:22:50 Apr 28 2022
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
Library search paths:
    /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib
Framework search paths:
    /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/

Parsed C implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include]
    add: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include]
    add: [/Library/Developer/CommandLineTools/usr/include]
  end of search list found
  collapse include dir [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] ==> [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include]
  collapse include dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include]
  collapse include dir [/Library/Developer/CommandLineTools/usr/include] ==> [/Library/Developer/CommandLineTools/usr/include]
  implicit include dirs: [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include;/Library/Developer/CommandLineTools/usr/include]

Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-GBF2y2]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/local/bin/ninja cmTC_49333 && [1/2] Building C object CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o]
  ignore line: [Apple clang version 13.1.6 (clang-1316.0.21.2.5)]
  ignore line: [Target: x86_64-apple-darwin21.5.0]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /Library/Developer/CommandLineTools/usr/bin]
  ignore line: [clang: warning: -Wl -v: 'linker' input unused [-Wunused-command-line-argument]]
  ignore line: [ "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx12.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-strict-return -fno-rounding-math -munwind-tables -target-sdk-version=12.3 -fvisibility-inlines-hidden-static-local-var -target-cpu penryn -tune-cpu generic -debugger-tuning=lldb -target-linker-version 763 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6 -dependency-file CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o.d -skip-unused-modulemap-deps -MT CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o -sys-header-deps -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -Wno-objc-load-method -fdebug-compilation-dir=/Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-GBF2y2 -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcommon -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o -x c /usr/local/Cellar/cmake/3.25.0/share/cmake/Modules/CMakeCCompilerABI.c]
  ignore line: [clang -cc1 version 13.1.6 (clang-1316.0.21.2.5) default target x86_64-apple-darwin21.5.0]
  ignore line: [ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include"]
  ignore line: [ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/Library/Frameworks"]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include]
  ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include]
  ignore line: [ /Library/Developer/CommandLineTools/usr/include]
  ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)]
  ignore line: [End of search list.]
  ignore line: [[2/2] Linking C executable cmTC_49333]
  ignore line: [Apple clang version 13.1.6 (clang-1316.0.21.2.5)]
  ignore line: [Target: x86_64-apple-darwin21.5.0]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /Library/Developer/CommandLineTools/usr/bin]
  link line: [ "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -platform_version macos 12.0.0 12.3 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -o cmTC_49333 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a]
    arg [/Library/Developer/CommandLineTools/usr/bin/ld] ==> ignore
    arg [-demangle] ==> ignore
    arg [-lto_library] ==> ignore, skip following value
    arg [/Library/Developer/CommandLineTools/usr/lib/libLTO.dylib] ==> skip value of -lto_library
    arg [-dynamic] ==> ignore
    arg [-arch] ==> ignore
    arg [x86_64] ==> ignore
    arg [-platform_version] ==> ignore
    arg [macos] ==> ignore
    arg [12.0.0] ==> ignore
    arg [12.3] ==> ignore
    arg [-syslibroot] ==> ignore
    arg [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_49333] ==> ignore
    arg [-search_paths_first] ==> ignore
    arg [-headerpad_max_install_names] ==> ignore
    arg [-v] ==> ignore
    arg [CMakeFiles/cmTC_49333.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lSystem] ==> lib [System]
    arg [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] ==> lib [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a]
  Library search paths: [;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib]
  Framework search paths: [;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/]
  remove lib [System]
  remove lib [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a]
  collapse library dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib]
  collapse framework dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks]
  implicit libs: []
  implicit objs: []
  implicit dirs: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib]
  implicit fwks: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks]

Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-KErfhr

Run Build Command(s):/usr/local/bin/ninja cmTC_21250 && [1/2] Building CXX object CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang: warning: -Wl,-v: 'linker' input unused [-Wunused-command-line-argument]
 "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx12.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-strict-return -fno-rounding-math -munwind-tables -target-sdk-version=12.3 -fvisibility-inlines-hidden-static-local-var -target-cpu penryn -tune-cpu generic -debugger-tuning=lldb -target-linker-version 763 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6 -dependency-file CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o.d -skip-unused-modulemap-deps -MT CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -stdlib=libc++ -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1 -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -Wno-objc-load-method -fdeprecated-macro -fdebug-compilation-dir=/Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-KErfhr -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-cxx-modules -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o -x c++ /usr/local/Cellar/cmake/3.25.0/share/cmake/Modules/CMakeCXXCompilerABI.cpp
clang -cc1 version 13.1.6 (clang-1316.0.21.2.5) default target x86_64-apple-darwin21.5.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1
 /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include
 /Library/Developer/CommandLineTools/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)
End of search list.
[2/2] Linking CXX executable cmTC_21250
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
 "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -platform_version macos 12.0.0 12.3 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -o cmTC_21250 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a
@(#)PROGRAM:ld  PROJECT:ld64-764
BUILD 11:22:50 Apr 28 2022
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
Library search paths:
    /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib
Framework search paths:
    /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/

Parsed CXX implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1]
    add: [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include]
    add: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include]
    add: [/Library/Developer/CommandLineTools/usr/include]
  end of search list found
  collapse include dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1]
  collapse include dir [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include] ==> [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include]
  collapse include dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include]
  collapse include dir [/Library/Developer/CommandLineTools/usr/include] ==> [/Library/Developer/CommandLineTools/usr/include]
  implicit include dirs: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1;/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include;/Library/Developer/CommandLineTools/usr/include]

Parsed CXX implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-KErfhr]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/local/bin/ninja cmTC_21250 && [1/2] Building CXX object CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o]
  ignore line: [Apple clang version 13.1.6 (clang-1316.0.21.2.5)]
  ignore line: [Target: x86_64-apple-darwin21.5.0]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /Library/Developer/CommandLineTools/usr/bin]
  ignore line: [clang: warning: -Wl -v: 'linker' input unused [-Wunused-command-line-argument]]
  ignore line: [ "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx12.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-strict-return -fno-rounding-math -munwind-tables -target-sdk-version=12.3 -fvisibility-inlines-hidden-static-local-var -target-cpu penryn -tune-cpu generic -debugger-tuning=lldb -target-linker-version 763 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6 -dependency-file CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o.d -skip-unused-modulemap-deps -MT CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -stdlib=libc++ -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1 -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -Wno-objc-load-method -fdeprecated-macro -fdebug-compilation-dir=/Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-KErfhr -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-cxx-modules -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -clang-vendor-feature=+messageToSelfInClassMethodIdReturnType -clang-vendor-feature=+disableInferNewAvailabilityFromInit -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o -x c++ /usr/local/Cellar/cmake/3.25.0/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [clang -cc1 version 13.1.6 (clang-1316.0.21.2.5) default target x86_64-apple-darwin21.5.0]
  ignore line: [ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/local/include"]
  ignore line: [ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/Library/Frameworks"]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1]
  ignore line: [ /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include]
  ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include]
  ignore line: [ /Library/Developer/CommandLineTools/usr/include]
  ignore line: [ /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks (framework directory)]
  ignore line: [End of search list.]
  ignore line: [[2/2] Linking CXX executable cmTC_21250]
  ignore line: [Apple clang version 13.1.6 (clang-1316.0.21.2.5)]
  ignore line: [Target: x86_64-apple-darwin21.5.0]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /Library/Developer/CommandLineTools/usr/bin]
  link line: [ "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -platform_version macos 12.0.0 12.3 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -o cmTC_21250 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a]
    arg [/Library/Developer/CommandLineTools/usr/bin/ld] ==> ignore
    arg [-demangle] ==> ignore
    arg [-lto_library] ==> ignore, skip following value
    arg [/Library/Developer/CommandLineTools/usr/lib/libLTO.dylib] ==> skip value of -lto_library
    arg [-dynamic] ==> ignore
    arg [-arch] ==> ignore
    arg [x86_64] ==> ignore
    arg [-platform_version] ==> ignore
    arg [macos] ==> ignore
    arg [12.0.0] ==> ignore
    arg [12.3] ==> ignore
    arg [-syslibroot] ==> ignore
    arg [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_21250] ==> ignore
    arg [-search_paths_first] ==> ignore
    arg [-headerpad_max_install_names] ==> ignore
    arg [-v] ==> ignore
    arg [CMakeFiles/cmTC_21250.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
    arg [-lc++] ==> lib [c++]
    arg [-lSystem] ==> lib [System]
    arg [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a] ==> lib [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a]
  Library search paths: [;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib]
  Framework search paths: [;/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/]
  remove lib [System]
  remove lib [/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib/darwin/libclang_rt.osx.a]
  collapse library dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib]
  collapse framework dir [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/] ==> [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks]
  implicit libs: [c++]
  implicit objs: []
  implicit dirs: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib]
  implicit fwks: [/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks]

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD succeeded with the following output:
Change Dir: /Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-8xNpdz

Run Build Command(s):/usr/local/bin/ninja cmTC_b539f && [1/2] Building C object CMakeFiles/cmTC_b539f.dir/src.c.o
[2/2] Linking C executable cmTC_b539f

Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the BZ2_bzCompressInit exist passed with the following output:
Change Dir: /Users/amory/CLionProjects/velox/_build/debug/CMakeFiles/CMakeScratch/TryCompile-X3diTW

Run Build Command(s):/usr/local/bin/ninja cmTC_2fa0a && [1/2] Building C object CMakeFiles/cmTC_2fa0a.dir/CheckSymbolExists.c.o
[2/2] Linking C executable cmTC_2fa0a

File CheckSymbolExists.c:
/* */
#include <bzlib.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef BZ2_bzCompressInit
  return ((int*)(&BZ2_bzCompressInit))[argc];
#else
  (void)argc;
  return 0;
#endif
}
assignUser commented 1 year ago

CMake Version: It looks like you have built via xcode/clion and don't have cmake installed? Please install cmake and try CPU_TARGET="arm64" make debug again from within a system CLI not from within the IDE.

amorynan commented 1 year ago

I have already made CPU_TARGET="arm64" , and my cmake is always installed , but also failed ...

image
amorynan commented 1 year ago

and same with system cli...

assignUser commented 1 year ago

It seems that double-conversion is not installed (or can't be found) could you check if it was built when running setup-macos?

amorynan commented 1 year ago

double-conversion is build as .a file but here is no dylib file ? do I miss any commands here to build it ? I make build it as the README.md told strictly ...

截屏2022-12-03 14 52 45 截屏2022-12-03 14 57 57 截屏2022-12-03 14 53 13
assignUser commented 1 year ago

Ah, we seem to only build the static version pls apply this diff and try installing again (after removing)

diff --git a/scripts/setup-macos.sh b/scripts/setup-macos.sh
index e02a661c..77ec587b 100755
--- a/scripts/setup-macos.sh
+++ b/scripts/setup-macos.sh
@@ -87,7 +87,7 @@ function install_fmt {

 function install_double_conversion {
   github_checkout google/double-conversion v3.1.5
-  cmake_install -DBUILD_TESTING=OFF
+  cmake_install -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON
 }

 function install_ranges_v3 {
amorynan commented 1 year ago

I fix it , but here new stuff comes up ... first .I try:

截屏2022-12-04 16 03 46

then I change the build flag, but also wrong here:

截屏2022-12-04 16 05 55

last I try to use sse , but do not work !!! What Can I do else ?

截屏2022-12-04 16 06 40
assignUser commented 1 year ago

@amorynan could you please stop posting screenshots and post proper logs incl. the invocation you used to compile? Ideally within <details> log here </details>

@kgpai Could you confirm that my fix works and allows building velox on m1?

amorynan commented 1 year ago

log here :

cmake --build _build/debug -j 10
[60/968] Building CXX object velox/common/caching/CMakeFiles/velox_caching.dir/SsdCache.cpp.o
FAILED: velox/common/caching/CMakeFiles/velox_caching.dir/SsdCache.cpp.o 
ccache /Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DFMT_LOCALE -DGFLAGS_IS_A_DLL=0 -I/usr/local/opt/icu4c/include -I/Users/amory/CLionProjects/velox/. -I/Users/amory/CLionProjects/velox/velox/external/xxhash -I/Users/amory/CLionProjects/velox/third_party/xsimd/include -isystem /usr/local/include -isystem /Users/amory/CLionProjects/velox/velox -isystem /Users/amory/CLionProjects/velox/velox/external -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb/tpch/dbgen/include -isystem /usr/local/opt/openssl@1.1/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest -msse4.2 -std=c++17 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fPIC -std=gnu++17 -MD -MT velox/common/caching/CMakeFiles/velox_caching.dir/SsdCache.cpp.o -MF velox/common/caching/CMakeFiles/velox_caching.dir/SsdCache.cpp.o.d -o velox/common/caching/CMakeFiles/velox_caching.dir/SsdCache.cpp.o -c /Users/amory/CLionProjects/velox/velox/common/caching/SsdCache.cpp
In file included from /Users/amory/CLionProjects/velox/velox/common/caching/SsdCache.cpp:16:
In file included from /Users/amory/CLionProjects/velox/./velox/common/caching/SsdCache.h:19:
In file included from /Users/amory/CLionProjects/velox/./velox/common/caching/SsdFile.h:19:
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:3: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
  ^
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nullable' if the pointer may be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nullable
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nonnull' if the pointer should never be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nonnull
1 error generated.
[61/968] Building CXX object velox/common/caching/CMakeFiles/velox_caching.dir/AsyncDataCache.cpp.o
FAILED: velox/common/caching/CMakeFiles/velox_caching.dir/AsyncDataCache.cpp.o 
ccache /Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DFMT_LOCALE -DGFLAGS_IS_A_DLL=0 -I/usr/local/opt/icu4c/include -I/Users/amory/CLionProjects/velox/. -I/Users/amory/CLionProjects/velox/velox/external/xxhash -I/Users/amory/CLionProjects/velox/third_party/xsimd/include -isystem /usr/local/include -isystem /Users/amory/CLionProjects/velox/velox -isystem /Users/amory/CLionProjects/velox/velox/external -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb/tpch/dbgen/include -isystem /usr/local/opt/openssl@1.1/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest -msse4.2 -std=c++17 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fPIC -std=gnu++17 -MD -MT velox/common/caching/CMakeFiles/velox_caching.dir/AsyncDataCache.cpp.o -MF velox/common/caching/CMakeFiles/velox_caching.dir/AsyncDataCache.cpp.o.d -o velox/common/caching/CMakeFiles/velox_caching.dir/AsyncDataCache.cpp.o -c /Users/amory/CLionProjects/velox/velox/common/caching/AsyncDataCache.cpp
In file included from /Users/amory/CLionProjects/velox/velox/common/caching/AsyncDataCache.cpp:17:
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:3: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
  ^
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nullable' if the pointer may be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nullable
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nonnull' if the pointer should never be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nonnull
1 error generated.
[62/968] Building CXX object velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/SsdFileTest.cpp.o
FAILED: velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/SsdFileTest.cpp.o 
ccache /Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DFMT_LOCALE -DGFLAGS_IS_A_DLL=0 -I/usr/local/opt/icu4c/include -I/Users/amory/CLionProjects/velox/. -I/Users/amory/CLionProjects/velox/velox/external/xxhash -I/Users/amory/CLionProjects/velox/third_party/xsimd/include -isystem /usr/local/include -isystem /Users/amory/CLionProjects/velox/velox -isystem /Users/amory/CLionProjects/velox/velox/external -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb/tpch/dbgen/include -isystem /usr/local/opt/openssl@1.1/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest -msse4.2 -std=c++17 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fPIE -std=gnu++17 -MD -MT velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/SsdFileTest.cpp.o -MF velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/SsdFileTest.cpp.o.d -o velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/SsdFileTest.cpp.o -c /Users/amory/CLionProjects/velox/velox/common/caching/tests/SsdFileTest.cpp
In file included from /Users/amory/CLionProjects/velox/velox/common/caching/tests/SsdFileTest.cpp:18:
In file included from /Users/amory/CLionProjects/velox/./velox/common/caching/SsdCache.h:19:
In file included from /Users/amory/CLionProjects/velox/./velox/common/caching/SsdFile.h:19:
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:3: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
  ^
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nullable' if the pointer may be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nullable
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nonnull' if the pointer should never be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nonnull
1 error generated.
[63/968] Building CXX object velox/common/caching/CMakeFiles/velox_caching.dir/SsdFile.cpp.o
FAILED: velox/common/caching/CMakeFiles/velox_caching.dir/SsdFile.cpp.o 
ccache /Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DFMT_LOCALE -DGFLAGS_IS_A_DLL=0 -I/usr/local/opt/icu4c/include -I/Users/amory/CLionProjects/velox/. -I/Users/amory/CLionProjects/velox/velox/external/xxhash -I/Users/amory/CLionProjects/velox/third_party/xsimd/include -isystem /usr/local/include -isystem /Users/amory/CLionProjects/velox/velox -isystem /Users/amory/CLionProjects/velox/velox/external -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb/tpch/dbgen/include -isystem /usr/local/opt/openssl@1.1/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest -msse4.2 -std=c++17 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fPIC -std=gnu++17 -MD -MT velox/common/caching/CMakeFiles/velox_caching.dir/SsdFile.cpp.o -MF velox/common/caching/CMakeFiles/velox_caching.dir/SsdFile.cpp.o.d -o velox/common/caching/CMakeFiles/velox_caching.dir/SsdFile.cpp.o -c /Users/amory/CLionProjects/velox/velox/common/caching/SsdFile.cpp
In file included from /Users/amory/CLionProjects/velox/velox/common/caching/SsdFile.cpp:17:
In file included from /Users/amory/CLionProjects/velox/./velox/common/caching/SsdFile.h:19:
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:3: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
  ^
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nullable' if the pointer may be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nullable
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nonnull' if the pointer should never be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nonnull
1 error generated.
[65/968] Building CXX object velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/AsyncDataCacheTest.cpp.o
FAILED: velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/AsyncDataCacheTest.cpp.o 
ccache /Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DFMT_LOCALE -DGFLAGS_IS_A_DLL=0 -I/usr/local/opt/icu4c/include -I/Users/amory/CLionProjects/velox/. -I/Users/amory/CLionProjects/velox/velox/external/xxhash -I/Users/amory/CLionProjects/velox/third_party/xsimd/include -isystem /usr/local/include -isystem /Users/amory/CLionProjects/velox/velox -isystem /Users/amory/CLionProjects/velox/velox/external -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb -isystem /Users/amory/CLionProjects/velox/velox/external/duckdb/tpch/dbgen/include -isystem /usr/local/opt/openssl@1.1/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest/include -isystem /Users/amory/CLionProjects/velox/third_party/googletest/googletest -msse4.2 -std=c++17 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fPIE -std=gnu++17 -MD -MT velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/AsyncDataCacheTest.cpp.o -MF velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/AsyncDataCacheTest.cpp.o.d -o velox/common/caching/tests/CMakeFiles/velox_cache_test.dir/AsyncDataCacheTest.cpp.o -c /Users/amory/CLionProjects/velox/velox/common/caching/tests/AsyncDataCacheTest.cpp
In file included from /Users/amory/CLionProjects/velox/velox/common/caching/tests/AsyncDataCacheTest.cpp:18:
In file included from /Users/amory/CLionProjects/velox/./velox/common/caching/SsdCache.h:19:
In file included from /Users/amory/CLionProjects/velox/./velox/common/caching/SsdFile.h:19:
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:3: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
  ^
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nullable' if the pointer may be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nullable
/Users/amory/CLionProjects/velox/./velox/common/caching/AsyncDataCache.h:305:39: note: insert '_Nonnull' if the pointer should never be null
  tsan_atomic<SsdFile * FOLLY_NULLABLE> ssdFile_{nullptr};
                                      ^
                                        _Nonnull
1 error generated.
[69/968] Building CXX object velox/common/memory/tests/CMakeFiles/velox_memory_test.dir/ByteStreamTest.cpp.o
ninja: build stopped: subcommand failed.
make[1]: *** [build] Error 1
make: *** [debug] Error 2
assignUser commented 1 year ago

Hm, that FOLLY_NULLABLE macro should prevent that warning. A short term solution would be to disable that globally by adding the CXX flag -Wno-nullability-completeness

darrenfu commented 1 year ago

Hm, that FOLLY_NULLABLE macro should prevent that warning. A short term solution would be to disable that globally by adding the CXX flag -Wno-nullability-completeness

Thanks for the short-term turnaround, @assignUser. Is there any other place (e.g. ~/.zshrc) to add this CXX flag? It works when I add this line to the root CMakeList.txt file:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-completeness")
Yuhta commented 1 year ago

@assignUser @darrenfu We can disable that warning locally using FOLLY_GNU_DISABLE_WARNING

darrenfu commented 1 year ago

FOLLY_GNU_DISABLE_WARNING

@Yuhta Good to know.
Can you advise how to use the macro FOLLY_GNU_DISABLE_WARNING? If it still involves code change, I'd prefer less invasive way of updating the CMakeList.txt.

Yuhta commented 1 year ago

@darrenfu Example: #3391. The good thing about FOLLY_GNU_DISABLE_WARNING is it can disable it for certain part of the code while -Wno-nullability-completeness will disable the warning for all files.

assignUser commented 1 year ago

We now have m1 ci which passes. Is this still an issue for anyone here?

assignUser commented 1 year ago

Stale