b63s wrote:
1: apologies, it’s not building actual tree-sitter it’s the language libraries (grammars)
Ah, OK. I looked for how to do that and apparently one has to download some unsigned binary in a gzip. I'll pass. 😄
2: for context, yes, I do run homebrew, however not for this
If you've installed Homebrew, then you use it for everything. You can't opt in or out for certain projects.
Well, in theory I guess you could. But what's the point of using Homebew if you know how to manually configure the environment at that level?
3: it is not related to homebrew, as this a silicon chip, homebrew doesn’t touch /usr/local
Ah, interesting. See https://mac.install.guide/homebrew/index.html
For clarification, Homebrew wasn't criticized for using /usr/local. They were criticized for making permission changes to /usr/local/ that significantly reduced security. But that's a general consensus. I criticize them for different reasons.
Using /opt/homebrew/ is an objectively better path. However, that means that all of the many thousands of open-source projects that were hacked-up and hard-coded for Homebrew in /usr/local/ will now need to be re-hacked.
4: these are header files included from CommandLine Tools which is the toolchain from xcode, so it is in fact apple product line.
why they would be placed in /usr/local beats me though, POSIX standard should be any third party goes in /usr/local - I have no additional tooling deliberately placed there.
By default, /usr/local is empty. If you have files there, someone put them there. I'm guessing it was Homebrew, at one point or another, regardless of what it claims to be doing now.
I am on the run at the moment so on my phone.
when I get home, I’ll post a snippet of some of the headers to show Apple ownership.
I’ll also verify
xcrun --sdk macosx --show-sdk-path
which should point to xcode and not /usr/local
just to be safe, I’ll also verify clang and which compiler is used.
To clarify, are you using Xcode or the Command line tools? And which versions? And which OS versions?
But to re-iterate again, these kinds of problems are always caused by Homebrew.
xcrun --sdk macosx --show-sdk-path
will show the path to the SDK, not the include locations. clang -v will show the include paths. I think /usr/local/include is included, but would have no effect being empty.