Help compiling --with-ldap on Solaris 11 Express?

From: Dave Pooser <dave-pg(at)pooserville(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Help compiling --with-ldap on Solaris 11 Express?
Date: 2011-07-01 07:23:53
Message-ID: CA2A11F1.4B5C4%dave@pooserville.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

TL; DR version: I'm trying to compile 9.0.4 on Solaris 11 Express and
having problems with LDAP support; I finally got it to compile and install
but when I try to authenticate via LDAP I get "Assertion failed:
LBER_VALID( ber ), file sasl.c, line 103, function ldap_sasl_bind" and it
kills the process.

More detailed version:

I started with a clean install of Solaris Express 11 on a VMWare ESXi VM,
single processor/2GB RAM.
I installed from packages gcc-3, library/openldap and
system/library/math/header-math.
I downloaded the source tarball, uncompressed it and tried to configure:
./configure \
--enable-nls \
--with-python \
--with-openssl \
--with-libxml \
--enable-thread-safety \
--enable-dtrace \
--with-ldap \
--with-libs=/usr/lib \
--with-includes=/usr/include/openldap

Configure failed with an error
"checking for ldap_simple_bind in -lldap_r... no
configure: error: library 'ldap_r' is required for LDAP"

It looked to me that it wasn't finding /usr/lib/libldap_r-2.4.so I added a
symlink pointing libldap_r.so to libldap_r-2.4.so -- after that configure
worked but make failed:
Undefined first referenced
symbol in file
ldap_start_tls_s libpq/auth.o

So I tried setting LDFLAGS in the configure and make commands:

LDFLAGS="-lldap_r" ./configure
LDFLAGS="-lldap_r" gmake

That worked okay, as did "gmake install" -- I could initdb successfully
and connect locally with psql. But when I try to connect using LDAP auth
it pukes:
Assertion failed: LBER_VALID( ber ), file sasl.c, line 103, function
ldap_sasl_bind
LOG: server process (PID 26751) was terminated by signal 6
LOG: terminating any other active server processes
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the
current transaction and exit, because another server process exited
abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and
repeat your command.
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted; last known up at 2011-07-01
01:54:39 CDT
LOG: database system was not properly shut down; automatic recovery in
progress
LOG: consistent recovery state reached at 0/2501DBB4
LOG: record with zero length at 0/2501DBB4
LOG: redo is not required
LOG: autovacuum launcher started
LOG: database system is ready to accept connections

Any pointers would be appreciated; I'm far from an expert on either
Solaris or PostgreSQL, so it's very possible that I'm making one or more
elementary mistakes.

--
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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message francescoboccacci@libero.it 2011-07-01 10:13:33 Import image into postgresql database
Previous Message Simon Riggs 2011-07-01 07:16:07 Re: PANIC while doing failover (streaming replication)