LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2008, 01:58 AM   #1
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Rep: Reputation: 15
openldap make error 1


Hi all,

I am trying to compile openldap on my system and the following error results. Can someone help please.

[root@localhost openldap-2.3.42]# make
Making all in /root/openldap-2.3.42
Entering subdirectory include
make[1]: Entering directory `/root/openldap-2.3.42/include'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/openldap-2.3.42/include'

Entering subdirectory libraries
make[1]: Entering directory `/root/openldap-2.3.42/libraries'
Making all in /root/openldap-2.3.42/libraries
Entering subdirectory liblutil
make[2]: Entering directory `/root/openldap-2.3.42/libraries/liblutil'
rm -f version.c
../../build/mkversion -v "2.3.42" liblutil.a > version.c
gcc -g -O2 -I../../include -I../../include -I/usr/local/BerkeleyDB.4.5/include -c -o utils.o utils.c
gcc -g -O2 -I../../include -I../../include -I/usr/local/BerkeleyDB.4.5/include -c -o fetch.o fetch.c
fetch.c: In function âldif_open_urlâ:
fetch.c:52: warning: assignment discards qualifiers from pointer target type
gcc -g -O2 -I../../include -I../../include -I/usr/local/BerkeleyDB.4.5/include -c -o getpeereid.o getpeereid.c
getpeereid.c: In function âgetpeereidâ:
getpeereid.c:52: error: storage size of âpeercredâ isnât known
make[2]: *** [getpeereid.o] Error 1
make[2]: Leaving directory `/root/openldap-2.3.42/libraries/liblutil'
make[1]: *** [all-common] Error 1
make[1]: Leaving directory `/root/openldap-2.3.42/libraries'
make: *** [all-common] Error 1
[root@localhost openldap-2.3.42]#
 
Old 06-11-2008, 02:16 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Did you run
Code:
make depend
before running "make"?
 
Old 06-11-2008, 03:01 AM   #3
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Original Poster
Rep: Reputation: 15
yes i have run make depend before make
 
Old 06-11-2008, 03:03 AM   #4
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Original Poster
Rep: Reputation: 15
1 more thing is, i see openldap installed already on my fedora core 9 installation but i do not see slapd. Is my opendldap software installed properly? or do i need to install it agian?
 
Old 06-11-2008, 03:21 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
About the error you get:
I think you've hit this bug. Use the patch proposed to see if it works. Or you can use openldap 2.4.10 to see if it works.
About Fedora's openldap:
I don't use Fedora, but I think you mean the Directory Server that comes with Fedora and RH.

Regards
 
Old 06-11-2008, 05:04 AM   #6
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Original Poster
Rep: Reputation: 15
Smile

this patch, how should i apply? Please guide.
yes about the fedora, it came with that particular package which doesn't contain slapd.
Thanks a lot for your quick reply
 
Old 06-11-2008, 05:27 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Create a file e.g. opeldap.patch into /root/openldap-2.3.42 (I guess you've extracted the openldap.tgz there) containing:
Quote:
--- openldap-2.3.42.orig/libraries/liblutil/getpeereid.c
+++ openldap-2.3.42/libraries/liblutil/getpeereid.c
@@ -14,6 +14,8 @@
* <http://www.OpenLDAP.org/license.html>.
*/

+#define _GNU_SOURCE
+
#include "portable.h"

#ifndef HAVE_GETPEEREID
Then run:
Code:
patch -Np1 -i opeldap.patch
Run "make distclean" and start from the beginning with ./configure etc.
 
Old 06-11-2008, 08:20 AM   #8
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Original Poster
Rep: Reputation: 15
While applying patch, i got this error

[root@localhost openldap-2.3.39]# patch -Np1 -i openldap.patch
patching file libraries/liblutil/getpeereid.c
patch: **** malformed patch at line 4: * <http://www.OpenLDAP.org/license.html>.

[root@localhost openldap-2.3.39]#
 
Old 06-11-2008, 08:36 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
My fault. The QUOTE tag does not keep the spaces. There are 2 spaces in the beginning of lines 4,5 (those staring with the *)
See if this is better
Code:
--- openldap-2.4.8.orig/libraries/liblutil/getpeereid.c
+++ openldap-2.4.8/libraries/liblutil/getpeereid.c
@@ -14,6 +14,8 @@
  * <http://www.OpenLDAP.org/license.html>.
  */
 
+#define _GNU_SOURCE
+
 #include "portable.h"
 
 #ifndef HAVE_GETPEEREID
What version are you trying to install btw. Because in you first post the prompt is "root@localhost openldap-2.3.42" and now it is "root@localhost openldap-2.3.39". Why don't you try to install the 2.4.10?

Last edited by bathory; 06-11-2008 at 08:43 AM.
 
Old 06-12-2008, 01:22 AM   #10
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Original Poster
Rep: Reputation: 15
sorry for the confusion in the version. First in installed the 2.4 version but i found the latest stable version is 2.3.39 so i guessed that could be the problem and installed the old one. Is it okay if i try 2.3.42?
 
Old 06-12-2008, 01:38 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I think using the latest release is better, since it resolves various problems (either bugs or security issues). You can read here the changes of 2.4.x branch.
Anyway, did you managed to patch getpeereid.c and build the sources?
 
Old 06-12-2008, 02:30 AM   #12
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Original Poster
Rep: Reputation: 15
Thumbs up

THANKS A TON!!!!

Its working now . Now, can you tell me what this code is? I mean what does that --- and +++ mean? i can make out something like add the lines beginning with +?

Again, Thank you very much...
 
Old 06-12-2008, 02:32 AM   #13
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Original Poster
Rep: Reputation: 15
yes i've installed the latest version again openldap-2.4.10. And i patched it also with the given patch.
 
Old 06-12-2008, 02:56 AM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
THANKS A TON!!!!

Its working now . Now, can you tell me what this code is? I mean what does that --- and +++ mean? i can make out something like add the lines beginning with +?
Glad to see you've made it.
Now about the code in the patch file: --- means the original file and +++ the patched file. The numbers between the @@ are the line numbers to change and + mean add what follows (a "-" mean remove).
You could add just the line "#define _GNU_SOURCE" followed by a blank line to get the same result.
Btw what is your distro, that has this problem?
 
Old 06-12-2008, 03:59 AM   #15
ikinnu
Member
 
Registered: Jun 2007
Posts: 64

Original Poster
Rep: Reputation: 15
The distro is Fedora core 9.
 
  


Reply



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 error ldapadd: Undefined attribute type (17) gergaholic Linux - Server 2 11-11-2007 03:03 AM
OpenLDAP ldapadd command error. vedang Linux - Server 1 09-08-2007 05:36 AM
RH9 make menuconfig error: make[1]: *** [lxdialog] Error 1 rrochele Linux - Kernel 3 02-07-2007 03:39 PM
OpenLDAP Authentication error paul_mat Linux - Networking 1 07-18-2005 12:48 AM
LAMP with OpenLdap-Support; Bug//Funny error // SOLVED Trucker Linux - Software 0 02-27-2003 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:48 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
Open Source Consulting | Domain Registration