NetBSD Problem Report #58300
From www@netbsd.org Wed May 29 10:57:14 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id A43E91A923A
for <gnats-bugs@gnats.NetBSD.org>; Wed, 29 May 2024 10:57:14 +0000 (UTC)
Message-Id: <20240529105713.0E5901A923C@mollari.NetBSD.org>
Date: Wed, 29 May 2024 10:57:13 +0000 (UTC)
From: sotiris@lamprinidis.com
Reply-To: sotiris@lamprinidis.com
To: gnats-bugs@NetBSD.org
Subject: LLVM Release & Tools Build Fails on Darwin with clang-15
X-Send-Pr-Version: www-1.0
>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: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 29 11:00:01 +0000 2024
>Closed-Date: Wed May 29 11:15:40 +0000 2024
>Last-Modified: Wed May 29 11:15:40 +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 {
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: hgutch@NetBSD.org
State-Changed-When: Wed, 29 May 2024 11:15:40 +0000
State-Changed-Why:
Duplicate of PR 57982
Still need to figure out a good way to make the equivalent change
outside of external/apache2/llvm/dist
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.