Singular and Symmetric don't build on Ubuntu Oneiric (11.10)

106 views
Skip to first unread message

Dan Drake

unread,
Sep 1, 2011, 3:07:38 AM9/1/11
to sage-...@googlegroups.com
I installed the current alpha version of Ubuntu Oneiric (11.10) into a
virtual machine to see if Sage builds on it. Unfortunately, it doesn't.

My virtual machine is a 32-bit machine with 1 gigabyte of RAM, and uses
gcc 4.6.1. Most of Sage 4.7.2.alpha2 built with no problem, but Singular
and Symmetrica both failed. The Symmetrica failure is a linker problem
(I think); the Singular one is a mystery to me.

Attached are logs for "./sage -f spkg/standard/...". Any ideas what's
going on?

Dan

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

singular-install.log.gz
symmetrica-install.log.gz
signature.asc

leif

unread,
Sep 1, 2011, 3:28:52 AM9/1/11
to sage-devel
On 1 Sep., 09:07, Dan Drake <dr...@kaist.edu> wrote:
> I installed the current alpha version of Ubuntu Oneiric (11.10) into a
> virtual machine to see if Sage builds on it. Unfortunately, it doesn't.
>
> My virtual machine is a 32-bit machine with 1 gigabyte of RAM, and uses
> gcc 4.6.1. Most of Sage 4.7.2.alpha2 built with no problem, but Singular
> and Symmetrica both failed. The Symmetrica failure is a linker problem
> (I think); the Singular one is a mystery to me.
>
> Attached are logs for "./sage -f spkg/standard/...". Any ideas what's
> going on?

Stricter linker semantics, already known. (See also #11674, where
someone else tried the same.)

For symmetrica, '-lm' has to be moved, but there's actually already a
new spkg which removes the test executable completely, and thereby
also the (need for the) '-lm'; see .

The problem with Singular is the order of '-ldl' and '-lkernel'; the
latter uses the former, so the order has to be flipped. Haven't yet
checked whether this is already fixed in a *current* upstream release
(we're still at 3-1-1-4, upstream is 3-1-3 IIRC). Hopefully Sage's
version will be upgraded during Sage/Singular Days (SD34) at the end
of this month.

An ugly work-around is to set LDFLAGS

-leif

>
> Dan
>
> --
> ---  Dan Drake
> -----  http://mathsci.kaist.ac.kr/~drake
> -------
>
>  singular-install.log.gz
> 24KAnzeigenHerunterladen
>
>  symmetrica-install.log.gz
> 4KAnzeigenHerunterladen
>
>  signature.asc
> < 1 KBAnzeigenHerunterladen

leif

unread,
Sep 1, 2011, 3:35:42 AM9/1/11
to sage-devel
No idea why Google posted this by itself... 8/

On 1 Sep., 09:28, leif <not.rea...@online.de> wrote:
> On 1 Sep., 09:07, Dan Drake <dr...@kaist.edu> wrote:
>
> > I installed the current alpha version of Ubuntu Oneiric (11.10) into a
> > virtual machine to see if Sage builds on it. Unfortunately, it doesn't.
>
> > My virtual machine is a 32-bit machine with 1 gigabyte of RAM, and uses
> > gcc 4.6.1. Most of Sage 4.7.2.alpha2 built with no problem, but Singular
> > and Symmetrica both failed. The Symmetrica failure is a linker problem
> > (I think); the Singular one is a mystery to me.
>
> > Attached are logs for "./sage -f spkg/standard/...". Any ideas what's
> > going on?
>
> Stricter linker semantics, already known. (See also #11674, where
> someone else tried the same.)
>
> For symmetrica, '-lm' has to be moved, but there's actually already a
> new spkg which removes the test executable completely, and thereby
> also the (need for the) '-lm'; see .

See #10719 (IMHO needs work).


> The problem with Singular is the order of '-ldl' and '-lkernel'; the
> latter uses the former, so the order has to be flipped. Haven't yet
> checked whether this is already fixed in a *current* upstream release
> (we're still at 3-1-1-4, upstream is 3-1-3 IIRC). Hopefully Sage's
> version will be upgraded during Sage/Singular Days (SD34) at the end
> of this month.
>
> An ugly work-around is to set LDFLAGS

... to "-ldl". (A bit strange that this works.)


Sorry for the duplicate post, no idea what happened there.


-leif

Dan Drake

unread,
Sep 1, 2011, 6:51:38 AM9/1/11
to sage-...@googlegroups.com
On Thu, 01 Sep 2011 at 12:35AM -0700, leif wrote:
> No idea why Google posted this by itself... 8/
>
> On 1 Sep., 09:28, leif <not.rea...@online.de> wrote:
> > For symmetrica, '-lm' has to be moved, but there's actually already a
> > new spkg which removes the test executable completely, and thereby
> > also the (need for the) '-lm'; see .
>
> See #10719 (IMHO needs work).

Interesting. Looks like I did the same thing 6 months ago with the
previous Ubuntu and ran into similar problems!

Anyway, good to know that the problems are minor.

> > The problem with Singular is the order of '-ldl' and '-lkernel'; the
> > latter uses the former, so the order has to be flipped. Haven't yet
> > checked whether this is already fixed in a *current* upstream release
> > (we're still at 3-1-1-4, upstream is 3-1-3 IIRC). Hopefully Sage's
> > version will be upgraded during Sage/Singular Days (SD34) at the end
> > of this month.
> >
> > An ugly work-around is to set LDFLAGS
>
> ... to "-ldl". (A bit strange that this works.)

I'll file a ticket anyway; if it has been fixed upstream, we'll just
close it when we upgrade the spkg.

signature.asc

jlh

unread,
Sep 1, 2011, 3:25:13 PM9/1/11
to sage-devel


On Sep 1, 12:28 am, leif <not.rea...@online.de> wrote:
> On 1 Sep., 09:07, Dan Drake <dr...@kaist.edu> wrote:
>
> > I installed the current alpha version of Ubuntu Oneiric (11.10) into a
> > virtual machine to see if Sage builds on it. Unfortunately, it doesn't.
>
> > My virtual machine is a 32-bit machine with 1 gigabyte of RAM, and uses
> > gcc 4.6.1. Most of Sage 4.7.2.alpha2 built with no problem, but Singular
> > and Symmetrica both failed. The Symmetrica failure is a linker problem
> > (I think); the Singular one is a mystery to me.
>
> > Attached are logs for "./sage -f spkg/standard/...". Any ideas what's
> > going on?
>
> Stricter linker semantics, already known. (See also #11674, where
> someone else tried the same.)
>

For singular, it gets worse. The last time I fixed the linker problem
and
got past that first fail, it generated segmentation faults on a
couple
other source files. I managed to fix those problems by changing the
compiler option to 'gcc -O2' from '-O3', and successfully built
Singular.

I opened a ticket at the Singular site,
"#353: gcc-4.6.1 compile segmentation fault", but later got a reply
from the Singular folks that "it looks like a gcc problem, please
notify gcc ..." so I don't think they're working on it. I've noticed
that
gcc-4.6 and/or the libc files for Ubuntu 11.10 get updated frequently,
so I try to rebuild after every update, but so far they haven't fixed
whatever fails.

John


#353: gcc-4.6.1 compile segmentation fault

leif

unread,
Sep 1, 2011, 3:40:24 PM9/1/11
to sage-devel
On 1 Sep., 12:51, Dan Drake <dr...@kaist.edu> wrote:
> I'll file a ticket anyway; if it has been fixed upstream, we'll just
> close it when we upgrade the spkg.

That's http://trac.sagemath.org/sage_trac/ticket/11769 .


-leif

Dan Drake

unread,
Sep 2, 2011, 3:52:18 AM9/2/11
to sage-...@googlegroups.com
On Thu, 01 Sep 2011 at 12:28AM -0700, leif wrote:
> For symmetrica, '-lm' has to be moved, but there's actually already a
> new spkg which removes the test executable completely, and thereby
> also the (need for the) '-lm'; see .
>
> The problem with Singular is the order of '-ldl' and '-lkernel'; the
> latter uses the former, so the order has to be flipped. Haven't yet
> checked whether this is already fixed in a *current* upstream release
> (we're still at 3-1-1-4, upstream is 3-1-3 IIRC). Hopefully Sage's
> version will be upgraded during Sage/Singular Days (SD34) at the end
> of this month.
>
> An ugly work-around is to set LDFLAGS='ldl'

I can confirm that by using the LDFLAGS workaround and fiddling with the
Symmetrica makefile, both spkgs compile, and the resulting Sage build
passes all tests on my Oneiric VM.

signature.asc

jlh

unread,
Sep 2, 2011, 4:00:21 PM9/2/11
to sage-devel



> > An ugly work-around is to set LDFLAGS='ldl'
>
> I can confirm that by using the LDFLAGS workaround and fiddling with the
> Symmetrica makefile, both spkgs compile, and the resulting Sage build
> passes all tests on my Oneiric VM.
>
> Dan

My Singular (both the standalone and in Sage) still
breaks on the compiler segfaults I mentioned, on
a 64 bit amd64 phenom II. So we're still waiting
on the gcc-4.6.x folks for a fix.

John Hoebing

leif

unread,
Sep 2, 2011, 4:06:54 PM9/2/11
to sage-devel
I don't think Ubuntu 11.10 (final) will ship with a broken GCC.

(Other distros IMHO take less care of that, i.e. prefer shipping the
latest versions rather than [known-to-be-]stable ones.)


-leif

leif

unread,
Sep 2, 2011, 4:20:46 PM9/2/11
to sage-devel
Doesn't look like they've already fixed this upstream, at least not in
the latest stable release. (Haven't checked the svn, but also didn't
see anything related on their trac.)

It should be sufficient to check whether


export CFLAGS=-fPIC
export CXXFLAGS=-fPIC

wget http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/3-1-3/Singular-3-1-3-2.tar.gz
&&

tar xzf Singular-3-1-3-2.tar.gz &&

cd Singular-3-1-3/ &&
./configure --prefix=/tmp/foo &&
make


works to verify that this is still an issue, of course *without*
having LDFLAGS set to "-ldl". (Some other targets should fail in the
same way.)


-leif

leif

unread,
Sep 3, 2011, 3:24:56 AM9/3/11
to sage-devel
On 2 Sep., 22:20, leif <not.rea...@online.de> wrote:
> On 2 Sep., 09:52, Dan Drake <dr...@kaist.edu> wrote:
>
> > On Thu, 01 Sep 2011 at 12:28AM -0700, leif wrote:
> > > The problem with Singular is the order of '-ldl' and '-lkernel'; the
> > > latter uses the former, so the order has to be flipped. Haven't yet
> > > checked whether this is already fixed in a *current* upstream release
> > > (we're still at 3-1-1-4, upstream is 3-1-3 IIRC). Hopefully Sage's
> > > version will be upgraded during Sage/Singular Days (SD34) at the end
> > > of this month.
>
> > > An ugly work-around is to set LDFLAGS='ldl'
>
> > I can confirm that by using the LDFLAGS workaround and fiddling with the
> > Symmetrica makefile, both spkgs compile, and the resulting Sage build
> > passes all tests on my Oneiric VM.
>
> Doesn't look like they've already fixed this upstream, at least not in
> the latest stable release. (Haven't checked the svn, but also didn't
> see anything related on their trac.)


Also, the latest svn version doesn't fix this.

Upstream report: http://www.singular.uni-kl.de:8002/trac/ticket/368

Btw., I've set the upstream field on Sage's ticket to "Work-around
found. Bug reported upstream.". ;-)


-leif

john.hoebing

unread,
Sep 11, 2011, 12:58:06 AM9/11/11
to sage-devel

On Sep 2, 12:52 am, Dan Drake <dr...@kaist.edu> wrote:
> I can confirm that by using the LDFLAGS workaround and fiddling with the
> Symmetrica makefile, both spkgs compile, and the resulting Sage build
> passes all tests on my Oneiric VM.
>
> ---  Dan Drake
> -----  http://mathsci.kaist.ac.kr/~drake

I too can confirm that Symmetrica builds on amd64, gcc-4.6.2,
Ubuntu 11.10 64bit native with the '-lm' fix.

I sent an email to the maintainer of Symmetrica advising him of
the problem and of the fix. He asked if he should make the change
to the downloadable version from his site and I said of course,
so soon we should have a new official Symmetrica.

Meanwhile I opened a trac for this issue,
http://trac.sagemath.org/sage_trac/ticket/11788 .

John Hoebing

akm

unread,
Oct 15, 2011, 1:21:54 AM10/15/11
to sage-devel
Worked for me on Ubuntu 11.10 amd64 by doing `export LDFLAGS="-ldl"`
and swapping in the spkg found in this trac: http://trac.sagemath.org/sage_trac/ticket/10719

Best
Andrew Musselman

john.hoebing

unread,
Oct 15, 2011, 2:57:57 AM10/15/11
to sage-devel
Actually the latest sage-4.7.2.alpha4 no longer needs either
the '-lm' fix or the swapped symmetrica package; they've
both been fixed and build fine. Good job from the
sage build gurus!

The one remaining problem for some of us is the 'readline'
error during the 'R' build; its kinda fixable by doing
'rm ./local/lib/*readline*' and remaking, but then it uses
the system readline. Not optimal but its an issue
thats being tracked.

And, all of this on an amd64 phenom IIx6, release Oneiric 11.10.

John

bterwijn

unread,
Oct 25, 2011, 12:21:29 PM10/25/11
to sage-devel
I managed to build sage-4.7.1 on Ubuntu 11.10 Oneiric Ocelot using the
gcc-4.4 compiler. Maybe its helpful for others, this is what I did:

# install compiler
sudo apt-get install gcc-4.6 gcc-4.4-base gcc-4.4 g++-4.4 cpp-4.4
gfortran-4.4

# set up gcc alternatives
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6
100 --slave /usr/bin/cpp cpp /usr/bin/cpp-4.6 --slave /usr/bin/g++ g+
+ /usr/bin/g++-4.6-slave /usr/bin/gfortran gfortran /usr/bin/
gfortran-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4
80 --slave /usr/bin/cpp cpp /usr/bin/cpp-4.4 --slave /usr/bin/g++ g++ /
usr/bin/g++-4.4 --slave /usr/bin/gfortran gfortran /usr/bin/
gfortran-4.4

# now choose the gcc-4.4 alternative
sudo update-alternatives --config gcc

Now you can successfully build sage-4.7.1. Afterwards make sure you
switch back to the gcc-4.6 compiler using again:

sudo update-alternatives --config gcc

Regards,
Bas

RegB

unread,
Dec 1, 2011, 10:12:06 AM12/1/11
to sage-devel
It has worked for me too, on both VirtualBox in a 64 bit Vista host
and
on the same physical machine (AMD laptop) in its own partition.
I am currently trying to get a cantor front end working with
matplotlib,
but sage itself and the notebook work just fine.

I should add that as a total newbie I follow the install guide
TO THE LETTER !!! and don't skip any steps or make any assumptions.

I have had occasional hang ups, but overcame those by nullifying the
parallel build, I type;
export MAKE='make -j1'

Reply all
Reply to author
Forward
0 new messages