igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] [python?] unusual igraph installation; help?


From: Gábor Csárdi
Subject: Re: [igraph] [python?] unusual igraph installation; help?
Date: Sat, 9 Nov 2013 08:02:33 -0500

You can definitely do this, the only question is how much effort it
is. The C library used to be included in the Python (source) package
in the old days, which actually made installation easier.

So one way is to get igraph from github (the master or the develop
branch, depending on what you want), and hacking it together, i.e.
moving the files from /src to interfaces/python/src, probably by a
suitable Makefile.am. One difficulty is that there are subdirectories
in /src, and some stuff is optional. So this would require some
experimentation. And then you could just compile and install the
Python package the usual way.

The other way would be to just merge the results of the compilations,
the two (or more, actually) .a files into a single .so. See e.g.
http://stackoverflow.com/questions/915128/merge-multiple-so-shared-libraries
If this really works, then it seems to be the simpler way. E.g. these
are the .a files I have on my machines, after compilation:

~/works/igraph/github/src (develop)$ ls .libs/*.a
.libs/libarpack.a .libs/libf2c.a .libs/liblapack.a
.libs/libblas.a .libs/libglpk.a .libs/libplfit.a
.libs/libdlamch.a .libs/libigraph.a

You need to merge these with the .a from the Python interface.

Gabor


On Sat, Nov 9, 2013 at 7:15 AM, Zachary Spector
<address@hidden> wrote:
> So there's this user interface stack called Kivy. http://kivy.org/
>
> It has an unusual feature: it can deploy the same Python app to desktop
> platforms as well as Android and iOS. I'm trying to deploy a Kivy app to
> Android, and this app uses igraph.
>
> Of course that means I have to compile igraph for ARM processors--but I
> think I've already accomplished that. I only ran into trouble when I tried
> to import igraph in the Python interpreter running on my Android tablet. It
> *did* import--but then it informed me that it couldn't locate
> libigraph.so.0. I made extra sure that the name of the library matched, and
> that it was in the -- well, not actually the LD_LIBRARY_PATH, but the same
> directory where the rest of the app's shared object files already lived. I
> also tried putting it in the same directory as _igraph.so, which is the
> library wherein Python threw that error. No difference was made.
>
> I surmise that Android is only letting the Python process access shared
> objects "one level deep," and not letting it get any shared objects linked
> inside of those. I don't know whether this limitation is deliberate or what;
> maybe it's a bug in the particular build of Python.
>
> In any case, I think that if I could compile igraph *and* the Python API
> into the *same* shared object file, I could use it all the same. But I don't
> know how to do this, and I don't think the Makefiles have any provision for
> it. Feel free to correct me.
>
> So: how can I compile igraph and its Python bindings into _igraph.so, thus
> avoiding the link to libigraph.so.0?
>
> If you happen to know enough about Android to solve this another way, do
> tell.
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]