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
pkg-config
does not update MacOS SDK paths after major macOS upgrades
#16137
Comments
pkg-config
will uses MacOSX11.sdk
aka /opt/homebrew/Library/Homebrew/os/mac/pkgconfig/11
pkg-config
will uses MacOSX11.sdk
aka /opt/homebrew/Library/Homebrew/os/mac/pkgconfig/11
Were you previously running macOS 11? Currently you need to |
@Bo98 Yes, it fixed the problem, thank you very much :)
I forget. I got my machine around 2021 Sept, it might be, but I upgraded every versions in between. However this is so frustrating. The process of deep diving into pkg-config to find a workaround is so long :( Should this be closed? Or i just change the title. |
pkg-config
will uses MacOSX11.sdk
aka /opt/homebrew/Library/Homebrew/os/mac/pkgconfig/11
pkg-config
does not update MacOS SDK paths after major macOS upgrades
I tried to fix the handling of this a while back, but ran out of steam. I could try looking at it again, though I'm happy for someone else to take a stab at it. We can keep this issue open for now. |
I'm interested in having a stab at this, but I'm not sure what the best path would be to fix it. The search path for I would propose that we instead include something like Then the question would be at what point to update the symlink to point at the current version of
Or maybe there's a better way than this symlink approach, but for most other ideas I can think of, I still see the same issue of user needing to manually run a command (maybe |
Alternative, which could apply to non-pkg-config cases like GCC and Clang's |
This was essentially the approach I took in #13664. Fine with doing this, but I remember there being concerns about when that symlink would be updated. |
This is the approach I'd like to see: a new DSL that forces an upgrade or reinstall in the case mentioned here. |
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
Trying to use
pkg-config
viacmake
to findpango
which depends onlibffi
from macOS SDK, but failed because pkg-config will provides invalid path pointing to older macOS SDKMinimum CMakeLists.txt to reproduce the problem:
Will gives
What happened (include all command output)?
The pkg-config tries to uses
libffi.pc
from macOS 11 while i am using the current Xcode and macOS 14.The pkg-config will give cmake a none-exists path because this line got included:
https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/pkgconfig/11/libffi.pc#L1
instead of
https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/pkgconfig/14/libffi.pc#L1
The pkg-config's path falsely includes
/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/11
What did you expect to happen?
I think pkg-config's search path should be
/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/14
instead of/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/11
on newest macOS & XCode.Step-by-step reproduction instructions (by running
brew
commands)The path outputted should includes
/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/14
instead of/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/11
For extra info, my XCode 15 installtion includes those things, the 11 got removed recently? i don't know.
The text was updated successfully, but these errors were encountered: