[OPEN-ILS-DEV] libmemcached

Dan Scott dan at coffeecode.net
Mon Dec 14 12:18:28 EST 2009


On Mon, 2009-12-14 at 09:06 -0800, Scott McKellar wrote:
> The introduction of libmemcached broke my build, and I haven't figured
> out how to fix it.
> 
> When I first tried to compile the new version of osrf_cache.c, the
> compiler couldn't find the header file memcached.h.  Adept, the
> package manager for my Ubuntu Hardy, didn't know about any packages
> named libmemcached or libmemcached-dev, but I managed to get past
> the compile by doing the following steps from the OSRF trunk directory, approximating a reinstall from scratch:
> 
>    .autogen.sh
>    make -f src/extras/Makefile.install ubuntu-hardy
> 
> Apparently that installed the header file in the expected place.
> Now I could do a .configure, a make, and a sudo make install without
> obvious problems, both for OSRF and for Evergreen.
> 
> However when I tried to start up the services, I got the following
> message:
> 
>    opensrf_router: error while loading shared libraries:
>    libmemcached.so.3: cannot open shared object file:
>    No such file or directory
> 
> I did a find, and sure enough there was no file by that name in the
> entire file system.  (In retrospect when I copy-and-pasted the file name
> into the find command I may have neglected to remove the colon, which
> would account for the failure of the find.  I can't reconstruct that
> now.) 

Right. "make -f Makefile.install ubuntu-hardy" would have downloaded,
compiled and installed libmemcached.so for you, so I bet you did have
the colon there.

> I went into trunk/libmemcached-0.35 and did a ./configure, a make, and a
> sudo make install.  Now there's a libmemcached.so.3 in /usr/local/lib,
> linked to libmemcached.so.3.0.0 and marked as executable by all, but
> the router still can't find it, even after another round of make and
> make install for both OSRF and Evergreen.
> 
> What am I missing?  Are the install scripts doing everything they need
> to do for libmemcached?

Sounds like you might need to add /usr/local/lib to your dynamic library
path and/or run ldconfig to ensure that the library gets found. If the
lack of /usr/local/lib is the problem, I bet I didn't see that on my
Debian Lenny test because I was testing the install of OpenSRF on a
server where Evergreen was already installed
(consequently, /usr/local/lib was already in the dynamic library path).



More information about the Open-ils-dev mailing list