When building PostgreSQL 8.3 on Solaris using the configure option "--with-gssapi", libpq.so is not linked correctly.
This line in the libpq Makefile is selecting the appropriate linker options: --- SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lgssapi_krb5 -lssl -lsocket -lnsl -lresolv -lintl, $(LIBS)) $(LDAP_LIBS_FE) $(PTHREAD_LIBS) --- This includes "-lgssapi_krb5", but for Solaris this should be just "-lgss". The result is that libpq.so does not load libgss.so. psql still works because it apparently loads libgss.so before it loads libpq.so, otherwise it would surely have been discovered earlier. But when I tried to run a test for the TCL client interface I got: --- TCL test status: Started couldn't load file "libpgtcl1.5.so": ld.so.1: tclsh8.4: fatal: relocation error: file <....>/lib/libpq.so.5: symbol GSS_C_NT_HOSTBASED_SERVICE: referenced symbol not found while executing "load libpgtcl1.5.so" (file "./import_sampledata.tcl" line 7) --- This could affect other clients too. The fix is simply to add "-lgss" to the list, as the attached patch does. I'm pretty sure no other Makefiles are affected. Tested on Solaris (x86 and sparc), and also Linux (RHEL 5). I plan to apply this patch when I integrate 8.3.0 into OpenSolaris. -- Bjorn Munch Database Technology Group Sun Microsystems
*** src/interfaces/libpq/Makefile.orig Mon Mar 3 16:33:11 2008 --- src/interfaces/libpq/Makefile Tue Mar 4 12:24:08 2008 *************** *** 56,62 **** # shared library link. (The order in which you list them here doesn't # matter.) ifneq ($(PORTNAME), win32) ! SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lgssapi_krb5 -lgss -lssl -lsocket -lnsl -lresolv -lintl, $(LIBS)) $(LDAP_LIBS_FE) $(PTHREAD_LIBS) else SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lgssapi32 -lssl -lsocket -lnsl -lresolv -lintl $(PTHREAD_LIBS), $(LIBS)) $(LDAP_LIBS_FE) endif --- 56,62 ---- # shared library link. (The order in which you list them here doesn't # matter.) ifneq ($(PORTNAME), win32) ! SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lgssapi_krb5 -lssl -lsocket -lnsl -lresolv -lintl, $(LIBS)) $(LDAP_LIBS_FE) $(PTHREAD_LIBS) else SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lgssapi32 -lssl -lsocket -lnsl -lresolv -lintl $(PTHREAD_LIBS), $(LIBS)) $(LDAP_LIBS_FE) endif
-- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your Subscription: http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-patches