mercurial fails to build when

Ryan Schmidt ryandesign at macports.org
Wed Sep 13 18:25:09 UTC 2017


On Sep 13, 2017, at 13:14, Sean Farley wrote:

> Ryan Schmidt writes:
> 
>> On Sep 12, 2017, at 19:36, Glenn Ramsey wrote:
>>> 
>>> On OSX 10.12.6 with the latest Xcode I have set macosx_deployment_target to 10.8
>>> in macports.conf and when installing mercurial I get this error:
>>> 
>>> error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.8" but "10.12" during configure
>>> 
>>> Is this a bug or can I only install mercurial if macosx_deployment_target
>>> matches the SDK version? If it is a bug, what is the workaround?
>> 
>> I would guess there are a fair number of ports that fail to build when macosx_deployment_target is changed, or that build successfully but ignore the requested macosx_deployment_target, because this is an esoteric feature that few people test. Looks like mercurial is one of those ports. 
>> 
>> Sure, it can be considered a bug in that port; you could file a bug report in our issue tracker. Each port's build system is different so I can't give you a one-size-fits-all solution. In some cases, the reason may be that the port's build system specifies its own value for that environment variable (or the equivalent compiler flag). If so, the solution might be to remove that code from the build system. 
> 
> I can't see anything obvious in the portfile. Maybe something in the
> python port group? Or perhaps the canonical_archflags?

This error (error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.8" but "10.12" during configure) appears to come from distutils, which is a part of python. I found this bug report, which is apparently the origin of this error message: https://bugs.python.org/issue9516 . So mercurial is experiencing the problem because its build system uses python.

Since the mercurial port uses the python portgroup, it has no configure phase, so the reference to "during configure" in the error message must refer to the configure phase of the python27 port? I'm not really sure why python is concerned about this.



More information about the macports-users mailing list