Building with a dependency that uses system libraries no longer works

Opening this here since this is likely an Xcode/SwiftPM bug. When building a library or application that has a dependency on a system package, you'll get compilation errors due to redefinition of modules. This was first reported in this forum post. From what I can work out, it's this PR in Homebrew that now adds the extra path and this PR that adds it to pkg-cnofig which adds the path to other C flags, which causes the compilation errors.

Is this a Homebrew bug or SwiftPM bug?

2 Likes

Raised on Brew's GitHub - https://github.com/Homebrew/brew/issues/5068#issuecomment-612011788

Update, there's a fix coming in Homebrew pkg-config: correct default system include path by Bo98 · Pull Request #52820 · Homebrew/homebrew-core · GitHub