cvs commit: ports/graphics/py-graphviz Makefile
Volker Stolz
vs at FreeBSD.org
Wed Nov 2 02:31:52 PST 2005
Am 02. Nov 2005 um 10:45 CET schrieb Tilman Linneweh:
> * Volker Stolz [2005-11-02 09:30]:
> > > > arved 2005-11-01 14:18:52 UTC
> > > >
> > > > FreeBSD ports repository
> > > >
> > > > Modified files:
> > > > graphics/py-graphviz Makefile
> > > > Log:
> > > > Fix dependency on graphviz, the graphviz libraries are installed in a
> > > > non-default libdir, add BUILD_ and RUN_ dependendencies instead.
> > >
> > > Shouldn't graphviz be setting LDCONFIG_DIRS instead?
>
> Yes, that's the problem.
> According to perky, the graphviz port does not install a startup script,
> that sets LDCONFIG_DIRS, because the libraries have very common names.
This means that the python-binding will be broken anyway:
>>> from graphviz import *;
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/site-packages/graphviz/__init__.py", line 23, in ?
from graphviz import *
File "/usr/local/lib/python2.3/site-packages/graphviz/graphviz.py", line 5, in ?
import _graphviz
ImportError: Shared object "libagraph.so.0" not found, required by "_graphviz.so"
Having spent the last week in -rpath-hell anyway, how about this solution:
- ${CC} -shared ${LOCALBASE}/lib/graphviz/libagraph.so ${LOCALBASE}/lib/graphviz/libcdt.so gv_wrap.o -o _graphviz.so
+ ${LD} -shared -L${LOCALBASE}/lib/graphviz -rpath ${LOCALBASE}/lib/graphviz -lagraph -lcdt gv_wrap.o -o _graphviz.so
This makes the use-case above work again and doesn't require and ldconfig.
I'll check if there are any other consumers of graphviz' shlibs.
#readelf -a work/graphviz-0.1/_graphviz.so | grep PATH
0x0000000f (RPATH) Library rpath: [/usr/local/lib/graphviz]
# ldd work/graphviz-0.1/_graphviz.so
work/graphviz-0.1/_graphviz.so:
libagraph.so.0 => /usr/local/lib/graphviz/libagraph.so.0 (0x28119000)
libcdt.so.0 => /usr/local/lib/graphviz/libcdt.so.0 (0x28128000)
Volker
--
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
Receive and transmit
More information about the cvs-ports
mailing list