pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Pooser <dave-pg@pooserville.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-admin@postgresql.org
Subject: Re: Help compiling --with-ldap on Solaris 11 Express?
Date: Sat, 02 Jul 2011 20:02:17 -0500
Message-ID: <CA352657.46A54%dave-pg@pooserville.com> (raw)
In-Reply-To: <CA351FEF.46A19%dave-sa@pooserville.com>

>>
>>So I'm pretty sure that there *should* be a libldap_r.so someplace.
>>You could possibly try symlinking that to the version-numbered library.
>
>Yep, and I did that to get past the configure problems, which allows me
>to 
>encounter a whole new problem in make :^)

That problem is that when I run gmake it eventually errors out with:
Undefined 		first referenced
 symbol 			in file
ldap_start_tls_s 	libpq/auth.o
ld: fatal: symbol referencing errors. No output written to postgres

Needless to say, checking with nm confirms that ldap_start_tls_s is
present in libldap_r.so -- so I try forcing the issue:


root@testdb:/home/locadmin/postgresql-9.0.4#LIBS="-lldap_r" gmake

At this point 'gmake' works, as does 'gmake install' and when I check with
ldd things appear to be linked properly:
root@testdb:/home/locadmin/postgresql-9.0.4# ldd
/usr/local/pgsql/bin/postmaster
        libnsl.so.1 =>   /lib/libnsl.so.1
        libsocket.so.1 =>        /lib/libsocket.so.1
        libm.so.2 =>     /lib/libm.so.2
        libldap_r-2.4.so.2 =>    /usr/lib/libldap_r-2.4.so.2
        libldap.so.5 =>  /usr/lib/libldap.so.5
        libc.so.1 =>     /lib/libc.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libmd.so.1 =>    /lib/libmd.so.1
        libumem.so.1 =>  /lib/libumem.so.1
        liblber-2.4.so.2 =>      /usr/lib/liblber-2.4.so.2
        libresolv.so.2 =>        /lib/libresolv.so.2
        libgen.so.1 =>   /lib/libgen.so.1
        libnet.so =>     /usr/lib/libnet.so
        libsasl.so.1 =>  /usr/lib/libsasl.so.1
        libssl.so.0.9.8 =>       /lib/libssl.so.0.9.8
        libcrypto.so.0.9.8 =>    /lib/libcrypto.so.0.9.8
        libnspr4.so =>   /usr/lib/mps/libnspr4.so
        libplc4.so =>    /usr/lib/mps/libplc4.so
        libnss3.so =>    /usr/lib/mps/libnss3.so
        libssl3.so =>    /usr/lib/mps/libssl3.so
        libgcc_s.so.1 =>         /usr/sfw/lib/libgcc_s.so.1
        libpthread.so.1 =>       /lib/libpthread.so.1
        librt.so.1 =>    /lib/librt.so.1
        libdl.so.1 =>    /lib/libdl.so.1
        libnssutil3.so =>        /usr/lib/mps/libnssutil3.so
        libplds4.so =>   /usr/lib/mps/libplds4.so
        libthread.so.1 =>        /lib/libthread.so.1
root@testdb:/home/locadmin/postgresql-9.0.4# ldd
/usr/local/pgsql/bin/postgres
        libnsl.so.1 =>   /lib/libnsl.so.1
        libsocket.so.1 =>        /lib/libsocket.so.1
        libm.so.2 =>     /lib/libm.so.2
        libldap_r-2.4.so.2 =>    /usr/lib/libldap_r-2.4.so.2
        libldap.so.5 =>  /usr/lib/libldap.so.5
        libc.so.1 =>     /lib/libc.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libmd.so.1 =>    /lib/libmd.so.1
        libumem.so.1 =>  /lib/libumem.so.1
        liblber-2.4.so.2 =>      /usr/lib/liblber-2.4.so.2
        libresolv.so.2 =>        /lib/libresolv.so.2
        libgen.so.1 =>   /lib/libgen.so.1
        libnet.so =>     /usr/lib/libnet.so
        libsasl.so.1 =>  /usr/lib/libsasl.so.1
        libssl.so.0.9.8 =>       /lib/libssl.so.0.9.8
        libcrypto.so.0.9.8 =>    /lib/libcrypto.so.0.9.8
        libnspr4.so =>   /usr/lib/mps/libnspr4.so
        libplc4.so =>    /usr/lib/mps/libplc4.so
        libnss3.so =>    /usr/lib/mps/libnss3.so
        libssl3.so =>    /usr/lib/mps/libssl3.so
        libgcc_s.so.1 =>         /usr/sfw/lib/libgcc_s.so.1
        libpthread.so.1 =>       /lib/libpthread.so.1
        librt.so.1 =>    /lib/librt.so.1
        libdl.so.1 =>    /lib/libdl.so.1
        libnssutil3.so =>        /usr/lib/mps/libnssutil3.so
        libplds4.so =>   /usr/lib/mps/libplds4.so
        libthread.so.1 =>        /lib/libthread.so.1

So I set up my postgresql.conf to allow remote connections and my
pg_hba.conf to use LDAP authentication; I load my data; I try to connect
using LDAP--

And authentication fails, and I see in the log:

Assertion failed: LBER_VALID( ber ), file sasl.c, line 103, function
ldap_sasl_bind
LOG:  server process (PID 7675) was terminated by signal 6
LOG:  terminating any other active server processes
WARNING:  terminating connection because of crash of another server process

Of course the function is also present in that @#$%^& libldap_r:

root@testdb:/home/locadmin# nm /usr/lib/libldap_r.so | grep
"ldap_sasl_bind"
[1385]  |    104232|       760|FUNC |GLOB |0    |12     |ldap_sasl_bind
[1309]  |    104992|       327|FUNC |GLOB |0    |12     |ldap_sasl_bind_s

It seems there's some magic incantation to REALLY bind that I'm just not
seeing here. Any help gratefully accepted.

--
Dave Pooser
Cat-Herder-in-Chief, Pooserville.com
"...Life is not a journey to the grave with the intention of arriving
safely in one pretty and well-preserved piece, but to slide across the
finish line broadside, thoroughly used up, worn out, leaking oil, and
shouting GERONIMO!!!" -- Bill McKenna





view thread (12+ messages)  latest in thread

Message-ID: <CA352657.46A54%dave-pg@pooserville.com>
Permalink:  ../CA352657.46A54%25dave-pg@pooserville.com/
Also on:    postgresql.org/message-id/CA352657.46A54%dave-pg@pooserville.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: dave-pg@pooserville.com, tgl@sss.pgh.pa.us
  Subject: Re: Help compiling --with-ldap on Solaris 11 Express?
  In-Reply-To: <CA352657.46A54%dave-pg@pooserville.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox