NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/58300: LLVM Release & Tools Build Fails on Darwin with clang-15
>Number: 58300
>Category: toolchain
>Synopsis: LLVM Release & Tools Build Fails on Darwin with clang-15
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 29 11:00:01 +0000 2024
>Originator: Sotiris Lamprinidis
>Release: 10.0
>Organization:
>Environment:
Darwin [REDACTED] 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64
>Description:
Building the LLVM toolchain or release from a recent Darwin OS fails (clang-1500.3.9.4, arm64-apple-darwin23.5.0)
Error message:
While building module 'LLVM_Utils' imported from /Users/sl/netbsd-src/tools/llvm-lib/libLLVMSupport/../../llvm/../../external/apache2/llvm/lib/../dist/llvm/lib/Support/AArch64TargetParser.cpp:14:
In file included from <module-includes>:126:
/Users/sl/netbsd-src/tools/llvm-lib/libLLVMSupport/../../llvm/../../external/apache2/llvm/lib/../dist/llvm/include/llvm/Support/Chrono.h:79:30: error: missing '#include <ratio>'; 'ratio' must be declared before it is used
template <> struct unit<std::ratio<3600>> { static const char value[]; };
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ratio:254:28: note: declaration here is not visible
class _LIBCPP_TEMPLATE_VIS ratio
>How-To-Repeat:
On a Darwin system, /usr/src/build.sh -cclang tools
>Fix:
Explicitly include ratio.h in llvm/Support/Chrono.h:
diff -urNw a/external/apache2/llvm/dist/llvm/include/llvm/Support/Chrono.h b/external/apache2/llvm/dist/llvm/include/llvm/Support/Chrono.h
--- a/external/apache2/llvm/dist/llvm/include/llvm/Support/Chrono.h 2021-05-30 03:26:36.000000000 +0200
+++ b/external/apache2/llvm/dist/llvm/include/llvm/Support/Chrono.h 2024-05-27 15:34:19.778838218 +0200
@@ -14,6 +14,7 @@
#include <chrono>
#include <ctime>
+#include <ratio>
namespace llvm {
Home |
Main Index |
Thread Index |
Old Index