Include file clobbering / Reinplace strange behavior

Clemens Lang cal at macports.org
Sat Oct 4 08:36:55 PDT 2014


Hi,

----- On 4 Oct, 2014, at 16:25, Joshua Root jmr at macports.org wrote:

>> I’m writing an updating port for the new version of gis/gdal.
>> 
>> However, the port does not compile because a .h file installed by the old
>> version into ${prefix}/include masks a new version of the same .h bundled with
>> the newest source.
>> 
>> So question 1: is there a standard workaround to address this problem?
> 
> You can often use -isystem instead of -I.

Other workarounds to avoid the same problem are:
 (1) using the deactivate hack for the old version
 (2) using the conflicts-build portgroup (even though that will only print a message)
 (3) building in trace mode

Of course the canonical "best" solution would be upstream changing their
project in a way that makes all local -I directives appear before those
from $CPPFLAGS in the environment.

-- 
Clemens Lang


More information about the macports-dev mailing list