[MacPorts] #55577: getting rid of unforeseen -I${prefix}/include option adding and its potential side-effects
MacPorts
noreply at macports.org
Sat Dec 23 14:28:51 UTC 2017
#55577: getting rid of unforeseen -I${prefix}/include option adding and its
potential side-effects
--------------------------+-----------------
Reporter: RJVB | Owner:
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: pcre, glib2 |
--------------------------+-----------------
Comment (by RJVB):
Replying to [comment:1 ryandesign]:
> Sounds like a bug in that project. It should place the appropriate `-I`
flags for including its own headers ''before'' the `-I` flags from pkg-
config and elsewhere that include the system headers.
That's what I thought first too, but after checking with them (Qt) it
turned out the issue was in my build environment. Even if -I options work
that way it's not very reliable because when projects get more complex you
do not always keep full control over the order in which you're assembling
them, nor over which replies from pkg-config contain -I flags that should
go all at the end. (FWIW, the conflict arose deep in the QtWebEngine build
tree.)
That's also why we have such problems avoiding interference from
/usr/local/include.
> Switching MacPorts base to using `-isystem` instead of `-I` would be
another possible solution to this problem which is proposed in #40656.
base is not to blame here (beyond possibly the fact it sets CPATH).
> > This change will be reflected in the pcre/pcre2 pkg-config files.
>
> This has the potential to break ports that use pcre/pcre2. Probably not
all of them use pkg-config.
That would be a bug in those ports, easily fixable (if they don't use pkg-
config they already must be told where to find the header directory). And
easy to check for in MacPorts (revbump all dependents).
> I'm tentatively ok with changing glib2/glib2-devel back to using pkg-
config.
I haven't tried and so cannot guarantee that this will indeed be
sufficient to take glib2 out of the equation here. All I know is that
`pkg-config --cflags glib-2.0` includes the result for `pkg-config
--cflags pcre`.
I didn't get around to attaching the glib2 patch, will do so now.
--
Ticket URL: <https://trac.macports.org/ticket/55577#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list