Why does llvm depend on python 2.7?

Chris Jones jonesc at hep.phy.cam.ac.uk
Wed Feb 5 14:40:44 UTC 2020


Hi,

Just to try and be clear. The current inconsistency in the port files is 
the fact the clang-X builds are configured to *always* depend on python27

<https://github.com/macports/macports-ports/blob/master/lang/llvm-9.0/Portfile#L54>

whereas the clang-X builds is only figured to use this python version 
for darwin < 11

<https://github.com/macports/macports-ports/blob/master/lang/llvm-9.0/Portfile#L367>

what needs to change is for the port dependency to only be applied when 
it is actually needed (i.e. used by the build)

Whether that is only for darwin < 11, as seems to be the current 
intention, or for all OSes, is really a separate question.

Chris

On 05/02/2020 2:33 pm, Chris Jones wrote:
> Hi,
> 
> On 05/02/2020 2:18 pm, Ken Cunningham wrote:
>> doing that doesn't really take us in the right directiion, though chris.
>>
>> reproducible builds and all that.
>>
>> we go from a fully spec'd proper python 
> 
> Actually no. That is not what happens at the moment. Check the clang-9.0 
> config on darwin 11+ for yourself. The macports python version is 
> currently *not* used at all. The lines
> 
>         configure.args-append \
>              -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python${py_ver}
> 
> which configure the clang-X build to use the macports python (2.7) are 
> *only* used on darwin < 11. On everything else the defaults are used, 
> which means the cmake build finds and uses /usr/bin/python.
> 
> to a randomly-found one, in a setting where afaik python 3 is known not 
> to work.
> 
> We are already, for the clang-X builds (note I am specifically *not* 
> talking about llvm-X or lldb-X here) relying on whatever the build 
> systems decides to used based on its default configuration, for darwin 
>  >= 11.
> 
> Now, if you want to *always* spec. the clang-X builds to use *always* 
> use macports provided python 2.7, that is indeed an option. But that 
> also requires some fixes in the port file w.r.t. what is currently done. 
> i.e. remove the darwin  < 11 check at
> 
> <https://github.com/macports/macports-ports/blob/master/lang/llvm-9.0/Portfile#L367> 
> 
> 
> so the configuration above is applied to *all* OSes, not just darwin < 11.
> 
>>
>> and I am not sure at present how to even test all the lldb etc 
>> integration they mention.
> 
> the changes I am proposing do not touch the lldb-X builds. They already 
> fully spec. the builds to use macports python, on all OSes.
> 
> <https://github.com/macports/macports-ports/blob/master/lang/llvm-9.0/Portfile#L317> 
> 
> 
> Chris
> 
>>
>> stripping the python spec is trivial, I could do it in 5 minutes, but 
>> it doesn't sound like what we should do here...
>>
>> ?
>>
>> K
>>


More information about the macports-users mailing list