Re: Outdated libtool creates trouble on macOS

2023-07-30 Thread Marc Glisse

On Sun, 30 Jul 2023, FX Coudert wrote:


Attached is a diff that fixes most of the warnings. It does three things:

- raise autoconf requirement to 2.69 (released in 2012, and what you already 
use currently for production of the tarballs)
- replaces AC_FD_CC with AS_MESSAGE_LOG_FD, its new name
- replaces AC_HELP_STRING with AS_HELP_STRING, its new name


I checked, there is no change in the generated files, so I pushed it.


I’ll try to have a look: it would be good to contribute those changes early, so 
there is ample testing before a future release, as you said.


Yes. But probably not this week for me, my holidays are just starting :-)

--
Marc Glisse
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Outdated libtool creates trouble on macOS

2023-07-30 Thread Torbjörn Granlund
FX Coudert  writes:

  PS: second patchlet, to deal with these two macros:

  > warning: The macro `AC_HEADER_STDC' is obsolete.
  > warning: The macro `AC_HEADER_TIME' is obsolete.

If you, Marc, can take a look at those proposed changes, I think they
should be applied to the head gmp repo, not the gmp-6.3 one.

Currently and for another week, the nightly builds whack gmp-6.3, then
we will switch to the head repo.  That will then be a broad test of any
configure changes.

(After that, we can consider merging the changes to gmp-6.3 for inclusion
in a 6.3.1.)

-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Outdated libtool creates trouble on macOS

2023-07-30 Thread Torbjörn Granlund
FX Coudert  writes:

  One other question: our Linux builder, which is running from Github Actions, 
fails to download from gmplib.org
  I thought only the mercurial repo was firewalled, is that not the case?

Github is firewalled off in its entirety.  The firewall cannot inspect
packets to make more fine-grained decisions.  Encryption prevents that.

I have no grudge against github, but also don't have time for people or
organisations who create interruptions.  Implementing some access
restrictions in the web server (i.e., not in the firewall) is not worth
the added complexity.

(There is not company or organisations behind GMP.  I fund the
infrastructure from my salary, and I and three other volunteers keep
developing it.)


-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Outdated libtool creates trouble on macOS

2023-07-30 Thread FX Coudert
PS: second patchlet, to deal with these two macros:

> warning: The macro `AC_HEADER_STDC' is obsolete.
> warning: The macro `AC_HEADER_TIME' is obsolete.




time.diff
Description: Binary data
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Outdated libtool creates trouble on macOS

2023-07-30 Thread FX Coudert
> First, a large number of warnings can be a bit scary.

Attached is a diff that fixes most of the warnings. It does three things:

- raise autoconf requirement to 2.69 (released in 2012, and what you already 
use currently for production of the tarballs)
- replaces AC_FD_CC with AS_MESSAGE_LOG_FD, its new name
- replaces AC_HELP_STRING with AS_HELP_STRING, its new name

Once this is done, the number of warnings becomes reasonable:

> glibtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
> glibtoolize: and rerunning glibtoolize and aclocal.
> glibtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
> 
> warning: back quotes and double quotes must not be escaped in: 
> $as_me:${as_lineno-$LINENO}: WARNING: the \"none\" host is obsolete, use 
> --disable-assembly
> warning: back quotes and double quotes must not be escaped in: $as_me: 
> WARNING: the \"none\" host is obsolete, use --disable-assembly
> warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to 
> _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first 
> parameter.
> warning: AC_OUTPUT should be used without arguments.
> warning: AC_PROG_LEX without either yywrap or noyywrap is obsolete
> warning: The macro `AC_CHECK_LIBM' is obsolete.
> warning: The macro `AC_HEADER_STDC' is obsolete.
> warning: The macro `AC_HEADER_TIME' is obsolete.
> warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
> warning: The macro `AC_PROG_CC_C99' is obsolete.
> warning: The macro `AC_PROG_LIBTOOL' is obsolete.
> warning: The macro `AC_PROG_NM' is obsolete.
> warning: The macro `AC_TRY_COMPILE' is obsolete.
> warning: The macro `AC_TRY_LINK' is obsolete.
> warning: The macro `AC_TRY_RUN' is obsolete.
> warning: The macro `AC_TYPE_SIGNAL' is obsolete.

I’ll try to have a look: it would be good to contribute those changes early, so 
there is ample testing before a future release, as you said.

FX




macro_rename.diff
Description: Binary data
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Outdated libtool creates trouble on macOS

2023-07-30 Thread Marc Glisse

On Sun, 30 Jul 2023, FX Coudert wrote:


Sorry about that. I knew there were problems with old autotools and quickly 
tried updating them before the release, but that caused too many problems.


What are the problems? Our workaround is to rerun the latest autoreconf, and it 
emits a lot of warnings, but it does not create trouble. What are the symptoms 
you are seeing?


First, a large number of warnings can be a bit scary. Then, when I run 
configure, I get errors like


configure: line 12166: 1q: command not found

because configure put some uses of $SED before the code that sets the 
variable SED.


I tried autoupdate, as suggested by the warnings, but it replaced 
AC_LIBTOOL_WIN32_DLL with something non-functional IIRC.


It is likely that these issues and others are not too hard to deal with, 
but I don't have time for that now, and it is easy not to notice some 
issues that only affect other platforms so it didn't feel safe at the last 
minute.



One other question: our Linux builder, which is running from Github Actions, 
fails to download from gmplib.org
I thought only the mercurial repo was firewalled, is that not the case?


I don't know, but you can also download from the FSF servers.

--
Marc Glisse
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Outdated libtool creates trouble on macOS

2023-07-30 Thread FX Coudert
Hi Marc,

> Sorry about that. I knew there were problems with old autotools and quickly 
> tried updating them before the release, but that caused too many problems.

What are the problems? Our workaround is to rerun the latest autoreconf, and it 
emits a lot of warnings, but it does not create trouble. What are the symptoms 
you are seeing?


> If a pro of autotools wants to give a hand…

Can help if you let me know what you need.


One other question: our Linux builder, which is running from Github Actions, 
fails to download from gmplib.org
I thought only the mercurial repo was firewalled, is that not the case?

Best,
FX
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Outdated libtool creates trouble on macOS

2023-07-30 Thread Marc Glisse

On Sun, 30 Jul 2023, FX Coudert wrote:


Compilation of newly released GMP 6.3.0 on macOS (both Intel and ARM) leads to 
wrongly compiled libraries, with a flat namespace. This is generally avoided 
(and enforced by various build tools) on macOS since many OS versions, because 
it can cause linker errors due to name collisions.

The reason for this is this hunk in the configure script:


darwin*) # darwin 5.x on
  # if running on 10.5 or later, the deployment target defaults
  # to the OS version, if on x86, and 10.4, the deployment
  # target defaults to 10.4. Don't you love it?
  case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[012][,.]*)
  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
10.*)
  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  esac


This was generated by an autoconf, which relies on an outdated libtool version. 
This was fixed in libtool by 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=9e8c882517082fe5755f2524d23efb02f1522490
 (which is included in latest release, version 2.4.7).

Would it be possible to release the next version with more recent 
autoconf/libtool combo?


Sorry about that. I knew there were problems with old autotools and 
quickly tried updating them before the release, but that caused too many 
problems. Since we wanted a release because of a number of other 
improvements, it was safer to stick to the old ones (no worse than the 
previous release). I hope we can update for the next release.


If a pro of autotools wants to give a hand...

--
Marc Glisse
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Outdated libtool creates trouble on macOS

2023-07-30 Thread FX Coudert
Hi,

Compilation of newly released GMP 6.3.0 on macOS (both Intel and ARM) leads to 
wrongly compiled libraries, with a flat namespace. This is generally avoided 
(and enforced by various build tools) on macOS since many OS versions, because 
it can cause linker errors due to name collisions.

The reason for this is this hunk in the configure script:

> darwin*) # darwin 5.x on
>   # if running on 10.5 or later, the deployment target defaults
>   # to the OS version, if on x86, and 10.4, the deployment
>   # target defaults to 10.4. Don't you love it?
>   case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
> 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
>   _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
> 10.[012][,.]*)
>   _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
> ${wl}suppress' ;;
> 10.*)
>   _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
>   esac

This was generated by an autoconf, which relies on an outdated libtool version. 
This was fixed in libtool by 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=9e8c882517082fe5755f2524d23efb02f1522490
 (which is included in latest release, version 2.4.7).

Would it be possible to release the next version with more recent 
autoconf/libtool combo?

Thanks,
FX Coudert
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: bug

2023-07-30 Thread Torbjörn Granlund
赵世忠  writes:

  The last digit should be '8', but mpf_get_str outputs '7'.

"Should be"?

Please read the GMP documentation, and if you still think there is a
bug, please write a bug report where you motivate what you think is not
right with GMP's current behaviour.

-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


bug

2023-07-30 Thread 赵世忠
mpf_t x;
mpf_init2(x,3000);
mpf_set_str(x,"0.6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875",10);
char str[300];
mp_exp_t myexp;
mpf_get_str(str, , 10, 99, x); 
mpf_clear(x);


printf("%s\n",str);


The last digit should be '8', but mpf_get_str outputs '7'.






___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs