Conversation
|
|
Looks like the issue has already been reported upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=31320 From personal testing, the following path was enough to get it to build on my personal machine (Sonoma, arm64): diff --git a/gold/output.cc b/gold/output.cc
index ead67f20363..98b2f25c18b 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -29,7 +29,9 @@
#include <unistd.h>
#include <sys/stat.h>
#include <algorithm>
+#ifndef __APPLE__
#include <uchar.h>
+#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
diff --git a/gold/stringpool.cc b/gold/stringpool.cc
index d8f38cfabc1..e04909edad1 100644
--- a/gold/stringpool.cc
+++ b/gold/stringpool.cc
@@ -25,7 +25,9 @@
#include <cstring>
#include <algorithm>
#include <vector>
+#ifndef __APPLE__
#include <uchar.h>
+#endif
#include "output.h"
#include "parameters.h"Using this suggestion from the thread did not work for me: |
|
Rerunning to see which SDKs have the header and which don't. |
Signed-off-by: Rui Chen <rui@chenrui.dev>
|
I've made some tests in #165082 and I'm not sure there is a way for macOS 12. Newer binutils require C++11 with uchar.h available, and macOS 12 doesn't seem to have that. |
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Rui Chen <rui@chenrui.dev>
|
Upstream effectively decided to raise their requirements and excluded Monterey and earlier. Not sure why it only manifests for some targets. |
iMichka
left a comment
There was a problem hiding this comment.
Would this break some reverse deps on Monterey? I see a few formula that would still need it on macOS
|
🤖 An automated task has requested bottles to be published to this PR. |
|
Whoops I approved to fast, I wanted to discuss the Monterey situation first, sorry. I canceled the upload job. |
Neither |
|
Unlike C, |
|
For example, see:
It would be needed on GCC 4.1 which supports C99 but not C++11, but since GCC 4.1 doesn't accept So the correct patch for me is to remove those includes, given they are not compatible with libc++ prior to 2022 (15.0): llvm/llvm-project@311ff39 and https://sourceware.org/bugzilla/show_bug.cgi?id=30867 shows they are willing to support GCC from 2013. I imagine this issue also affects some of the BSDs too. |
|
As stated above in response to:
Neither Maybe upstream will accept a patch to improve the situation, but right now they effectively decided to require it, so I think we should just follow that. |
|
🤖 An automated task has requested bottles to be published to this PR. |
|
|
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting?brew test <formula>, where<formula>is the name of the formula you're submitting?brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?