LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-28-2011, 06:20 AM   #1
fwellers
Member
 
Registered: Dec 2011
Posts: 32

Rep: Reputation: Disabled
install openldap berkley version errors


I hope this is the right place to post this and that I can get some help. I pretty much suck at troubleshooting build issues.
we are running oracle red-hat linux 2.6.32-200.20.1.el5uek #1 SMP Fri Oct 7 02:29:42 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

trying to build the latest stable version of openldap ( 2.4.23 )

When running configure I keep getting a version error for berkely db.
checking for db.h... yes
checking for Berkeley DB major version in db.h... 4
checking for Berkeley DB minor version in db.h... 3
checking if Berkeley DB version supported by BDB/HDB backends... no
configure: error: BerkeleyDB version incompatible with BDB/HDB backends

I've read what I can on the forums but with my limited knowledge of how configure works I am still at a loss.

I downloaded and built the lastest version of berkley db (5.3.15). It still failed.
I exported LD_LIBRARY_PATH to point to the berkely db lib directory. It still failed.

Can someone help me or point me in the right direction please ?

Thanks,
floyd
 
Old 12-28-2011, 07:08 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Hi and welcome to LQ,

For the ./configure script to find the correct BerkeleyDB, you need to add the following:
Code:
LDFLAGS=-L/usr/local/BerkeleyDB.5.3/lib CPPFLAGS="-D_GNU_SOURCE -I/usr/local/BerkeleyDB.5.3/include" ./configure --(add any options you want)
Of course you must change the path to BerkeleyBD accordingly if it's not installed under /usr/local/BerkeleyDB.5.3

Regards
 
Old 12-28-2011, 07:30 AM   #3
fwellers
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi and welcome to LQ,

For the ./configure script to find the correct BerkeleyDB, you need to add the following:
Code:
LDFLAGS=-L/usr/local/BerkeleyDB.5.3/lib CPPFLAGS="-D_GNU_SOURCE -I/usr/local/BerkeleyDB.5.3/include" ./configure --(add any options you want)
Of course you must change the path to BerkeleyBD accordingly if it's not installed under /usr/local/BerkeleyDB.5.3

Regards
Thank you very much. I think that helped, as I got a bit farther now but still complaining about Berkley.
Here's my message now.

checking for db.h... yes
checking for Berkeley DB major version in db.h... 5
checking for Berkeley DB minor version in db.h... 3
checking if Berkeley DB version supported by BDB/HDB backends... yes
checking for Berkeley DB link (default)... no
configure: error: BDB/HDB: BerkeleyDB not available

Do I have to do some linking of the berkely db I installed ?

Thank You !
Floyd
 
Old 12-28-2011, 08:00 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Hi,

According to this, you need a 4.x version of BerkeleyDB.
FYI, I'm using 4.8.24 with the latest openldap 2.4.28 and it works fine.

Regards
 
Old 12-28-2011, 08:10 AM   #5
fwellers
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

According to this, you need a 4.x version of BerkeleyDB.
FYI, I'm using 4.8.24 with the latest openldap 2.4.28 and it works fine.

Regards
Much obliged. I will give that a try and report back.

Thank you,
Floyd
 
Old 12-28-2011, 08:34 AM   #6
fwellers
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

According to this, you need a 4.x version of BerkeleyDB.
FYI, I'm using 4.8.24 with the latest openldap 2.4.28 and it works fine.

Regards
Oh well, still doesn't work.
I downloaded and installed Berkeley DB 4.7.25, and ran LDFLAGS=-L/usr/local/BerkeleyDB.4.7/lib CPPFLAGS="-D_GNU_SOURCE -I/usr/local/BerkeleyDB.4.7/include" ./configure

Now I am getting this:
checking for db.h... yes
checking for Berkeley DB major version in db.h... 4
checking for Berkeley DB minor version in db.h... 7
checking if Berkeley DB version supported by BDB/HDB backends... yes
checking for Berkeley DB link (-ldb-4.7)... yes
checking for Berkeley DB library and header version match... no
configure: error: Berkeley DB version mismatch


I see in the configure log that it's failing here.

./conftest: error while loading shared libraries: libdb-4.7.so: cannot open shared object file: No such file or directory
configure:28943: $? = 127


Wonder why that .so file isn't found , since it's there, as evidenced by this:
ls -lL /usr/local/BerkeleyDB.4.7/lib
total 8760
-rw-r--r-- 1 root root 2272180 Dec 28 09:20 libdb-4.7.a
-rw-r--r-- 1 root root 821 Dec 28 09:19 libdb-4.7.la
-rwxr-xr-x 1 root root 1463493 Dec 28 09:19 libdb-4.7.so
-rwxr-xr-x 1 root root 1463493 Dec 28 09:19 libdb-4.so
-rw-r--r-- 1 root root 2272180 Dec 28 09:20 libdb.a
-rwxr-xr-x 1 root root 1463493 Dec 28 09:19 libdb.so


Thank you,
Floyd
 
Old 12-28-2011, 08:53 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Quote:
configure: error: Berkeley DB version mismatch
I guess you have a /usr/include/db.h that is a symlink pointing to a different BerkeleyDB (maybe the one came with your system).
You can change the symlink to point to /usr/local/BerkeleyDB.4.7include/db.h. After the build is finished you should undo that change, because it may harm other system components

Regards
 
Old 12-28-2011, 09:05 AM   #8
fwellers
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
I guess you have a /usr/include/db.h that is a symlink pointing to a different BerkeleyDB (maybe the one came with your system).
You can change the symlink to point to /usr/local/BerkeleyDB.4.7include/db.h. After the build is finished you should undo that change, because it may harm other system components

Regards
Thanks. That's not it.
I relinked the db.h in /usr/include to point to the 4.7 one. Same exact error.
Then I even replaced the original link and copied over the newer db.h to that location, just to see.
Same exact error.

Why can't it find that lib.so file ?

Must be something simple that I'm missing.

Thank you !

Floyd
 
Old 12-28-2011, 09:20 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
The version mismatch is because it's reading the version from the db.h and the symlink trick should have worked.
Anyway, you can add /usr/local/BerkeleyDB.4.7/lib on top of /etc/ld.so.conf and run as root
Code:
ldconfig
Also check your LD_LIBRARY_PATH and make sure it points to the correct BerkeleyDB
 
Old 12-28-2011, 09:24 AM   #10
fwellers
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
The version mismatch is because it's reading the version from the db.h and the symlink trick should have worked.
Anyway, you can add /usr/local/BerkeleyDB.4.7/lib on top of /etc/ld.so.conf and run as root
Code:
ldconfig
Also check your LD_LIBRARY_PATH and make sure it points to the correct BerkeleyDB
OOOOH Yeaaaaaa!!!

Thanks so so much.
Can't say that I won't have more issues, but adding the Berkely path back to the LD_LIBRARY_PATH got me through the configure.
I had it there before, when under the 5.3 version.

Thanks for sticking with me Bathory.
 
Old 12-28-2011, 11:04 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Glad to see it worked
You may mark the thread "Solve" using the "Thread Tools" on top of the page.

Regards
 
Old 12-28-2011, 11:33 AM   #12
fwellers
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
help starting slapd

Hello,
I'm pretty new to openldap. We have had an instance of slap running for Aix in the past, using symas version of ldap.
Now I am trying to get openldap version 2.4.23 running on Linux.
we are running oracle red-hat linux 2.6.32-200.20.1.el5uek #1 SMP Fri Oct 7 02:29:42 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

I built the openldap with the default options for configure ( except for pointing it to a new Berkley db.

I went into /usr/openldap-2.4.23/servers/slapd and edited the slapd.conf file to tell it about our database and the schema we want to use.

I would think that I just need to run slapd now in order to initialize the database, but when I run /usr/openldap-2.4.23/servers/slapd/slapd nothing happens.

Can someone point me in the right direction here ?

Thank you,
Floyd
 
Old 12-28-2011, 11:54 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Quote:
I would think that I just need to run slapd now in order to initialize the database, but when I run /usr/openldap-2.4.23/servers/slapd/slapd nothing happens.
Are you sure it's not running? What gives:
Code:
ps -ef|grep slapd
BTW, you should run "make install" after running "make" to install the various openldap files in their correct location.
 
Old 12-28-2011, 12:36 PM   #14
fwellers
Member
 
Registered: Dec 2011
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Are you sure it's not running? What gives:
Code:
ps -ef|grep slapd
BTW, you should run "make install" after running "make" to install the various openldap files in their correct location.
Thanks.
I did run make install, now I went and started everything again.
I did a make clean and a rebuild of berkley bd,
then I did a configure, make depend on ldap.
Now I am running a make test and it hangs right here:
>>>>> Starting test001-slapadd for bdb...
running defines.sh
Running slapadd to build slapd database...

a ps -ef|grep make yields this

root 10569 25153 0 13:25 pts/1 00:00:00 make test
root 10570 10569 0 13:25 pts/1 00:00:00 /bin/sh -c cd tests; make test
root 10571 10570 0 13:25 pts/1 00:00:00 make test
root 10572 10571 0 13:25 pts/1 00:00:00 make bdb

a ps -ef|grep ldap, yields this:
root 10841 10591 0 13:25 pts/1 00:00:00 /bin/sh ./scripts/test001-slapadd
root 10857 10841 0 13:25 pts/1 00:00:00 /usr/openldap-2.4.23/tests/../servers/slapd/slapd -Ta -d 0 -f /usr/openldap-2.4.23/tests/testrun/slapadd.conf -l ./testdata/test-ordered.ldif


I tried an strace on all those processes. They all say:
Process 10570 attached - interrupt to quit
wait4(-1,

The only one that says something a little different is process 10857 which shows this:

[root@prod-meteor1v4 floydw]# strace -p 10857
Process 10857 attached - interrupt to quit
futex(0x7f7d1fbfd924, FUTEX_WAIT, 1, NULL


So something is hanging, but why I don't know.

Thank you !
Floyd
 
Old 12-28-2011, 12:58 PM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
make test can take a good amount of time to complete, so I tend to skip this step
Quote:
I did run make install, now I went and started everything again.
I did a make clean and a rebuild of berkley bd,
then I did a configure, make depend on ldap.
Now I am running a make test and it hangs right here:
If you want to rebuild a program compiled from sources, it's always better to run "make distclean" and if that's not available to run "make clean". And you should do this for both BerkeleyDB and openldap.
BTW since you're doing all this, I suggest you to use the latest openldap-2.4.28
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenLDAP complains of Berkeley DB version mismatch [GOD]Anck Slackware 7 06-08-2009 01:54 AM
Version incompatible (OpenLDAP) Hawkin Linux - Software 16 06-20-2008 04:08 AM
OpenLDAP with ssl version compatability Vikas Sarin Linux - Networking 0 12-17-2006 08:46 PM
Openldap BerkeleyDB version imcompatible kgao Linux - Software 3 04-12-2005 07:26 PM
Segmentation fault after OpenLDAP / Berkley DB (Slackware 8.1) cereal Linux - General 0 07-17-2003 12:34 PM


All times are GMT -5. The time now is 08:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration