bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master


From: Andrew J. Schorr
Subject: Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches
Date: Thu, 8 Feb 2018 16:35:33 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Feb 08, 2018 at 10:17:57PM +0100, Hermann Peifer wrote:
> I simply added --with-mpfr=/opt/local to toplevel ./configure. This
> solved the issue. If I don't do this, then I end up with "fatal error:
> 'mpfr.h' file not found", but only for the extensions, not for gawk itself.
> 
> See below. Hermann
> 
> === snippet from config.log ===
> configure:10558: checking whether mpfr via "-lmpfr -lgmp" is present and
> usable
> configure:10585: gcc -o conftest -g -O2 -DNDEBUG -I/opt/local/include
> -L/opt/local/lib conftest.c  -lmpfr -lgmp >&5
> configure:10585: $? = 0
> configure:10593: result: yes
> ...
> 
> === snippet from extension/config.log ===
> configure:12855: checking whether mpfr via "-lmpfr -lgmp" is present and
> usable
> configure:12882: gcc -o conftest -g -O2 -Wall  -L/opt/local/lib
> conftest.c  -lmpfr -lgmp >&5
> conftest.c:40:10: fatal error: 'mpfr.h' file not found
> #include <mpfr.h>
>          ^~~~~~~~
> 1 error generated.

Harumph. I don't know why the top-level adds -I/opt/local/include by default,
but the extension configure does not. I guess the question is how hard to
pursue this. Maybe we should just let it be.

Perhaps we should add a simple mpfrintdiv test to make sure that mpfr
is working properly in the intdiv extension. Maybe that's the right solution,
since mpfrsqrt is sufficiently complicated to obfuscate the problem...

Possible test case attached:

bash-4.2$ AWKLIBPATH=extension/.libs ./gawk -M -f test/mpfrintdiv.awk 
100000000000000000000000000000000000000000000000000000000044

bash-4.2$ AWKLIBPATH=extension/.libs ./gawk -f test/mpfrintdiv.awk 
99999999999999997168788049560464200849936328366177157906432
Please check your build; it looks like intdiv was not compiled with MPFR enabled

Regards,
Andy

Attachment: mpfrintdiv.awk
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]