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.