pari compilation failure on Ubuntu Karmic

9 views
Skip to first unread message

Dan Drake

unread,
Sep 10, 2009, 3:48:30 AM9/10/09
to sage-...@googlegroups.com
I installed an Ubuntu Karmic virtual machine to see how Sage compiles
there...and right now, it doesn't.

I've tried on a 64-bit and 32-bit VM, with between 768 and about 1250 MB
of RAM allocated to the VM, and it consistently fails while compiling
base3.c from pari (src/basemath/base3.c).

When it gets to base3, the compiler gradually uses up more and more
memory, until it either gets killed by the kernel OOM stuff, or dies
with "gcc: Internal error: Killed (program cc1)".

This is with 4.1.2.alpha1, but the same behavior occurred with 4.1.1. In
Karmic, the compiler is:

$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.4.1-3ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --enable-multiarch --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4
--program-suffix=-4.4 --enable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-objc-gc
--enable-targets=all --disable-werror --with-arch-32=i486
--with-tune=generic --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-3ubuntu3)

On a current Ubuntu Hardy system (like sage.math, but a 32-bit VM with
768 MB RAM) the compiler goes through base3.c with no trouble.

Can anyone else confirm (or perhaps even fix) this?

Dan

--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------

signature.asc

Minh Nguyen

unread,
Sep 10, 2009, 4:23:02 AM9/10/09
to sage-...@googlegroups.com
Hi Dan,

On Thu, Sep 10, 2009 at 5:48 PM, Dan Drake <dr...@kaist.edu> wrote:

<SNIP>

> Can anyone else confirm (or perhaps even fix) this?

Jaap Spies reported the same error when compiling Sage 4.1.2.alpha0 on
32-bit Fedora 11. See

http://groups.google.com/group/sage-devel/browse_thread/thread/2ea99a973a54581c/41944cbfee79bcf8

--
Regards
Minh Van Nguyen

Dan Drake

unread,
Sep 10, 2009, 4:42:09 AM9/10/09
to sage-...@googlegroups.com
I tried the compilation on an Arch Linux VM with gcc 4.4.1 and it worked
fine. So this is something related to Ubuntu's and Fedora's gcc
packages.
signature.asc

William Stein

unread,
Sep 10, 2009, 11:17:31 AM9/10/09
to sage-...@googlegroups.com

This is a GCC bug which has been discussed a lot on the Pari listed,
and reported in at least three places to GCC and Ubuntu. The only
stated workaround at present is to build pari with -O0 instead of -O3:

http://www.nabble.com/Ubuntu-9.10-and-gcc-4.4-failure-td24853751.html

William

William

Jason Grout

unread,
Sep 10, 2009, 11:55:00 AM9/10/09
to sage-...@googlegroups.com

Following the links leads to this bug report:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41101#c23

which indicates that this may have been fixed yesterday in the GCC trunk.

Jason

Tan Swee Heng

unread,
Sep 10, 2009, 10:04:09 PM9/10/09
to sage-...@googlegroups.com
A quick fix I used was to change OPTFLAGS=-O3 in PARI's get_cc script to OPTFLAGS=-O1. I wrote down the specific steps here: <http://thesweeheng.wordpress.com/2009/08/28/building-sage-4-1-1-on-fedora-11/>. Hope that helps.

Swee Heng

J Elaych

unread,
Sep 12, 2009, 6:00:25 PM9/12/09
to sage-devel
The problem is now fixed with the latest gcc/g++ in Ubuntu Karmic.
>  signature.asc
> < 1KViewDownload
Reply all
Reply to author
Forward
0 new messages