cypari fails to build on Ubuntu 18.04

18 views
Skip to first unread message

Kevin Horton

unread,
Jun 17, 2019, 8:51:20 PM6/17/19
to sage-support
I'm trying to install sage 8.7 from source on Ubuntu 18.04.

cypari fails to build:


gcc -pthread -shared -L/home/kwh/sage-8.7/local/lib -Wl,-rpath,/home/kwh/sage-8.7/local/lib -L/home/kwh/sage-8.7/local/lib -Wl,-rpath,/home/kwh/sage-8.7/local/lib build/temp.linux-x86_64-2.7/cypari2/convert.o -L/home/kwh/sage-8.7/local/lib -L/home/kwh/sage-8.7/local/lib64 -L/home/kwh/sage-8.7/local/lib -lgmp -lpari -lpython2.7 -o build/lib.linux-x86_64-2.7/cypari2/convert.so -lpari
building 'cypari2.gen' extension
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I./cypari2 -I/home/kwh/sage-8.7/local/lib/python2.7/site-packages/cysignals -I/home/kwh/sage-8.7/local/include -I/home/kwh/sage-8.7/local/include/python2.7 -c cypari2/gen.c -o build/temp.linux-x86_64-2.7/cypari2/gen.o
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
error: command 'gcc' failed with exit status 4
Running setup.py install for cypari2: finished with status 'error'
Cleaning up...
Removing source in /tmp/pip-req-build-EhTFza
Removed build tracker '/tmp/pip-req-tracker-rEVd31'
Command "/home/kwh/sage-8.7/local/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-EhTFza/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" --no-user-cfg install --record /tmp/pip-record-dvz_Aw/install-record.txt --single-version-externally-managed --root /home/kwh/sage-8.7/local/var/tmp/sage/build/cypari-2.1.0.p0/inst --compile" failed with error code 1 in /tmp/pip-req-build-EhTFza/
Exception information:
Traceback (most recent call last):
File "/home/kwh/sage-8.7/local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/home/kwh/sage-8.7/local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 366, in run
use_user_site=options.use_user_site,
File "/home/kwh/sage-8.7/local/lib/python2.7/site-packages/pip/_internal/req/__init__.py", line 49, in install_given_reqs
**kwargs
File "/home/kwh/sage-8.7/local/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 791, in install
spinner=spinner,
File "/home/kwh/sage-8.7/local/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command "/home/kwh/sage-8.7/local/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-EhTFza/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" --no-user-cfg install --record /tmp/pip-record-dvz_Aw/install-record.txt --single-version-externally-managed --root /home/kwh/sage-8.7/local/var/tmp/sage/build/cypari-2.1.0.p0/inst --compile" failed with error code 1 in /tmp/pip-req-build-EhTFza/
Error: installing with pip2 failed
********************************************************************************
Error installing cypari-2.1.0.p0
********************************************************************************

real 1m54.940s
user 1m44.406s
sys 0m5.612s
************************************************************************
Error installing package cypari-2.1.0.p0
************************************************************************

======
gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

======

Any advice is appreciated. If there is no resolution, I'll install sage 8.1 using Ubuntu's packages.

thanks,

Kevin

Jeroen Demeyer

unread,
Jun 18, 2019, 1:09:35 AM6/18/19
to sage-s...@googlegroups.com
Internal compiler error typically means one of the following:
- Running out of memory during compilation
- Buggy compiler
- Hardware problem

So the following questions need to be answered:

1. Is the problem reproducible? What happens when you try again?

2. Is this a machine with little memory or were you doing many things at
the same time (possibly compiling in parallel) such that you could have
run out memory?

Kevin Horton

unread,
Jun 18, 2019, 9:16:29 AM6/18/19
to sage-support
Thanks for the info and advice.

1. The problem is 100% reproducible.  Same result every time.

2. It is quite possible low memory is the issue, as I'm trying to install it on a Linode virtual server with 1 GB RAM.  I'll try upgrading my Linode instance to 2 GB RAM and report back once I know whether that has solved the problem or not.

Jeroen Demeyer

unread,
Jun 18, 2019, 9:21:31 AM6/18/19
to sage-s...@googlegroups.com
On 2019-06-18 15:16, Kevin Horton wrote:
> 2. It is quite possible low memory is the issue, as I'm trying to
> install it on a Linode virtual server with 1 GB RAM.

Yes, that's probably not enough for a big compilation. I would recommend
at least 4GB of RAM, but you may get away with 2GB... at least if you
don't build the documentation: use "make build" to build all of Sage
without the documentation.

Kevin Horton

unread,
Jun 18, 2019, 12:10:58 PM6/18/19
to sage-s...@googlegroups.com
Your assessment was correct. The build has progressed past the original point of failure now that I have increased the RAM to 2GB. I'll increase to 4GB if I get another compiler error.

Thanks for your advice.

Kevin
Reply all
Reply to author
Forward
0 new messages