nss_ldap-243 & FreeBSD/amd64 ... anyone? (build/errors/info attached)

Nathan Vidican nvidican at wmptl.com
Thu Nov 3 19:00:22 GMT 2005

Wasn't sure which list to post to entirely, so sorry if seems off-topic.

I can't seem to get nss_ldap-243 to compile at all under FreeBSD-6.0RC1/amd64, 
nor under 5.3-RELEASE, nor 5.4-RELEASE... all produce similar errors, however my 
development machine happens to be FreeBSD 6.0RC1/amd64 at the moment (dual AMD 
Opteron 246 box, 2gb ECC Registered, 1.25TB RAID 5). Here's a brief transcript 
of what I've done/where I am at, a longer version including the output from 
make/configure/etc. My comments start with a # to help differentiate from output:

# configure (with options as specified, openldap-2.3.11 compiled with 
# installed, configured, and running with DB). configure exits clean and 
generates a makefile:

wmptwo# ./configure CPPFLAGS="-I/usr/openldap/include -I/usr/include" 
LDFLAGS="-L/usr/openldap/lib -L/usr/lib" --with-ldap=openldap --prefix=/usr 

# now we run make, and get our first errors in ldap-nss.c, a quick inspection 
shows ldap-nss.c calling CONSTs defined in <sys/param.h>
wmptwo# make

<begin patch (diff ldap-nss.c.old ldap-nss.c)>
 > #include <sys/param.h>
 > #endif

# now I run make again, aside from a whole bunch of compiler warnings about null 
arguments being passed/required, (see output attached)
# ldap-nss.c compiles, now we get a whole new set of compiler errors in 
ldap-pwd.c, first error complains of UID_NOBODY not being
# defined but still being called/used... closer look reveals UID_NOBODY defined 
in ldap-nss.h, but not being defined:
wmptwo# make

# so I try patching ldap-nss.h, and update #define UID_NOBODY to reflect the 
default UID for the user 'nobody' on a 'standard' FreeBSD installation:
<patch diff ldap-nss.h.old ldap-nss.h>
< #define UID_NOBODY      (-2)
< #endif
 > #define UID_NOBODY      (65534)

# again, I run make, this time clean first, this time we're moving further into 
ldap-pwd.c, but still producing fatal compiler errors
# complaining about `structure has no member named `pw_comment'`, this is the 
point where I step back and wonder where to go next...
# should I systematically continue to retry make after I try to find/fix every 
compiler error; will this introduce new errors, will the
# code even work?

Again, output of all the above is attached in a txt file, please fee free to 
take a look through. Has anyone out there been able to get nss_ldap to compile 
on FreeBSD; other than the patched/older dist included with the ports 
collection? Problem with the ports version (in my case) being the old(er) 
release of openldap/ldap librairies it depends on. Working out some issues with 
samba and nss here alltogether, needed to update openldap to get past some other 
un-related bugs. System still has openldap-2.2.9 installed from the ports 
collection for the nss_ldap, and pam_ldap that is currently running. Samba 
source code has been modified, compiled, and been in use for a while now running 
the new(er) openldap librairies installed into /usr/openldap. Just not sure 
where to go with nss_ldap here; havn't even begun trying to compile pam_ldap to 
use the new(er) openldap librairies either - but suspect I may run into similar 
issues. Any suggestions/guidance would be greatly appreciated at this point... 
kinda running out of things to try and can't really audit the entire source code 
for something I know little about the internals of.

Thanx all

Nathan Vidican
nvidican at wmptl.com
Windsor Match Plate & Tool Ltd.

More information about the freebsd-questions mailing list