From owner-freebsd-ports-bugs Sun Jan 19 9:10: 9 2003 Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F34B37B401 for ; Sun, 19 Jan 2003 09:10:04 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20A2C43F13 for ; Sun, 19 Jan 2003 09:10:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h0JHA2NS082189 for ; Sun, 19 Jan 2003 09:10:02 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h0JHA2Ac082188; Sun, 19 Jan 2003 09:10:02 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A751B37B401 for ; Sun, 19 Jan 2003 09:05:04 -0800 (PST) Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA25543E4A for ; Sun, 19 Jan 2003 09:05:03 -0800 (PST) (envelope-from alsbergt@cs.huji.ac.il) Received: from lurch.cs.huji.ac.il ([132.65.80.139] ident=exim) by cs.huji.ac.il with esmtp id 18aIsV-000BUM-00; Sun, 19 Jan 2003 19:04:59 +0200 Received: from alsbergt by lurch.cs.huji.ac.il with local (Exim 3.22 #2) id 18aIsV-0008ZT-00; Sun, 19 Jan 2003 19:04:59 +0200 Message-Id: Date: Sun, 19 Jan 2003 19:04:59 +0200 From: Tom Alsberg Reply-To: Tom Alsberg To: FreeBSD-gnats-submit@FreeBSD.org Cc: Tom Alsberg X-Send-Pr-Version: 3.113 Subject: ports/47218: PostgreSQL client has problems when libbind is installed Sender: owner-freebsd-ports-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 47218 >Category: ports >Synopsis: PostgreSQL client has problems when libbind is installed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 19 09:10:02 PST 2003 >Closed-Date: >Last-Modified: >Originator: Tom Alsberg >Release: FreeBSD 4.7-STABLE i386 >Organization: Institute of Computer Science, Hebrew University of Jerusalem >Environment: System: FreeBSD lurch 4.7-STABLE FreeBSD 4.7-STABLE #8: Mon Dec 23 15:55:38 IST 2002 danny@dev:/r+d/obj/r+d/4.7/src/sys/HUJI i386 port bind-8.3.1 installed. Static library /usr/local/lib/libbind.a belongs to it (/usr/local/lib/libbind.a was installed by package bind-8.3.1) >Description: When the databases/postgresql7 port is being built after the bind port/package is installed, part of its configure script which has a comment "BeOS", will detect libbind.a and link some binaries, like psql, with it. libbind.a seems to contain various nsswitch functions (getpw*), etc. Since we have database servers doing ident authentication, I noticed that psql when compiled from the ports here failed with an error message "Could not determine which username to use"... I traced this problem to being related to libbind linked in psql. I hope I am posting this to the right people. The PostgreSQL team might be more appropriate, I do not know, do not have enough time to check. I apologize if this is the wrong target for this PR. >How-To-Repeat: It might be able to reproduce this problem by installing the net/bind8 package/port, then building and installing the databases/postgresql7 port, and then connecting with psql to a database server which uses ident authentication. There might be other implications of this linkage, and other problems caused by it. I did not check. >Fix: I attach to this message a replacement for the databases/postgresql7/files/patch-configure patch which removes the part of the configure file checking for libbind in the case of BeOS (since this patch file is FreeBSD specific anyway, I did not think putting it in a BeOS check is necessary. Then again, perhaps I should have just posted this to the PostgreSQL team), in addition to what it does already. --- patch-configure begins here --- --- configure.orig Wed Jan 15 13:30:23 2003 +++ configure Wed Jan 15 13:29:54 2003 @@ -3239,11 +3239,13 @@ _ACEOF - if test -d "$krb4_prefix/include"; then - INCLUDES="$INCLUDES -I$krb4_prefix/include" - fi - if test -d "$krb4_prefix/lib"; then - LIBDIRS="$LIBDIRS -L$krb4_prefix/lib" + if test "$krb4_prefix" != "/usr"; then + if test -d "$krb4_prefix/include"; then + INCLUDES="$INCLUDES -I$krb4_prefix/include" + fi + if test -d "$krb4_prefix/lib"; then + LIBDIRS="$LIBDIRS -L$krb4_prefix/lib" + fi fi krb_srvtab="/etc/srvtab" @@ -3297,11 +3299,13 @@ _ACEOF - if test -d "$krb5_prefix/include"; then - INCLUDES="$INCLUDES -I$krb5_prefix/include" - fi - if test -d "$krb5_prefix/lib"; then - LIBDIRS="$LIBDIRS -L$krb5_prefix/lib" + if test "$krb5_prefix" != "/usr"; then + if test -d "$krb5_prefix/include"; then + INCLUDES="$INCLUDES -I$krb5_prefix/include" + fi + if test -d "$krb5_prefix/lib"; then + LIBDIRS="$LIBDIRS -L$krb5_prefix/lib" + fi fi krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab" @@ -3440,11 +3444,13 @@ _ACEOF - if test -d "${openssl_prefix}/include" ; then - INCLUDES="$INCLUDES -I${openssl_prefix}/include" - fi - if test -d "${openssl_prefix}/lib" ; then - LIBDIRS="$LIBDIRS -L${openssl_prefix}/lib" + if test "${openssl_prefix}" != "/usr"; then + if test -d "${openssl_prefix}/include" ; then + INCLUDES="$INCLUDES -I${openssl_prefix}/include" + fi + if test -d "${openssl_prefix}/lib" ; then + LIBDIRS="$LIBDIRS -L${openssl_prefix}/lib" + fi fi fi @@ -5550,72 +5556,6 @@ echo "${ECHO_T}$ac_cv_search_crypt" >&6 if test "$ac_cv_search_crypt" != no; then test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS" - -fi - -# BeOS: - -echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6 -if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbind $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char __inet_ntoa (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -__inet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_bind___inet_ntoa=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_bind___inet_ntoa=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6 -if test $ac_cv_lib_bind___inet_ntoa = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBBIND 1 -_ACEOF - - LIBS="-lbind $LIBS" fi --- patch-configure ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message