Skip to content

Failure to build highway with Apple's clang 16 #2317

Open
@fxcoudert

Description

With the latest git version of highway, on macOS 15 Beta, with Apple's system compiler (clang 16 beta), I configure with:

cmake -S . -B builddir -DBUILD_SHARED_LIBS=ON -DHWY_ENABLE_TESTS=OFF -DHWY_ENABLE_EXAMPLES=OFF

then build with

cmake --build builddir

and get the following crash:

fx@mini-m2 highway % cmake -S . -B builddir -DBUILD_SHARED_LIBS=ON -DHWY_ENABLE_TESTS=OFF -DHWY_ENABLE_EXAMPLES=OFF
CMake Deprecation Warning at CMakeLists.txt:28 (cmake_policy):
  The OLD behavior for policy CMP0111 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS - Success
-- Performing Test HWY_EMSCRIPTEN
-- Performing Test HWY_EMSCRIPTEN - Failed
-- Performing Test HWY_RISCV
-- Performing Test HWY_RISCV - Failed
-- Looking for sys/auxv.h
-- Looking for sys/auxv.h - not found
-- Looking for asm/hwcap.h
-- Looking for asm/hwcap.h - not found
-- Configuring done (1.3s)
-- Generating done (0.1s)
-- Build files have been written to: /tmp/highway/builddir
fx@mini-m2 highway % cmake --build builddir
[  2%] Building CXX object CMakeFiles/hwy.dir/hwy/abort.cc.o
[  5%] Building CXX object CMakeFiles/hwy.dir/hwy/aligned_allocator.cc.o
[  7%] Building CXX object CMakeFiles/hwy.dir/hwy/nanobenchmark.cc.o
[ 10%] Building CXX object CMakeFiles/hwy.dir/hwy/per_target.cc.o
[ 12%] Building CXX object CMakeFiles/hwy.dir/hwy/print.cc.o
[ 15%] Building CXX object CMakeFiles/hwy.dir/hwy/targets.cc.o
[ 17%] Building CXX object CMakeFiles/hwy.dir/hwy/timer.cc.o
[ 20%] Linking CXX shared library libhwy.dylib
[ 20%] Built target hwy
[ 22%] Building CXX object CMakeFiles/hwy_contrib.dir/hwy/contrib/sort/vqsort_128a.cc.o
c++: error: unable to execute command: Segmentation fault: 11
c++: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
c++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /var/folders/3s/c_rqj2651cq74hv7rv55dmh40000gn/T/vqsort_128a-4d5f40.cpp
c++: note: diagnostic msg: /var/folders/3s/c_rqj2651cq74hv7rv55dmh40000gn/T/vqsort_128a-4d5f40.sh
c++: note: diagnostic msg: Crash backtrace is located in
c++: note: diagnostic msg: /Users/fx/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
c++: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
c++: note: diagnostic msg: 

********************
gmake[2]: *** [CMakeFiles/hwy_contrib.dir/build.make:76: CMakeFiles/hwy_contrib.dir/hwy/contrib/sort/vqsort_128a.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:143: CMakeFiles/hwy_contrib.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions