Opened 7 years ago
Closed 7 years ago
#18198 closed defect (fixed)
4ti2 spkg fails to find gmp
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | packages: optional | Keywords: | 4ti2 |
Cc: | dimpase | Merged in: | |
Authors: | Matthias Koeppe | Reviewers: | Dima Pasechnik |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #18240 | Stopgaps: |
Description
I installed the packages gmp and then 4ti2 in my copy of Sage 6.5.
When building 4ti2, it does not detect GMP and consequently only builds the fixed-precision version of the code, not the GMP version of the code. However, the GMP version is unconditionally used by sage.interfaces.four_ti_2
Change History (20)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
here are more details; without optional GMP package installed, one still gets 4ti2gmp built by doing sage -i 4ti2
; its linkage is as follows:
$ ldd local/bin/4ti2gmp linux-vdso.so.1 => (0x00007fffd2179000) lib4ti2gmp.so.0 => /home/dima/software/sage.6.6/sage/local/lib/lib4ti2gmp.so.0 (0x00007f5ff4cc7000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5ff49a8000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5ff4791000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5ff43cc000) libglpk.so.36 => /home/dima/software/sage.6.6/sage/local/lib/libglpk.so.36 (0x00007f5ff40f4000) libgmpxx.so.8 => /home/dima/software/sage.6.6/sage/local/lib/libgmpxx.so.8 (0x00007f5ff3eee000) libgmp.so.16 => /home/dima/software/sage.6.6/sage/local/lib/libgmp.so.16 (0x00007f5ff3c7a000)t libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5ff3974000) /lib64/ld-linux-x86-64.so.2 (0x00007f5ff4f4e000) libz.so.1 => /home/dima/software/sage.6.6/sage/local/lib/libz.so.1 (0x00007f5ff3759000)
it looks as it is linked against GMP, but this is just a differently named copy of MPIR.
comment:3 Changed 7 years ago by
and after sage -i gmp
followed by sage -f 4ti2
(i.e. re-installing 4ti2 with GMP from GMP) I still get 4ti2gmp built, with the following weird linkage:
$ ldd local/bin/4ti2gmp linux-vdso.so.1 => (0x00007fff89be3000) lib4ti2gmp.so.0 => /home/dima/software/sage.6.6/sage/local/lib/lib4ti2gmp.so.0 (0x00007f237844b000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f237812c000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2377f15000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2377b50000) libglpk.so.36 => /home/dima/software/sage.6.6/sage/local/lib/libglpk.so.36 (0x00007f2377878000) libgmpxx.so.4 => /home/dima/software/sage.6.6/sage/local/lib/libgmpxx.so.4 (0x00007f2377671000) libgmp.so.10 => /home/dima/software/sage.6.6/sage/local/lib/libgmp.so.10 (0x00007f23773fb000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f23770f5000) /lib64/ld-linux-x86-64.so.2 (0x00007f23786d2000) libz.so.1 => /home/dima/software/sage.6.6/sage/local/lib/libz.so.1 (0x00007f2376eda000) libgmp.so.16 => /home/dima/software/sage.6.6/sage/local/lib/libgmp.so.16 (0x00007f2376c66000)
here we see that it picked up both GMP from GMP, i.e. libmp.so.10 and GMP from MPIR, i.e. libgmp.so.16.
Is this what you are getting, as well?
comment:4 follow-up: ↓ 5 Changed 7 years ago by
I suggest we move over to using the just released Sage 6.6. (I also presume you talk about Sage compiled from source).
comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 7 years ago by
Replying to dimpase:
I suggest we move over to using the just released Sage 6.6. (I also presume you talk about Sage compiled from source).
Thanks for looking into this, Dima.
I was using the Sage 6.5 binaries for Mac OS X (I should have said that). Now I updated to Sage 6.6, again using the binaries.
This is what I get if I do NOT install the gmp package first.
egret-2:~/s/sage/sage-6.6 (develop)$ sage -i 4ti2 /Users/mkoeppe/s/sage/sage-6.6/src/bin/sage-spkg: line 312: cd: /Users/mkoeppe/s/sage/sage-6.6/upstream: No such file or directory Attempting to download package 4ti2 >>> Checking online list of optional packages. [.] >>> Found 4ti2-1.6.2 >>> Trying to download http://www.sagemath.org/spkg/optional/4ti2-1.6.2.spkg [............................................................] 4ti2-1.6.2 ==================================================== Extracting package /Users/mkoeppe/s/sage/sage-6.6/upstream/4ti2-1.6.2.spkg -rw-r--r-- 1 mkoeppe staff 4658185 Apr 16 09:03 /Users/mkoeppe/s/sage/sage-6.6/upstream/4ti2-1.6.2.spkg Finished extraction **************************************************** Host system: Darwin egret-2.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64 **************************************************** C compiler: gcc C compiler version: Using built-in specs. COLLECT_GCC=/Users/mkoeppe/s/sage/sage-6.6/local/bin/gcc COLLECT_LTO_WRAPPER=/Users/mkoeppe/s/sage/sage-6.6/local/bin/../libexec/gcc/x86_64-apple-darwin11.4.2/4.9.2/lto-wrapper Target: x86_64-apple-darwin11.4.2 Configured with: ../src/configure --prefix=/Users/karl.crisman/Downloads/sage-6.6/local --with-local-prefix=/Users/karl.crisman/Downloads/sage-6.6/local --with-gmp=/Users/karl.crisman/Downloads/sage-6.6/local --with-mpfr=/Users/karl.crisman/Downloads/sage-6.6/local --with-mpc=/Users/karl.crisman/Downloads/sage-6.6/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm --without-isl --without-cloog Thread model: posix gcc version 4.9.2 (GCC) [----8<-----] checking how to hardcode library paths into programs... immediate checking for GMP >= 3.1.1... configure: WARNING: GNU MP not found. 4ti2 will be built without support for arbitrary-precision computations. configure: WARNING: Unable to use the GNU MP C++ library. Please make sure that GNU MP was configured with "--enable-cxx". 4ti2 will be built without support for arbitrary-precision computations. [----8<-----]
If I do install gmp first, it looks the same.
Later I can try a Sage compiled from source; but in any case it seems there needs to be more testing in place to catch this build error on this platform.
comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 7 years ago by
Replying to mkoeppe:
Replying to dimpase:
I suggest we move over to using the just released Sage 6.6. (I also presume you talk about Sage compiled from source).
Thanks for looking into this, Dima.
I was using the Sage 6.5 binaries for Mac OS X (I should have said that). Now I updated to Sage 6.6, again using the binaries.
It perhaps should be said clearly in the docs that the binary distributions of Sage cannot do all the building right; it can deal with Python and Cython, but installing optional packages that build libraries might not work.
Be warned that the latest XCode (6.3) for OSX 10.10 is quite broken and cannot build Sage at the moment, IIRC. One has to have 6.2 instead.
comment:7 in reply to: ↑ 6 ; follow-up: ↓ 8 Changed 7 years ago by
Replying to dimpase:
It perhaps should be said clearly in the docs that the binary distributions of Sage cannot do all the building right; it can deal with Python and Cython, but installing optional packages that build libraries might not work.
Be warned that the latest XCode (6.3) for OSX 10.10 is quite broken and cannot build Sage at the moment, IIRC. One has to have 6.2 instead.
I've just posted this: https://groups.google.com/d/msg/sage-devel/fEoDWZdkdUo/8kmpi5pkLW4J
comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed 7 years ago by
Replying to dimpase:
Replying to dimpase:
It perhaps should be said clearly in the docs that the binary distributions of Sage cannot do all the building right; it can deal with Python and Cython, but installing optional packages that build libraries might not work.
Be warned that the latest XCode (6.3) for OSX 10.10 is quite broken and cannot build Sage at the moment, IIRC. One has to have 6.2 instead.
Thanks a lot. I managed to build from source from git off 6.7.beta0 after downgrading to XCode 6.2. The problem persists.
comment:9 in reply to: ↑ 8 Changed 7 years ago by
Replying to mkoeppe:
Replying to dimpase:
Replying to dimpase:
It perhaps should be said clearly in the docs that the binary distributions of Sage cannot do all the building right; it can deal with Python and Cython, but installing optional packages that build libraries might not work.
Be warned that the latest XCode (6.3) for OSX 10.10 is quite broken and cannot build Sage at the moment, IIRC. One has to have 6.2 instead.
Thanks a lot. I managed to build from source from git off 6.7.beta0 after downgrading to XCode 6.2. The problem persists
please provide the full log of the 4ti2 build; it is in SAGEROOT/logs/pkgs/4ti2.log; (you can upload it as an attachment on this ticket).
Usual causes for such a thing is that you have another installation of GMP that gets into the picture, the one that comes from macports/homebrew, or that you have something funny in your PATH. But perhaps it's something more profound, platform (OSX) specific.
comment:10 follow-up: ↓ 11 Changed 7 years ago by
Regarding 4ti2 spkg on OSX, last time I checked on OSX10.9.5 with Sage 6.6.beta1, and it worked just fine, making 4ti2gmp etc etc. I'll check the latest Sage beta later today.
comment:11 in reply to: ↑ 10 Changed 7 years ago by
Replying to dimpase:
Regarding 4ti2 spkg on OSX, last time I checked on OSX10.9.5 with Sage 6.6.beta1, and it worked just fine, making 4ti2gmp etc etc. I'll check the latest Sage beta later today.
I can also confirm that things work with 6.7.beta1. I suppose I should upgrade OS.
comment:12 Changed 7 years ago by
I am able to reproduce this with a binary release of Sage 6.7.beta1 on Linux. Thus it is not OSX-specific. But the binary releases are definitely broken in this sense.
comment:13 Changed 7 years ago by
oops, this is a bug in MPIR; reported here, https://groups.google.com/d/msg/sage-devel/Tu-egDn-zLw/0S5ouau2J1AJ but not yet fixed (basically, can be worked around by editing mpir.h and gmp.h).
This happens after we went to gcc 4.9, where this shows up.
Nothing to do with binary vs source distributions, either, mea culpa.
comment:14 follow-up: ↓ 15 Changed 7 years ago by
Please try the patch at #18240, and sorry for asking you to do unnecessary checks etc...
comment:15 in reply to: ↑ 14 Changed 7 years ago by
comment:16 Changed 7 years ago by
- Dependencies set to 18240
- Reviewers set to Dima Pasechnik
- Status changed from new to needs_review
comment:17 Changed 7 years ago by
- Status changed from needs_review to positive_review
it will be fixed by #18240, which needs review.
comment:18 Changed 7 years ago by
- Dependencies changed from 18240 to #18240
comment:19 Changed 7 years ago by
- Milestone set to sage-duplicate/invalid/wontfix
comment:20 Changed 7 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
This is most probably not a big issue, unless you must use GMP interface provided by GMP rather than GMP interface provided by MPIR. The latter is standard in Sage, and does not need to be installed (and cannot be removed). (although this is certainly confusing)
I will have a look.