Re: Having trouble building the library...

2020-03-05 Thread Vincent Lefevre
On 2020-03-05 22:30:51 +0100, Torbjorn Granlund wrote:
> D Lee  writes:
> 
>   *These are my steps:*
>   Downloaded and unpacked.
>   mkdir gmp-obj *outside* of the source tree.
>   cd gmp-obj
>   ../gmp-6.2.0/gmp-6.2.0/configure >> configure.log 2>&1 (see attached
>   configure.log file)
>   make check >> make-check.log 2>&1 (see attached make-check.log)
> 
> You forgot the plain "make" step.

Shouldn't "make check" build the required dependencies?
In MPFR, one can run "make check" without "make" first.

-- 
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: Having trouble building the library...

2020-03-05 Thread Torbjörn Granlund
D Lee  writes:

  *These are my steps:*
  Downloaded and unpacked.
  mkdir gmp-obj *outside* of the source tree.
  cd gmp-obj
  ../gmp-6.2.0/gmp-6.2.0/configure >> configure.log 2>&1 (see attached
  configure.log file)
  make check >> make-check.log 2>&1 (see attached make-check.log)

You forgot the plain "make" step.

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


Re: 6.2.0 always uses BMI1/2 instructions

2020-03-05 Thread Torbjörn Granlund
Andy Fiddaman  writes:

  Unfortunately fat binaries don't help here, the target binary still
  executes mulx and lzcnt instructions even when on older CPUs. This is from
  running GNU expr with a fat libgmp on an Ivy Bridge machine. The fat binary
  version of the library was built on a more modern machine:

$ /usr/gnu/bin/expr 8 \* 7
Illegal Instruction (core dumped)

fc7fffdf11f0 libgmp.so.10.4.0`__gmpz_set_str+0x18e()

libgmp.so.10.4.0`__gmpz_set_str+0x18e:  mulx   %r13,%rax,%rsi

Er, something is wrong with your environment or your build.

My guess is that you're not linking to the libgmp.so file yuo just
compiled, but some variant installed which is chosen by means of dynamic
libary search paths.

Or else you force the GMP build to use flags by means of passing
non-standard parameters to its configure (via explicit parameters or via
environment variables).

Trust me, GMP fat binaries are not completely broken.  We test it
(automatically) on a very wide range of very old, old, not so old, and
new machines!

(When you find out what is wrong, please follow up here as it might help
other people.)

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


Re: 6.2.0 always uses BMI1/2 instructions

2020-03-05 Thread Andy Fiddaman


On Wed, 4 Mar 2020, Torbj?rn Granlund wrote:

; GMP will include instructions for the host for which GMP is configured,
; These instructions come from asm file which GMP's configure selects, and
; from compiler generated code which results from compiler command line
; options which GMP passes.
;
; If you want GMP to run on older machines, configuring it for some very
; ld machine might work, or more robustly configuring it for a generic
; architecture such as x86_64.
;
; But GMP supports fat binaried from x86 and x86_64, and that is probably
; the best choice.  Please see the GMP manual for details.

Hi,

Unfortunately fat binaries don't help here, the target binary still
executes mulx and lzcnt instructions even when on older CPUs. This is from
running GNU expr with a fat libgmp on an Ivy Bridge machine. The fat binary
version of the library was built on a more modern machine:

$ /usr/gnu/bin/expr 8 \* 7
Illegal Instruction (core dumped)

fc7fffdf11f0 libgmp.so.10.4.0`__gmpz_set_str+0x18e()

libgmp.so.10.4.0`__gmpz_set_str+0x18e:  mulx   %r13,%rax,%rsi


This is the Ivy Bridge machine:

x86 (GenuineIntel 306A9 family 6 model 58 step 9 clock 3392 MHz)
  Intel(r) Xeon(r) CPU E3-1240 V2 @ 3.40GHz

% isainfo -x
amd64: fsgsbase rdrand f16c vmx avx xsave pclmulqdq aes sse4.2 sse4.1 ssse3 
popcnt tscp cx16 sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
i386: rdrand f16c vmx avx xsave pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp 
ahf cx16 sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

Andy

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


Having trouble building the library...

2020-03-05 Thread D Lee
I'm trying to build v6.2.0, having download the source,  gmp-6.2.0.tar.lz ,
from https://gmplib.org.  Downloaded the documentation, *gmp-man-6.2.0.pdf*,
and am following *Ch 2 Installing GMP*; when I do the *make check*, I get
the following error:

libtool:   error: cannot find the library '../libgmp.la' or unhandled
argument '../libgmp.la'

*These are my steps:*
Downloaded and unpacked.
mkdir gmp-obj *outside* of the source tree.
cd gmp-obj
../gmp-6.2.0/gmp-6.2.0/configure >> configure.log 2>&1 (see attached
configure.log file)
make check >> make-check.log 2>&1 (see attached make-check.log)

These are the versions:

cat /etc/debian_version = 9.12
gcc --version  = gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
bash --version = GNU bash, version 4.4.12(1)-release
(x86_64-pc-linux-gnu)
make --version = GNU Make 4.3
libtool --version  = libtool (GNU libtool) 2.4.6
autoconf --version = autoconf (GNU Autoconf) 2.69
automake --version = automake (GNU automake) 1.16.1
binutils   = binutils/oldstable,now 2.28-5 amd64 [installed]
uname -a = Linux v-LD9 4.9.0-7-amd64 #1 SMP Debian 4.9.110-3+deb9u2
(2018-08-13) x86_64 GNU/Linux

My apologies, I'm not familiar with libtool (yet) and thank you for any
help.

Regards,
David
<>
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs