sage 7.4 does not build on Ubuntu 16.10

369 views
Skip to first unread message

Herbert Eisenbeis

unread,
Oct 20, 2016, 8:23:19 AM10/20/16
to sage-devel
Link problem in flint-2-5.2:
/usr/bin/ld: -r and -pie may not be used together

Log enclosed.

flint-2.5.2.p0.log.gz

Jeroen Demeyer

unread,
Oct 20, 2016, 8:40:13 AM10/20/16
to sage-...@googlegroups.com
The problem seems to be that your GCC was configured with
--enable-default-pie and FLINT does not like that. More information at

https://wiki.ubuntu.com/SecurityTeam/PIE

Herbert Eisenbeis

unread,
Oct 20, 2016, 11:21:52 AM10/20/16
to sage-devel
In deed, the GCC hardening in Ubuntu 16.10 is responsible for the make error.
Two questions:
  1. How can I configure make to circumvent the error in building flint?
  2. Are some other sage packages affected by GCC hardening?

Herbert

Thomas Hunter

unread,
Oct 31, 2016, 3:20:27 PM10/31/16
to sage-devel
(I'm new to posting in these groups so I apologize in advance if I am misplacing my query.)

I'd also love to know how to work around this.  If the thread moved elsewhere, please post a pointer here.

Many thanks,
Thomas

William Stein

unread,
Oct 31, 2016, 4:10:20 PM10/31/16
to sage-devel
I tried to install sage-7.4 on a clean new Ubuntu:16.10 docker
container (on 64-bit x68 intel). It fails trying to building GCC with

...
gcc-4.9.3.p1] (cd
'/home/w/sage-7.4/local/var/tmp/sage/build/gcc-4.9.3.p1' &&
'/home/w/sage-7.4/sage' --sh)
[gcc-4.9.3.p1] When you are done debugging, you can type "exit" to
leave the subshell.
[gcc-4.9.3.p1] ************************************************************************
Makefile:1725: recipe for target
'/home/w/sage-7.4/local/var/lib/sage/installed/gcc-4.9.3.p1' failed
make[2]: *** [/home/w/sage-7.4/local/var/lib/sage/installed/gcc-4.9.3.p1]
Error 1
make[2]: Leaving directory '/home/w/sage-7.4/build/make'
Makefile:891: recipe for target 'all-toolchain' failed
make[1]: *** [all-toolchain] Error 2
make[1]: Leaving directory '/home/w/sage-7.4/build/make'

real 12m18.858s
user 8m6.992s
sys 2m15.888s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all'):

* package: gcc-4.9.3.p1
log file: /home/w/sage-7.4/logs/pkgs/gcc-4.9.3.p1.log

---

Full log attached.

To see exactly the same thing on any x86 docker-capable machine, just
use docker to run the ubuntu:16.10 image, then

apt-get update; apt-get install dpkg-dev m4 flex bison python perl

adduser sage

su - sage

wget http://files.sagemath.org/src/sage-7.4.tar.gz

extract and make.

-- William
> --
> 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.



--
William (http://wstein.org)
logs.tar.bz2

François Bissey

unread,
Oct 31, 2016, 4:16:47 PM10/31/16
to sage-...@googlegroups.com
Yes, building gcc 4.9.3 with gcc 6.2.0 is not exactly supported.

William Stein

unread,
Oct 31, 2016, 4:56:19 PM10/31/16
to sage-devel
On Mon, Oct 31, 2016 at 1:16 PM, François Bissey
<francoi...@canterbury.ac.nz> wrote:
> Yes, building gcc 4.9.3 with gcc 6.2.0 is not exactly supported.

I set nothing and just went with Sage defaults. What a mess...
--
William (http://wstein.org)

Francois Bissey

unread,
Oct 31, 2016, 4:58:32 PM10/31/16
to sage-...@googlegroups.com
There is currently an issue with brial and gcc 6.2.0 that remains to
be fixed. I don’t remember if someone blacklisted that gcc as a consequence.

I should do something about that, even if it is a bit radical.

François

luisfe

unread,
Nov 3, 2016, 5:50:37 AM11/3/16
to sage-devel
I opened a ticket last week, #21782

The same problem appears in debian testing. Currently I am building sage with gcc-5

Jörg-Volker

unread,
Nov 5, 2016, 1:21:13 PM11/5/16
to sage-devel
I compiled 7.4 on debian testing with the system gcc 6.2.0 using two additional patches for the packages flint and arb.
Regards.

flint-pie-hardening-conflict.patch
arb-pie-hardening-conflict.patch

Herbert Eisenbeis

unread,
Nov 7, 2016, 5:49:36 AM11/7/16
to sage-devel
Your patches work for me (Ubuntu 16.10 64).

Thank you
Herbert

Pam Satterthwaite

unread,
Nov 11, 2016, 11:16:15 AM11/11/16
to sage-devel
Thanks for all helpful advice! I tried to patch, but still couldn't get past the error. Then I noticed a lovely Sage environment variable and voila! It's building!

So all I did was:

export SAGE_INSTALL_GCC=no
make

That's it!

hopefully that will save somebody some time in the future!

that is all

pam

oh yeah:

installing on Ubuntu Gnome 16.10.
my log was basically identical to the OP.

 
 
 
Reply all
Reply to author
Forward
0 new messages