CPATH versus -I

Joshua Root jmr at macports.org
Fri Jun 18 09:26:00 PDT 2010


On 2010-6-19 01:30 , Michael Dickens wrote:
> Thanks for the replies.  So, if I understand correctly, the header
> search path ordering should be:
> 
> -I, build-in-to-compiler, CPATH, -isystem, C_INCLUDE_PATH
> 
> It seems like for most ports, then, that all extra search paths should
> be included in the CPATH, with no external paths coming from -I in order
> to give priority to internally-to-this-port-used -I paths.  Given the
> above, I think ticket #25321 is a high priority to get fixed (and have
> modified it to reflect my belief). - MLD

This is a risky change, which is why compiler.cpath and
compiler.library_path have only been in trunk until the 1.9.0 release.
Adding them doesn't seem to have broken much, but now we have to find
out whether removing -I${prefix}/include from the default
configure.cppflags and -L${prefix}/lib from configure.ldflags is as benign.

Individual ports can use *-delete to do this right now if they need to.
That will certainly benefit a number of ports that like to compile/link
against the previously installed version of themselves, like cyrus-sasl2.

- Josh


More information about the macports-dev mailing list