Opened 16 years ago

Closed 15 years ago

#2420 closed defect (fixed)

PKG_CONFIG_PATH should be set when building ports that use pkg-config

Reported by: n8gray@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.0
Keywords: Cc: pguyot (Paul Guyot)


Most systems have packages installed from many sources (e.g. fink, system, user-installed, etc). In order to isolate the DP build pkg-config needs to be told to look at the DP versions of .pc files by setting


during the build. I had to do this by hand to build the gtk2 port because pkg-config kept finding a copy of glib that was distributed with the Mono framework.

Change History (4)

comment:1 Changed 16 years ago by pguyot (Paul Guyot)

I would rather simply unset PKG_CONFIG_PATH variable. You normally don't need it. Instead, you need the path to favor DarwinPort's pkg-config binary (which it currently does unless you altered binpath option in ports.conf).

This could be achieved by adding to darwinports.tcl (just after set env(PATH)) catch {unset env(PKG_CONFIG_PATH)}


comment:2 Changed 15 years ago by snu@…

op_sys: All

comment:3 Changed 15 years ago by jberry@…

Cc: pguyot@… added


Can we close this bug now that we're unsetting most env variables?

comment:4 Changed 15 years ago by blb@…

Resolution: fixed
Status: newclosed

(In reply to comment #2)


Can we close this bug now that we're unsetting most env variables?

I think so; reopen if this is still an issue.

Note: See TracTickets for help on using tickets.