[MacPorts] #73393: pkgconf always reports incorrect cflags for gnutls
MacPorts
noreply at macports.org
Wed Jan 14 18:49:54 UTC 2026
#73393: pkgconf always reports incorrect cflags for gnutls
--------------------------+--------------------
Reporter: OpenSauce04 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.11.6
Resolution: | Keywords:
Port: pkgconf |
--------------------------+--------------------
Comment (by kaniini):
No, it is a defect in the way pkgconf is built in MacPorts.
Most likely /opt/local/include is being treated as a system include path
because the default system include path calculated by pkgconf's configure
script is `${prefix}/include` (and the default system library path is
`${prefix}/lib`).
The fix for this is to set the paths to match the actual behavior of the
toolchain. This is important because pkgconf needs to strip redundant
paths that are included by the toolchain already to ensure the search path
is correct for overlay libraries like libbsd.
Original pkg-config does not filter out system include and library paths
correctly, which is why it works there.
MacPorts needs to use `--with-system-libdir` and `--with-system-
includedir` to align the defaults with the toolchain's search paths.
`clang -print-search-dirs` and `clang -E -v -xc -` can be used to find the
library and include search paths respectively.
--
Ticket URL: <https://trac.macports.org/ticket/73393#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list