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: arnold
Subject: Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches
Date: Thu, 08 Feb 2018 07:42:27 -0700
User-agent: Heirloom mailx 12.4 7/29/08

Hi Andy.

The problem with your patch is that I think it will break Cygwin.
I will check.

Thanks,

Arnold

> My current hope is that it's a dynamic linking issue. I don't think the
> intdiv extension needs to link in mpfr and libm, since main gawk has already
> linked these in. I just sent a patch to Hermann to explore this possibility.
>
> diff --git a/extension/Makefile.am b/extension/Makefile.am
> index df55b98..b590a5b 100644
> --- a/extension/Makefile.am
> +++ b/extension/Makefile.am
> @@ -77,7 +77,7 @@ inplace_la_LIBADD     = $(MY_LIBS)
>  # Solaris in addition wants the math library.
>  intdiv_la_SOURCES     = intdiv.c
>  intdiv_la_LDFLAGS     = $(MY_MODULE_FLAGS)
> -intdiv_la_LIBADD      = $(MY_LIBS) $(LIBMPFR) -lm
> +intdiv_la_LIBADD      = $(MY_LIBS)
>  
>  ordchr_la_SOURCES     = ordchr.c
>  ordchr_la_LDFLAGS     = $(MY_MODULE_FLAGS)
>
> On my CentOS 7.4 system, this patch works OK. Before the patch:
> bash-4.2$ ldd extension/.libs/intdiv.so
>         linux-vdso.so.1 =>  (0x00007fffdd9e8000)
>         libmpfr.so.4 => /lib64/libmpfr.so.4 (0x00007f9f07ca4000)
>         libgmp.so.10 => /lib64/libgmp.so.10 (0x00007f9f07a2c000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007f9f07729000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007f9f07366000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000560603fa6000)
>
> And after:
>
> bash-4.2$ ldd extension/.libs/intdiv.so
>         linux-vdso.so.1 =>  (0x00007ffc82ffc000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007ff18441b000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007ff184058000)
>         /lib64/ld-linux-x86-64.so.2 (0x000055c4fd853000)
>
> Let's see about MacOS.
>
> -Andy



reply via email to

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