Issue 9478 - compilation issue of nssov overlay on master branch
Summary: compilation issue of nssov overlay on master branch
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: overlays (show other issues)
Version: 2.5.4
Hardware: x86_64 Linux
: --- normal
Target Milestone: 2.5.2
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-24 19:14 UTC by David Coutadeur
Modified: 2021-02-26 23:35 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Coutadeur 2021-02-24 19:14:17 UTC
I have compilation issues with nssov overlay on master branch.

Steps to reproduce:

1. Compile OpenLDAP:

./configure --prefix=/usr/local/openldap --libdir=/usr/local/openldap/lib64 --enable-overlays --enable-modules --enable-dynamic=yes --with-tls=openssl --enable-debug --with-cyrus-sasl --enable-spasswd --enable-ppolicy --enable-crypt --enable-ldap -enable-slapi --enable-meta --enable-sock --enable-wrappers --enable-rlookups

make depend
make

2. compile nssov:

cd contrib/slapd-modules/nssov/
make clean
make prefix=/usr/local/openldap

Console output: (truncated)

../../../libtool --mode=compile gcc -g -O2 -Wall  -I../../../include -I../../../include -I../../../servers/slapd -Inss-pam-ldapd -c alias.c
libtool: compile:  gcc -g -O2 -Wall -I../../../include -I../../../include -I../../../servers/slapd -Inss-pam-ldapd -c alias.c  -fPIC -DPIC -o .libs/alias.o
In file included from nssov.h:33,
                 from alias.c:23:
alias.c: In function ‘write_alias’:
nss-pam-ldapd/nslcd-prot.h:90:23: error: ‘errno’ undeclared (first use in this function)
     int saved_errno = errno;



3. Try to bypass first error:

make prefix=/usr/local/openldap DEFS=-DDEBUG_PROT

Console output (truncated):

In file included from ../../../servers/slapd/slap.h:49,
                 from nssov.h:44,
                 from nssov.c:24:
nssov.c: In function ‘nssov_db_open’:
../../../include/ldap_log.h:158:2: error: expected ‘;’ before ‘do’
  do { \
  ^~
../../../include/ldap_log.h:185:2: note: in expansion of macro ‘Log’
  Log((level), ldap_syslog_level, __VA_ARGS__ )
  ^~~
nssov.c:932:5: note: in expansion of macro ‘Debug’
     Debug( LDAP_DEBUG_ANY,"nssov: problem closing socket: %s",
     ^~~~~
../../../include/ldap_log.h:158:2: error: expected ‘;’ before ‘do’
  do { \
  ^~
../../../include/ldap_log.h:185:2: note: in expansion of macro ‘Log’
  Log((level), ldap_syslog_level, __VA_ARGS__ )
  ^~~
Comment 1 Howard Chu 2021-02-24 20:10:53 UTC
Broken by ITS#9348, fixed in master
Comment 2 Quanah Gibson-Mount 2021-02-24 20:18:40 UTC
Commits: 
  • b57d317f 
by Howard Chu at 2021-02-24T20:09:58+00:00 
ITS#9478 fix breakage from ITS#9348