Post-installation python import error on Kubuntu

94 views
Skip to first unread message

s.

unread,
Sep 1, 2008, 7:02:14 AM9/1/08
to CVXOPT
Hi. I'm having some issues running the cvxopt-1.0 example script:
[...]cvxopt-1.0/examples/doc/chap8/lp
I tried to install cvxopt both using the Synaptic package manager, and
by a manual install fetched from the homepage: http://abel.ee.ucla.edu/cvxopt.

when running: python lp i get:
Traceback (most recent call last):
File "lp", line 5, in <module>
from cvxopt.base import matrix
File "/usr/lib/python2.5/site-packages/cvxopt/__init__.py", line 5,
in <module>
import base, printing
ImportError: /usr/lib/sse2/atlas/libblas.so.3gf: undefined symbol:
_gfortran_st_write_done

seemingly some compiler incompatibility issue is at stake - but how do
I work around this issue?

Thank you,
Simon

Joachim Dahl

unread,
Sep 1, 2008, 7:15:01 AM9/1/08
to cvx...@googlegroups.com
We develop CVXOPT on Ubuntu 8.04.  The Ubuntu package shows the
following dependencies on my machine:

$ apt-cache depends python-cvxopt
python-cvxopt
 |Depends: libblas3gf
 |Depends: <libblas.so.3gf>
    libatlas3gf-3dnow
    libatlas3gf-base
    libatlas3gf-sse
    libatlas3gf-sse2
    libblas3gf
  Depends: libatlas3gf-base
  Depends: libc6
  Depends: libdsdp-5.8gf
  Depends: libfftw3-3
  Depends: libglpk0
  Depends: libgsl0ldbl
 |Depends: liblapack3gf
 |Depends: <liblapack.so.3gf>
    libatlas3gf-3dnow
    libatlas3gf-base
    libatlas3gf-sse
    libatlas3gf-sse2
    liblapack3gf
  Depends: libatlas3gf-base
  Depends: python
  Depends: python
  Depends: python-central

Can you check you haven't somehow removed some of these dependencies?
As long as you install development versions of blas and lapack (ie, versions
with header files),  we've never experienced problems building from source.

And installing via synaptic should definitely work.

Joachim

s.

unread,
Sep 1, 2008, 7:31:24 AM9/1/08
to CVXOPT
I was missing this package,
libatlas3gf-3dnow
but chose not to install it in the first place since my cpu is a non-
AMD; I was told that during installation, just now, that this package
wouldn't be linked for the same reason.

running the example script still gives the same import error.

regards

Joachim Dahl

unread,
Sep 1, 2008, 7:42:49 AM9/1/08
to cvx...@googlegroups.com
You will have to install one of the candidates.  On my machine I just have
libblas3gf installed.    And if you build from source,   you need the version
with -dev postfix.

Joachim

s.

unread,
Sep 1, 2008, 8:02:05 AM9/1/08
to CVXOPT
Thanks for the rapid replys but, I tried these things out already, I
wouldn't be able to compile from source without the dev packages. And
compilation runs fine apart from a few warnings. But seemingly the
problem is as I stated initially in some binary incompatibility.
I looked up the error "undefined symbol: _gfortran_st_write_done" on
google and got a hit on the SciPy-user mailing list stating that it
might be caused by the libraries being compiled by different fortran
compilers, I find this hard to believe in this case as, everything was
tried installed using the Synaptic installer and I suppose that these
binaries all meet the same standards.

regards

On Sep 1, 1:42 pm, "Joachim Dahl" <dahl.joac...@gmail.com> wrote:
> You will have to install one of the candidates.  On my machine I just have
> libblas3gf installed.    And if you build from source,   you need the
> version
> with -dev postfix.
>
> Joachim
>

Joachim Dahl

unread,
Sep 1, 2008, 8:17:21 AM9/1/08
to cvx...@googlegroups.com
That is odd...   I just verified that python-cvxopt installed from synaptic
works on my machine (Ubuntu 8.04,  cvxopt 0.93).  

What version of Kubuntu are you using?

s.

unread,
Sep 1, 2008, 8:23:33 AM9/1/08
to CVXOPT
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.1
Release: 8.04
Codename: hardy

and i installed from source cvxopt-1.0 and via Synaptic: 0.9.3-1
(hardy)

Joachim Dahl

unread,
Sep 6, 2008, 4:12:03 AM9/6/08
to cvx...@googlegroups.com
Simon,

Unfortunately I don't have any ideas of what the problem might be,  and I am not able
reproduce it...

One thing you could try is this:
sudo apt-get build-dep python-cvxopt

to fetch the necessary libraries for building CVXOPT from scratch.  But you should
probably also file a bug-report as outlined here:
http://www.ubuntu.com/community/reportproblem

The Ubuntu packages should always work without manually installing libraries etc.
 
Joachim

Joachim Dahl

unread,
Sep 17, 2008, 11:30:07 AM9/17/08
to CVXOPT
can you try to add 'gfortran' to the list of libraries used for
building 'base', ie., modify
the line into:

base = Extension('base', libraries = ['gfortran', 'm','lapack','blas']

This could be a consequence of your libraries being build with a new
version of gcc. Perhaps we
need to modify the setup script for future releases of Linux based on
gcc-4.3.

On Sep 6, 10:12 am, "Joachim Dahl" <dahl.joac...@gmail.com> wrote:
> Simon,
>
> Unfortunately I don't have any ideas of what the problem might be,  and I am
> not able
> reproduce it...
>
> One thing you could try is this:
> sudo apt-get build-dep python-cvxopt
>
> to fetch the necessary libraries for building CVXOPT from scratch.  But you
> should
> probably also file a bug-report as outlined here:http://www.ubuntu.com/community/reportproblem
>
> The Ubuntu packages should always work without manually installing libraries
> etc.
>
> Joachim
>

s.

unread,
Sep 24, 2008, 6:55:31 AM9/24/08
to CVXOPT
That helped instantly! Thanks alot for your effort!

regards
Simon

s.

unread,
Sep 24, 2008, 7:11:35 AM9/24/08
to CVXOPT
Just for clarity; for future users.
modify 'setup.py' the line:
base = Extension('base', libraries = ['m','lapack','blas']
to
base = Extension('base', libraries = ['gfortran',
'm','lapack','blas']



Reply all
Reply to author
Forward
0 new messages