Linking error in FLINT when building Sage 7.4 on Ubuntu 16.10

61 views
Skip to first unread message

ksk...@gmail.com

unread,
Oct 27, 2016, 10:22:49 AM10/27/16
to sage-support
I'm trying to build Sage 7.4 on my laptop, now running Ubuntu 16.10. The build broke down in FLINT with what I find a rather strange linking error:

[flint-2.5.2.p0] /usr/bin/ld: -r and -pie may not be used together

The offending command is the command:

[flint-2.5.2.p0] gcc  -Wl,-r ../build/ulong_extras/clog.lo ../build/ulong_extras/randbits.lo ../build/ulong_extras/moebius_mu.lo ../build/ulong_extras/cbrt_chebyshev_approximation.lo ../build/ulong_extras/pow.lo ../build/ulong_extras/mulmod2_preinv.lo ../build/ulong_extras/factor_SQUFOF.lo ../build/ulong_extras/powmod2_preinv.lo ../build/ulong_extras/nth_prime_bounds.lo ../build/ulong_extras/randlimb.lo ../build/ulong_extras/jacobi.lo ../build/ulong_extras/factor_partial.lo ../build/ulong_extras/mod2_precomp.lo ../build/ulong_extras/flog.lo ../build/ulong_extras/factor_pp1.lo ../build/ulong_extras/factorial_mod2_preinv.lo ../build/ulong_extras/invmod.lo ../build/ulong_extras/mulmod_preinv.lo ../build/ulong_extras/is_probabprime_fermat.lo ../build/ulong_extras/root_estimate.lo ../build/ulong_extras/is_probabprime_BPSW.lo ../build/ulong_extras/lll_mod_preinv.lo ../build/ulong_extras/gcd.lo ../build/ulong_extras/randprime.lo ../build/ulong_extras/cleanup_primes.lo ../build/ulong_extras/prime_inverses_arr_readonly.lo ../build/ulong_extras/mod_precomp.lo ../build/ulong_extras/remove2_precomp.lo ../build/ulong_extras/is_prime_pseudosquare.lo ../build/ulong_extras/primes_init.lo ../build/ulong_extras/primes_sieve_range.lo ../build/ulong_extras/mod2_preinv.lo ../build/ulong_extras/is_perfect_power235.lo ../build/ulong_extras/powmod_preinv.lo ../build/ulong_extras/sqrtrem.lo ../build/ulong_extras/is_prime_pocklington.lo ../build/ulong_extras/cbrt_estimate.lo ../build/ulong_extras/primitive_root_prime.lo ../build/ulong_extras/factor_trial.lo ../build/ulong_extras/is_probabprime_lucas.lo ../build/ulong_extras/primes_clear.lo ../build/ulong_extras/rootrem.lo ../build/ulong_extras/discrete_log_bsgs.lo ../build/ulong_extras/sqrt.lo ../build/ulong_extras/powmod_precomp.lo ../build/ulong_extras/sqrtmod_primepow.lo ../build/ulong_extras/sqrtmodn.lo ../build/ulong_extras/cbrt_binary_search.lo ../build/ulong_extras/factor_insert.lo ../build/ulong_extras/revbin.lo ../build/ulong_extras/prime_pi_bounds.lo ../build/ulong_extras/factor_one_line.lo ../build/ulong_extras/compute_primes.lo ../build/ulong_extras/cbrtrem.lo ../build/ulong_extras/sqrtmod.lo ../build/ulong_extras/root.lo ../build/ulong_extras/is_probabprime.lo ../build/ulong_extras/divrem2_precomp.lo ../build/ulong_extras/factorial_fast_mod2_preinv.lo ../build/ulong_extras/cbrt.lo ../build/ulong_extras/remove.lo ../build/ulong_extras/cbrt_newton_iteration.lo ../build/ulong_extras/is_oddprime_binary.lo ../build/ulong_extras/prime_pi.lo ../build/ulong_extras/is_squarefree.lo ../build/ulong_extras/gcdinv.lo ../build/ulong_extras/factor_power235.lo ../build/ulong_extras/randtest.lo ../build/ulong_extras/primes_arr_readonly.lo ../build/ulong_extras/primes_jump_after.lo ../build/ulong_extras/is_prime.lo ../build/ulong_extras/sizeinbase.lo ../build/ulong_extras/xgcd.lo ../build/ulong_extras/randint.lo ../build/ulong_extras/nth_prime.lo ../build/ulong_extras/factor_lehman.lo ../build/ulong_extras/ll_mod_preinv.lo ../build/ulong_extras/inlines.lo ../build/ulong_extras/primes_extend_small.lo ../build/ulong_extras/is_strong_probabprime_precomp.lo ../build/ulong_extras/is_strong_probabprime2_preinv.lo ../build/ulong_extras/nextprime.lo ../build/ulong_extras/euler_phi.lo ../build/ulong_extras/factor_trial_range.lo ../build/ulong_extras/is_oddprime_small.lo ../build/ulong_extras/is_probabprime_fibonacci.lo ../build/ulong_extras/factor.lo ../build/ulong_extras/mulmod_precomp.lo ../build/ulong_extras/is_square.lo ../build/ulong_extras/factor_trial_partial.lo -o ../build/ulong_extras/../ulong_extras.lo -nostdlib

Has anyone else run into anything similar?

Kiran

Dima Pasechnik

unread,
Oct 27, 2016, 11:43:34 AM10/27/16
to sage-support
looks like it's 16.10-specific, for they did something clever (TM) to the compiler:

Dima Pasechnik

unread,
Oct 27, 2016, 11:49:16 AM10/27/16
to sage-support


On Thursday, October 27, 2016 at 3:43:34 PM UTC, Dima Pasechnik wrote:
looks like it's 16.10-specific, for they did something clever (TM) to the compiler:

specifically, they say there:

Link failure via /usr/bin/ld: -r and -pie may not be used together

In the general case, either -no-pie needs to be passed or cc needs to be invoked with -r rather than -Wl,-r.

Paul Leopardi

unread,
Jan 2, 2017, 3:56:35 PM1/2/17
to sage-support
On Friday, 28 October 2016 02:49:16 UTC+11, Dima Pasechnik wrote:

In the general case, either -no-pie needs to be passed or cc needs to be invoked with -r rather than -Wl,-r.

The corresponding trac ticket is https://trac.sagemath.org/ticket/21782 ? And the branch to use right now when building Sage on Ubuntu 16.10 is u/charpent/fix-flint ?

Dima Pasechnik

unread,
Jan 2, 2017, 4:16:05 PM1/2/17
to sage-support
if you build the latest 7.5.rc1, it's already there.
Otherwise, yes, although I don't know whether this patch will apply cleanly to 7.4.
Why won't you instead switch to 7.5.rc1?

Dima Pasechnik

unread,
Jan 2, 2017, 4:31:51 PM1/2/17
to sage-support


On Monday, January 2, 2017 at 8:56:35 PM UTC, Paul Leopardi wrote:

ictu...@gmail.com

unread,
Jan 3, 2017, 9:36:08 AM1/3/17
to sage-support
I skip sage 7.4 on ubuntu I couldn't install it properly and I compile sage 7.5 rc out of the box and even sagemanifolds. Now  I am using 17.04 alpha there is a new jupyter-notebook for sage in the repos.

Reply all
Reply to author
Forward
0 new messages