[Numpy-discussion] building numpy with atlas on ubuntu edgy

Charles R Harris charlesr.harris at gmail.com
Wed Apr 18 22:57:14 EDT 2007


On 4/18/07, David Cournapeau <david at ar.media.kyoto-u.ac.jp> wrote:
>
> Robert Kern wrote:
> > Charles R Harris wrote:
> >
> >
> >> I don't know which is best, although I suspect the statically linked
> >> version will be larger. It might seem that just pulling in the gemm
> >> routines wouldn't add much, but they pull in lots of supporting
> >> routines. To get numpy to link statically you will also probably need
> to
> >> have a directory that contains only the *.a versions because the linker
> >> will default to the *.so if they are present; i don't think there is a
> >> way to specify the -static flag to the gcc compiler. Maybe someone else
> >> knows how to do that.
> >>
> >
> > Not really. Since you are *making* a shared library, the flags are
> already set
> > to *look up* shared libraries. I do not believe they are overridable,
> much to my
> > frequent vexation.
> >
> I think there is a way, but not trivial. I had to do all kind of tricks
> to use fftw in mex (matlab extension written in C, practically
> dynamically loaded .so inside matlab), and linking statically some
> libraries was one of them. If you still need it (linking some libraries
> statically, other dynamically, to build a .so), I can try to dig in my
> matlab scripts (unused for some time thanks to scipy :) )


I'm wondering if the static libraries could simply be compiled with the
-fPIC flag and linked with the program to produce the dynamic library. The
static libraries are just collections of *.o files, so I don't see why that
shouldn't work.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070418/2d3c5d06/attachment.html>


More information about the NumPy-Discussion mailing list