Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Set CMAKE_CXX_STANDARD to 17 in the root CMakeLists.txt
  • Fixes compilation on macOS with modern Xcode/AppleClang versions

Problem

Modern Apple SDK headers (macOS 26+, Xcode 17+) use elaborated enum base declarations that require C++17:

error: non-defining declaration of enumeration with a fixed underlying type
       is only permitted as a standalone declaration

Solution

The ggml submodule defaults to C++11 which doesn't support this syntax. Setting C++17 at the BitNet project level propagates to submodules and fixes the issue.

This has been confirmed working by @RobBW in issue #350 comments.

Fixes #350

Modern Apple SDK headers (macOS 26+, Xcode 17+) require elaborated enum
base declarations which are not supported in C++11. This causes
compilation failures with errors like:
  "non-defining declaration of enumeration with a fixed underlying type
   is only permitted as a standalone declaration"

Setting CMAKE_CXX_STANDARD to 17 resolves this issue while maintaining
backward compatibility with other platforms.

Fixes microsoft#350

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error while running setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s

1 participant