Skip to content

Build problem on AppleClang #177

@collberg

Description

@collberg
> cmake -DCMAKE_INSTALL_PREFIX=...

-- The C compiler identification is AppleClang 17.0.0.17000013
-- The CXX compiler identification is AppleClang 17.0.0.17000013
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.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.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for libbsd
-- Check for libbsd: not found
-- Looking for bsd/stdlib.h
-- Looking for bsd/stdlib.h - not found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for arc4random_buf
-- Looking for arc4random_buf - found
-- Looking for lrand48
-- Looking for lrand48 - found
-- Looking for srand48_deterministic
-- Looking for srand48_deterministic - not found
-- Check for M4 macro processor
-- Check for M4 macro processor: found /usr/bin/m4

-- Configuring done (3.9s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/collberg/tmp/csmith
> make
[  1%] Building C object runtime/CMakeFiles/libcsmith_a.dir/volatile_runtime.c.o
[  2%] Linking C static library libcsmith.a
[  2%] Built target libcsmith_a
[  3%] Building C object runtime/CMakeFiles/libcsmith_so.dir/volatile_runtime.c.o
[  5%] Linking C shared library libcsmith.dylib
[  5%] Built target libcsmith_so
[  6%] Generating safe_math.h
[  7%] Generating safe_math_macros.h
[  8%] Generating safe_math_macros_notmp.h
[  8%] Built target headers
[ 10%] Building CXX object src/CMakeFiles/csmith.dir/AbsExtension.cpp.o
In file included from /Users/collberg/tmp/csmith/src/AbsExtension.cpp:37:
In file included from /Users/collberg/tmp/csmith/src/Type.h:48:
In file included from /Users/collberg/tmp/csmith/src/StatementAssign.h:37:
In file included from /Users/collberg/tmp/csmith/src/Statement.h:46:
In file included from /Users/collberg/tmp/csmith/src/Probabilities.h:37:
/Users/collberg/tmp/csmith/src/Filter.h:60:14: error: integer value 2 is outside the valid range of values [0, 1] for the enumeration type 'FilterKind' [-Wenum-constexpr-conversion]
   60 |         std::bitset<MAX_FILTER_KIND_SIZE> kinds_;
      |                     ^
/Users/collberg/tmp/csmith/src/Filter.h:40:31: note: expanded from macro 'MAX_FILTER_KIND_SIZE'
   40 | #define MAX_FILTER_KIND_SIZE ((FilterKind) (fDFS + 1))
      |                               ^
1 error generated.

> uname -a
Darwin CC-mac-24.local 24.4.0 Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:47 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6030 arm64
> clang --version
Apple clang version 17.0.0 (clang-1700.0.13.5)
Target: arm64-apple-darwin24.4.0
Thread model: posix
> git log | head -1
commit 0ec6f1bad2df865beadf13c6e97ec6505887b0a5

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions