Sage 8.2rc1 and Ubuntu 18.04: ecm fails to build

109 views
Skip to first unread message

Nathan Dunfield

unread,
Apr 27, 2018, 11:47:57 PM4/27/18
to sage-devel
Dear Sage folks, 

I tried building Sage 8.2rc1 on a clean Docker container running the newly released Ubuntu 18.04 LTS with minimal packages installed and got the attached error for ecm-7.0.4.p1.  The key error message appears to be 

mv -f aprtcle/.deps/aprcl-mpz_aprcl.Tpo aprtcle/.deps/aprcl-mpz_aprcl.Po
libtool: link: gcc -g -O3 -fPIC -Wl,-rpath -Wl,/sage/local/lib -o tune tune-mpmod.o tune-tune.o tune-mul_lo.o tune-listz.o tune-auxlib.o tune-ks-multiply.o tune-schoen_strass.o tune-polyeval.o tune-median.o tune-ecm_ntt.o tune-ntt_gfp.o tune-mpzspv.o tune-mpzspm.o tune-sp.o tune-spv.o tune-spm.o tune-auxarith.o  -L/sage/local/lib ./x86_64/.libs/libmulredc.a /sage/local/lib/libgmp.a -lrt -lm
mv -f aprtcle/.deps/libecm_la-mpz_aprcl.Tpo aprtcle/.deps/libecm_la-mpz_aprcl.Plo
mv -f .deps/libecm_la-pm1fs2.Tpo .deps/libecm_la-pm1fs2.Plo
/sage/local/lib/libgmp.a(fat_entry.o): In function `__gmpn_mod_34lsub1':
/sage/local/var/tmp/sage/build/mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868/src/mpn/tmp-fat_entry.s:202: multiple definition of `__gmpn_mod_34lsub1'
tune-schoen_strass.o:/sage/local/var/tmp/sage/build/ecm-7.0.4.p1/src/schoen_strass.c:61: first defined here
/usr/bin/x86_64-linux-gnu-ld: /sage/local/lib/libgmp.a(fat_entry.o): relocation R_X86_64_32S against symbol `__gmpn_cpuvec' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output

I tried two Docker hosts: a MacPro (E5-1680 v2) and an iMacPro (W-2150B).  I have previously built Sage 8.2rc1 on both hosts in Docker containers based on good old Ubuntu 16.04 but with a reasonably modern gcc 7.2.  For Ubuntu 18.04, the compiler was gcc 7.3, but I don't know if that's really the issue.

Best,

Nathan
ecm-7.0.4.p1.log

Erik Bray

unread,
Apr 28, 2018, 7:03:53 PM4/28/18
to sage-devel
Thanks for the report--I have yet to try doing anything on Ubuntu
18.04, but I'll try it now and see if I get the same.
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

Erik Bray

unread,
Apr 28, 2018, 8:41:49 PM4/28/18
to sage-devel
I just finished a full build from scratch on Ubuntu 18.04 and it went
fine. This was of 8.2.rc4.

I don't recall off the top of my head whether anything changed between
rc1 and rc4 that might have effected this, but you might try bumping a
rc4 just in case.

Nathan Dunfield

unread,
Apr 28, 2018, 10:40:50 PM4/28/18
to sage-devel
On Saturday, April 28, 2018 at 7:41:49 PM UTC-5, Erik Bray wrote:
I just finished a full build from scratch on Ubuntu 18.04 and it went
fine. This was of 8.2.rc4.

I don't recall off the top of my head whether anything changed between
rc1 and rc4 that might have effected this, but you might try bumping a
rc4 just in case.

Erik,

First, thanks for looking into this.  I erred when I wrote rc1, I too was working with the very latest rc4.  I was using my own variant of your original Dockerfiles, but I just did another run where I cloned "sagemath/docker-images", edited the first line of "sagemath-base/Dockerfile" and then did:

docker build --tag="sagemath/sagemath-base" sagemath-base
docker build --tag="sagemath/sagemath-develop" sagemath-develop

The error log looks pretty much the same as before except this time the package was "ecm-7.0.4.p0" rather than "ecm-7.0.4.p1". 

Best,

Nathan

Erik Bray

unread,
Apr 29, 2018, 4:53:26 AM4/29/18
to sage-devel
Interesting--when I did the build I did it by hand, though for lack of
better build instructions I basically just manually followed the steps
in the Dockerfile. I will try again the way you did it.

Erik Bray

unread,
Apr 29, 2018, 5:02:31 AM4/29/18
to sage-devel
Are you sure you were building 8.2.rc4? In the Dockerfile the default
is (perhaps wrongly, in retrospect) to build from Sage's "master"
branch, rather than the more current "develop" branch (this is true
even for the "sagemath-develop" Dockerfile, which is confusing).

The version of the ecm package in 8.2.rc4 should be 7.0.4.p1.

Best,
E

Erik Bray

unread,
Apr 29, 2018, 5:47:33 AM4/29/18
to sage-devel
Ah, well regardless I just got the failure in ECM too while running

docker build --tag="sagemath/sagemath-develop" --build-arg
SAGE_BRANCH=develop sagemath-develop

If I had to wager a guess, the only difference between the Dockerfile
and when I tried building manually is the use of SAGE_FAT_BINARY=yes.

Erik Bray

unread,
Apr 29, 2018, 5:55:35 AM4/29/18
to sage-devel
Yep, SAGE_FAT_BINARY=yes is what did it. I'll look into it further.

Erik Bray

unread,
Apr 29, 2018, 6:22:32 AM4/29/18
to sage-devel
This appears to be related, and explains why we're just seeing this on
bionic (actually introduced in 16.10, but the Docker images are
currently based on 16.04).

Nathan Dunfield

unread,
Apr 29, 2018, 3:08:30 PM4/29/18
to sage-devel


On Sunday, April 29, 2018 at 4:55:35 AM UTC-5, Erik Bray wrote:
Yep, SAGE_FAT_BINARY=yes is what did it.  I'll look into it further.

Erik,

Thanks!  I just confirmed that setting SAGE_FAT_BINARY to "no" fixes the problem on my machine as well.

Nathan
Reply all
Reply to author
Forward
0 new messages