CentOS 6 - Make system aware of custom lib paths and missing base links
Posted
by
Mike Purcell
on Server Fault
See other posts from Server Fault
or by Mike Purcell
Published on 2012-05-11T00:48:41Z
Indexed on
2012/05/31
22:42 UTC
Read the original article
Hit count: 438
I am trying to compile libmemcached (1.0.7) on CentOS6, and keep getting the following warning:
...
checking for event.h... no
configure: WARNING: Unable to find libevent
...
I manually compiled libevent (2.0.19) and built it using the following configure line:
OPTIONS="--prefix=/usr/local/_custom/app/libevent"
Everything compiled and installed fine, but I couldn't figure out how to make the system aware that the lib files are in the custom /usr/local/_custom/app/libevent/lib
dir. I stumbled upon an article and read that I can make the system aware of custom lib paths by adding a custom file to /etc/ld.so.conf.d/
directory:
# /etc/ld.so.conf.d/customApp.conf
/usr/local/_custom/app/libevent/lib
Then I issued the ldconfig
command and was able to confirm that libevent
was included by issuing this command:
ldconfig -p | ack -i libevent
Seeing that libevent was now included in the ldconfig output, I figured I would be able to compile libmemcached and satisfy the aforementioned warning. Unfortunately it did not. So I took another look at the ldconfig
output and noticed this:
libevent_pthreads-2.0.so.5 (libc6,x86-64) => /usr/local/_custom/app/libevent/lib/libevent_pthreads-2.0.so.5
libevent_openssl-2.0.so.5 (libc6,x86-64) => /usr/local/_custom/app/libevent/lib/libevent_openssl-2.0.so.5
libevent_extra-2.0.so.5 (libc6,x86-64) => /usr/local/_custom/app/libevent/lib/libevent_extra-2.0.so.5
libevent_core-2.0.so.5 (libc6,x86-64) => /usr/local/_custom/app/libevent/lib/libevent_core-2.0.so.5
libevent-2.0.so.5 (libc6,x86-64) => /usr/local/_custom/app/libevent/lib/libevent-2.0.so.5
There are no references to the base links, for example, I would expect to see links to these (ls -la /usr/local/_custom/app/libevent/lib
):
libevent.so -> libevent-2.0.so.5.1.7
libevent_openssl.so -> libevent_openssl-2.0.so.5.1.7
libevent_core.so -> libevent_core-2.0.so.5.1.7
So either I am doing something wrong, or the system still does not know where to look to find libevent.so
.
-- Update #1 --
I wasn't able to get libmemcached to compile without the warning notice, even after trying to compile using the following configure command:
./configure --prefix=/usr/local/_custom/app/libmemcached CFLAGS="-I/usr/local/_custom/app/libevent/include" LDFLAGS="-L/usr/local/_custom/app/libevent/lib"
I thought for sure this would work because I am directly passing the include and lib directories to the configure command. But it did not.
© Server Fault or respective owner