-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build error on macOS arm64 (native_persistent_string.hpp:199:15: error: destructor cannot be declared constexpr
...)
#119
Comments
destructor cannot be declared constexpr
...)
destructor cannot be declared constexpr
...)destructor cannot be declared constexpr
...)
Hey! Not sure what's up. The error looks like a C++ standard version difference, or an out of date compiler, since the constexpr stuff definitely works. However, the log for the command looks right and CMake says clang/llvm 19.0.0. I suspect this may have to do with your local xcode developer tool version, if you wanted to dig deeper. If not, hang tight for binary releases in the coming weeks. 🙂 |
@jeaye I will do some more research to see if I change the settings myself or change the version of the original compiler. |
I tried upgrading my And I'm also sure $ echo $CC
/Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local/bin/clang
$ echo $CXX
/Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local/bin/clang++
$ $CC --version
clang version 19.0.0git (https://github.com/jank-lang/llvm-project.git 60f04db1bc58fde5de5bc0c66a2361e83fbffdf2)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local/bin
$ $CXX --version
clang version 19.0.0git (https://github.com/jank-lang/llvm-project.git 60f04db1bc58fde5de5bc0c66a2361e83fbffdf2)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local/bin This is log of configure ( -- Running vcpkg install - done
-- The C compiler identification is Clang 19.0.0
-- The CXX compiler identification is Clang 19.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local/bin/clang - 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: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /opt/homebrew/bin/git (found version "2.47.0")
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Found LibEdit: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include (found version "2.11")
-- Found ZLIB: /Users/fu/lab/jank/compiler+runtime/build/vcpkg_installed/x64-clang-static/lib/libz.a (found version "1.3.1")
-- Found LibXml2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/libxml2.tbd (found version "2.9.13")
-- Found supported version: LLVM 19.0.0git
-- Using LLVMConfig.cmake in: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local
-- Clang install prefix: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local
-- Found supported version: Clang 19.0.0git
-- Using ClangConfig.cmake in: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local
-- Linker detection: Apple
-- Performing Test LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS
-- Performing Test LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS - Success
-- Performing Test LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES
-- Performing Test LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES - Success
-- Performing Test LLVM_LIBSTDCXX_MIN
-- Performing Test LLVM_LIBSTDCXX_MIN - Success
-- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR
-- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Failed
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Failed
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
-- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success
-- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
-- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Failed
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - found
-- Performing Test macos_signposts_usable
-- Performing Test macos_signposts_usable - Success
-- CLANG_INCLUDE_DIRS: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local/include
-- LLVM_INCLUDE_DIRS: /Users/fu/lab/jank/compiler+runtime/build/llvm-install/usr/local/include
-- LLVM_DEFINITIONS_LIST: -D__STDC_CONSTANT_MACROS;-D__STDC_FORMAT_MACROS;-D__STDC_LIMIT_MACROS
CMake Warning (dev) at build/vcpkg_installed/x64-clang-static/share/boost/vcpkg-cmake-wrapper.cmake:3 (_find_package):
Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake
--help-policy CMP0167" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
Call Stack (most recent call first):
third-party/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
CMakeLists.txt:232 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Boost: /Users/fu/lab/jank/compiler+runtime/build/vcpkg_installed/x64-clang-static/share/boost/BoostConfig.cmake (found version "1.85.0") found components: filesystem preprocessor
-- Configuring done (8.0s)
-- Generating done (0.5s)
-- Build files have been written to: /Users/fu/lab/jank/compiler+runtime/build |
Incidentally, when I replaced (The fact that the error about constexpr disappeared is not irrelevant. but not surprising.)
|
I was using Xcode 16.0, and now I'm trying update it. |
For information, my $ export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
$ echo $SDKROOT
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk |
I upgraded Xcode to 16.1 (and naturally upgraded macOS SDK to 15.1), but nothing changed. $ xcodebuild -version
Xcode 16.1
Build version 16B40
$ echo $SDKROOT
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk And I think in most case it is not so easy to upgrade Xcode always latest, so I'd like to know (or find) proper clang (cmake) configuration, or creating batch for code in this case. |
By checking this stackoverflow comment, some C++20 feature may not be enabled here (in my environment). (This is the comment of stackoverflow, may not directly relevant.)
|
I tried build on macOS and it failed. (macOS sonoma 14.7, arm64, M1 Mac)
This is log after
./bin/compile
on branch current main 72836c5.(I folllowed build.md for build process.)
Any helps are welcome.
and, this is clang version info. (used to build clang and cling)
The text was updated successfully, but these errors were encountered: