[macports-ports] branch master updated: py-protobuf3: fix build on older systems

Ken Cunningham ken.cunningham.webuse at gmail.com
Fri May 25 16:04:43 UTC 2018


On 2018-05-25, at 8:38 AM, Ryan Schmidt wrote:

> 
> On May 24, 2018, at 23:15, Ken wrote:
> 
> 
> If this is supposed to help 10.6...
> 
> 
>> +@@ -197,6 +197,8 @@
>> +       v = float('.'.join(v.split('.')[:2]))
>> +       if v >= 10.12:
>> +         extra_compile_args.append('-std=c++11')
>> ++        extra_compile_args.append('@@MACPORTS_STDLIB@@')
>> ++        extra_compile_args.append('@@MACPORTS_EXTRAARG@@')
> 
> ...why is it inside an if statement that's for 10.12 and later?


Yeah, their logic for the test must be busted.  My guess is that testing for 10.12 passes everything 10.1 and above, but I defer to someone who can read python. Can you fix that v.float () business for them?



> 
> I guess it works because the if statement is erroneously treating the version number as a floating point number, in which case 10.6 is considered to be greater than 10.12.
> 
> So the question is: does this code always require C++11?

Probably. protobuf3-cpp seems to, and this port errors otherwise with the errors noted in the ticket.



> If so, remove the if statement.
> 
> If it does not always require C++11, fix the if statement so that it correctly uses C++11 only on 10.12 and later.
> 
> 

I don't grok python very deeply, I"m afraid.

What I did fixes it for us -- but I agree there is something busted in that build.

I can revert the fixes if you like.



Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20180525/babe3c71/attachment.html>


More information about the macports-dev mailing list