← Back to team overview

kicad-developers team mailing list archive

Re: MacOS build issue with new geometry tests

 

Hi John,

Thanks for the patch. I have had the same problem compiling KiCad with
clang and I confirm that the proposed fix solves the problem, so I
merged it.

Cheers,
Orson

On 07/29/2018 05:34 PM, John Beard wrote:
> Hi Adam,
> 
> Sorry, this in my stuff - I though that was a way to get PI without
> having to guess the setting of _USE_MATH_DEFINES or do #ifdefs like at
> the top of dl_codes.h, but obviously not.
> 
> The attached patch might work, but I can't test on a Mac, so all I can
> say is "it builds for me and the tests pass". Specifically,
> _USE_MATH_DEFINES may need to be set for qa_geometry if not already.
> 
> Cheers,
> 
> John
> 
> 
> On Sun, Jul 29, 2018 at 1:38 PM, Adam Wolf
> <adamwolf@xxxxxxxxxxxxxxxxxxxx> wrote:
>> Hi folks!
>>
>> There's a build failure on the new geometry test stuff with MacOS.
>>
>> qa/geometry/geom_test_utils.h:33:18: error: constexpr variable 'PI'
>> must be initialized by a constant expression
>> constexpr double PI = atan(1.0) * 4.0;
>> ^ ~~~~~~~~~~~~~~~
>> qa/geometry/geom_test_utils.h:33:23: note: non-constexpr function
>> 'atan' cannot be used in a constant expression
>> constexpr double PI = atan(1.0) * 4.0;
>>
>> There are a few others, all which look about the same.  I am on my way
>> out of town today so I don't have time to look for a solution, but a
>> user actually reported it to me due to using the new MacOS build
>> scripts! :D
>>
>> Adam Wolf
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp


Attachment: signature.asc
Description: OpenPGP digital signature


References