Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7DD11B5DBE1 for ; Fri, 1 Jul 2011 04:54:59 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 06416-02 for ; Fri, 1 Jul 2011 07:54:53 +0000 (UTC) X-Greylist: delayed 00:30:48.508003 by SQLgrey-1.7.6 Received: from smtp.pooserville.com (mail.pooserville.com [69.26.223.253]) by mail.postgresql.org (Postfix) with ESMTP id D3987B5DBC1 for ; Fri, 1 Jul 2011 04:54:52 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=mail.pooserville.com) by smtp.pooserville.com with esmtp (Exim 4.72) (envelope-from ) id LNN8K3-001Q6Y-5V for pgsql-admin@postgresql.org; Fri, 01 Jul 2011 02:24:03 -0500 Received: from [24.27.124.167] (account dave-sa@pooserville.com HELO [192.168.74.50]) by mail.pooserville.com (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 964999 for pgsql-admin@postgresql.org; Fri, 01 Jul 2011 02:24:01 -0500 User-Agent: Microsoft-MacOutlook/14.12.0.110505 Date: Fri, 01 Jul 2011 02:23:53 -0500 Subject: Help compiling --with-ldap on Solaris 11 Express? From: Dave Pooser To: pgsql-admin Message-ID: Thread-Topic: Help compiling --with-ldap on Solaris 11 Express? Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/8 X-Sequence-Number: 37787 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