installation without root problem

789 views
Skip to first unread message

Piet Jones

unread,
Dec 12, 2012, 10:02:59 AM12/12/12
to pygraphvi...@googlegroups.com
Hi, 

I am having trouble installing pygraphviz on a computer cluster running open suse, bare in mind I have no root privileges at all.

I am trying to use networkx, which gave me some problem with edge attributes not being found, the suggested solution was to install the latest pygraphviz, for which I first needed
to install Graphviz (which was a nightmare, but it seems to be installed now). So the current problem is that gcc is looking for two 'things' when trying to install. I have no idea what they
are, what they do, if I actually have them installed but the code is just not looking in the right place or if I need to install some misc something. Here is the error report:

14657880@head002:~/Transfer/pygraphviz-1.1> python setup.py install
library_path=/export/home/14657880/.local/bin/graphviz/lib/graphviz
include_path=/export/home/14657880/.local/bin/graphviz/include/graphviz
running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC -I/export/home/14657880/.local/bin/graphviz/include/graphviz -I/usr/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-2.7/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c: In function âagattr_labelâ:
pygraphviz/graphviz_wrap.c:2855:5: warning: return makes integer from pointer without a cast
gcc -pthread -shared build/temp.linux-x86_64-2.7/pygraphviz/graphviz_wrap.o -L/export/home/14657880/.local/bin/graphviz/lib/graphviz -L. -Wl,-R/export/home/14657880/.local/bin/graphviz/lib/graphviz -lcgraph -lcdt -lpython2.7 -o build/lib.linux-x86_64-2.7/pygraphviz/_graphviz.so
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lcgraph
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lcdt
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1


I altered the setup.py file, by uncommenting the appropriate lines, so that it can find Graphviz. I have googled and googled, but I have not found anything that can remotely help (apart from this discussion board). 

Any advice?

Piet

Aric Hagberg

unread,
Dec 12, 2012, 12:14:19 PM12/12/12
to pygraphvi...@googlegroups.com
The installation script is not finding the graphviz development
libraries libcdt and libcgraph. On my Ubuntu system they are

$ ls -l /usr/lib/libcdt*
lrwxrwxrwx 1 root root 15 Apr 2 2012 /usr/lib/libcdt.so.4 ->
libcdt.so.4.0.0
-rw-r--r-- 1 root root 22656 Apr 2 2012 /usr/lib/libcdt.so.4.0.0
$ ls -l /usr/lib/libcgraph*
lrwxrwxrwx 1 root root 18 Apr 2 2012 /usr/lib/libcgraph.so.5 ->
libcgraph.so.5.0.0
-rw-r--r-- 1 root root 86288 Apr 2 2012 /usr/lib/libcgraph.so.5.0.0

Aric

Piet Jones

unread,
Dec 12, 2012, 2:00:16 PM12/12/12
to pygraphvi...@googlegroups.com
Hi Aric,

Thanks for the response, yes I have them too they are in ~/.local/bin/graphviz/lib

how do I point the installer in the right direction?

Kind Regards,
Piet

Aric Hagberg

unread,
Dec 12, 2012, 2:21:01 PM12/12/12
to pygraphvi...@googlegroups.com
On Wed, Dec 12, 2012 at 12:00 PM, Piet Jones <piet...@gmail.com> wrote:
> Hi Aric,
>
> Thanks for the response, yes I have them too they are in
> ~/.local/bin/graphviz/lib
>
> how do I point the installer in the right direction?

By setting the variables like you did:

library_path=/export/home/14657880/.local/bin/graphviz/lib/graphviz
include_path=/export/home/14657880/.local/bin/graphviz/include/graphviz

(assuming those are right, they should have the .so files).

I suppose there could be a 32/64 bit issue? Are you using 64 bit python?

Aric

Piet Jones

unread,
Dec 12, 2012, 2:32:14 PM12/12/12
to pygraphvi...@googlegroups.com
Hi Aric,

I solved it just as you posted your reply :)

It was the variables you mentioned. It was just the hint in the setup file that threw me off, the setup file give default values
/usr/local/lib/graphviz
/usr/local/include/graphviz

so I naturally assumed it would be for me
~/.local/bin/graphviz/lib/graphviz
~/.local/bin/graphviz/include/graphviz
because that is i installed it in ~/.local/bin/graphviz
but the solution was actually the following (which I got by pure chance)
~/.local/bin/graphviz/lib
~/.local/bin/graphviz/include/graphviz

Thank you so much for the help, I generally have problems with libraries that a setup file does not pick up, and I never know how to point the thing in the right direction. So glad this one is solved.

Thanks again.

Kind Regards,
Piet Jones
Reply all
Reply to author
Forward
0 new messages