Make check fails on samsung S8 (2)

2020-08-19 Thread Luc Sanselme
Hello,

first of all, sorry for my previous bug report with confidentiality issues.
I forgot to remove them before sending the mail.

I installed gmp on my Samsung S8, running termux.

Here are my environment informations:
- gmp-6.2.0 from the tar.bz2 archive
- make check fails
- clang 10.0.1 aarch64-unknown-linux-android
- uname -a: Linux localhost 4.4.153-16125356 #2 SMP PREEMPT Thu Jul 4
23:06:25 KST 2019 aarch64 Android
- ./config.guess: arrch64-unknown-linux-gnu

The error occurs on a make check. The two files attached are the output of
stderror for make check and for ./configure

Regards.
Luc
t-locale.c:62:1: error: redefinition of 'nl_langinfo'
nl_langinfo (nl_item n)
^
/data/data/com.termux/files/usr/include/langinfo.h:177:14: note: previous 
definition is here
static char *nl_langinfo(nl_item item)
 ^
1 error generated.
make[4]: *** [Makefile:635: t-locale.o] Error 1
make[3]: *** [Makefile:909: check-am] Error 2
make[2]: *** [Makefile:823: check-recursive] Error 1
make[1]: *** [Makefile:995: check-recursive] Error 1
make: *** [Makefile:1287: check] Error 2
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for a BSD-compatible install... 
/data/data/com.termux/files/usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... 
/data/data/com.termux/files/usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler gcc -O2 -pedantic ... yes
checking compiler gcc -O2 -pedantic has sizeof(void*)==8... yes
checking compiler gcc -O2 -pedantic  -march=armv8-a... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for gcc option to accept ISO C99... none needed
checking how to run the C preprocessor... gcc -E
checking build system compiler gcc... yes
checking for build system preprocessor... gcc -E
checking for build system executable suffix... 
checking whether build system compiler is ANSI... yes
checking for build system compiler math library... -lm
checking for grep that handles long lines and -e... 
/data/data/com.termux/files/usr/bin/grep
checking for egrep... /data/data/com.termux/files/usr/bin/grep -E
using ABI="64"
  CC="gcc"
  CFLAGS="-O2 -pedantic -march=armv8-a"
  CPPFLAGS=""
  MPN_PATH=" arm64 generic"
checking whether assembler supports --noexecstack option... yes
checking for ar... ar
checking for BSD- or MS-compatible name lister (nm)... 
/data/data/com.termux/files/usr/bin/nm -B
checking the name lister (/data/data/com.termux/files/usr/bin/nm -B) 
interface... BSD nm
checking how to print strings... printf
checking for a sed that does not truncate output... 
/data/data/com.termux/files/usr/bin/sed
checking for fgrep... /data/data/com.termux/files/usr/bin/grep -F
checking for ld used by gcc... 
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld
checking if the linker 
(/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld) is GNU ld... yes
checking whether ln -s works... yes
checking the maximum length of command line arguments... 32768
checking how to convert aarch64-unknown-linux-gnu file names to 
aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain 
format... func_convert_file_noop
checking for /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld 
option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /data/data/com.termux/files/usr/bin/nm -B output from 
gcc object... ok
checking for sysroot... no
checking for a working dd... /data/data/com.termux/files/usr/bin/dd
checking how to truncate binary pipes... /data/data/com.termux/files/usr/bin/dd 
bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... 

Re: mpz_sizeinbase() bug

2020-08-19 Thread Vincent Lefevre
On 2020-08-19 10:39:01 +0200, Paul Zimmermann wrote:
>Dear Johannes,
> 
> if you read carefully the GMP documentation, you will see this is not a bug:
> 
>  -- Function: size_t mpz_sizeinbase (const mpz_t OP, int BASE)
>  Return the size of OP measured in number of digits in the given
>  BASE.  BASE can vary from 2 to 62.  The sign of OP is ignored, just
>  the absolute value is used.  The result will be either exact or 1
>  too big.  If BASE is a power of 2, the result is always exact.  If
>  OP is zero the return value is always 1.

IMHO, it's a bad thing to say that one returns something, and later
say that this can be inexact. It could be improved to something like:

  Return the size of OP measured in number of digits in the given
  BASE, or this size + 1.  BASE can vary from 2 to 62.  If BASE is
  a power of 2, the result is always the exact size.  The sign of
  OP is ignored, just the absolute value is used. If OP is zero the
  return value is always 1.

> If you want the exact size, use mpz_get_str() and strlen(),
> or mpz_ui_pow_ui() and mpz_cmp().

I would say that this is rather inefficient since the exact result
can generally be determined from the first few digits.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: mpz_sizeinbase() bug

2020-08-19 Thread Paul Zimmermann
   Dear Johannes,

if you read carefully the GMP documentation, you will see this is not a bug:

 -- Function: size_t mpz_sizeinbase (const mpz_t OP, int BASE)
 Return the size of OP measured in number of digits in the given
 BASE.  BASE can vary from 2 to 62.  The sign of OP is ignored, just
 the absolute value is used.  The result will be either exact or 1
 too big.  If BASE is a power of 2, the result is always exact.  If
 OP is zero the return value is always 1.

In this case mpz_sizeinbase(63, 10) is exact, and
mpz_sizeinbase(64, 10) is 1 too big.

If you want the exact size, use mpz_get_str() and strlen(),
or mpz_ui_pow_ui() and mpz_cmp().

Paul Zimmermann

> Date: Wed, 19 Aug 2020 02:21:51 +0200
> From: "Lebender, Johannes" 
> 
> Dear GMP maintainers,
> 
> i found a possible bug in the mpz_sizeinbase() function. e.g.
> mpz_sizeinbase(63, 10) returns 2
> mpz_sizeinbase(64, 10) returns 3
> 
> Attached to this mail you can find a detailed report with all 
> informations needed as described in 
> https://gmplib.org/manual/Reporting-Bugs
> 
> Many thanks for maintaining this library!
> best regards,
> Johannes Lebender
> 
> [2:application/x-gzip Show Save:GMP_mpz_sizeinbase_bugreport.tar (15kB)]
> 
> 
> [3:text/plain Hide]
> 
> ___
> gmp-bugs mailing list
> gmp-bugs@gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-bugs
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: mpz_sizeinbase() bug

2020-08-19 Thread Torbjörn Granlund
"Lebender, Johannes"  writes:

  i found a possible bug in the mpz_sizeinbase() function. e.g.
  mpz_sizeinbase(63, 10) returns 2
  mpz_sizeinbase(64, 10) returns 3

Why do you think those values are wrong?  Which values do you expect
instead?

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


Re: make check fails on samsung S8

2020-08-19 Thread Torbjörn Granlund
Our apologies to the subscribers of this list for allowing a
"confidential" message containing various threats.

We will delete it from our archive.

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


mpz_sizeinbase() bug

2020-08-19 Thread Lebender, Johannes

Dear GMP maintainers,

i found a possible bug in the mpz_sizeinbase() function. e.g.
mpz_sizeinbase(63, 10) returns 2
mpz_sizeinbase(64, 10) returns 3

Attached to this mail you can find a detailed report with all 
informations needed as described in 
https://gmplib.org/manual/Reporting-Bugs


Many thanks for maintaining this library!
best regards,
Johannes Lebender

GMP_mpz_sizeinbase_bugreport.tar
Description: GNU Zip compressed data
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


make check fails on samsung S8

2020-08-19 Thread Luc Sanselme
Hello,

you can find the error output from make check on gmp-6.2.0 on an S8, with
android and termux.

The processor is an aarch64 Processor rev 1 with 8 cores.

Regards.
Luc.


-- 
Les informations contenues dans le présent message sont strictement
confidentielles et ne sont destinées qu'à l'usage de la ou des personne(s)
dont le nom apparaît en qualité de destinataire(s) et de tout autre
personne spécifiquement autorisée à les recevoir. Si vous n'êtes pas la
personne à qui ce message est destiné, nous vous informons qu'il est
strictement interdit de le lire, diffuser, de le distribuer ou d'en faire
des copies, totalement ou partiellement, sur tout support, notamment un
support électronique, ou autre. La présente interdiction s'applique tant au
message lui-même qu'aux documents qui peuvent être joints audit message. Si
vous recevez ce message par erreur, nous vous remercions de bien vouloir le
détruire ainsi que toute copie et de signaler l'erreur à l'envoyeur par
retour d’e-mail.
t-locale.c:62:1: error: redefinition of 'nl_langinfo'
nl_langinfo (nl_item n)
^
/data/data/com.termux/files/usr/include/langinfo.h:177:14: note: previous 
definition is here
static char *nl_langinfo(nl_item item)
 ^
1 error generated.
make[4]: *** [Makefile:635: t-locale.o] Error 1
make[3]: *** [Makefile:909: check-am] Error 2
make[2]: *** [Makefile:823: check-recursive] Error 1
make[1]: *** [Makefile:995: check-recursive] Error 1
make: *** [Makefile:1287: check] Error 2
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs