[PATCHES] libpq.so linking problem on Solaris using --with-gssapi

2008-03-04 Thread Bjorn Munch
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.orgextra=pgsql-patches


Re: [PATCHES] tzcode update

2008-02-18 Thread Bjorn Munch
On 13/02 10.51, Heikki Linnakangas wrote:
 Heikki Linnakangas wrote:
 I'll add some tests to cover timestamps  2038.
 
 Attached is a new patch, with a couple of new regression tests. No other 
 changes.

Ouch!  This fails on our Solaris builds, because we build with the
Solaris timezone files.  And these apparently don't work beyond 2038
and don't know that Finland plans to have DST also in the summer of
2050...

I haven't studied this in depth but I'm afraid the answer is fix your
own timezone files?

-- 
Bjorn Munch
Database Technology Group, Sun Microsystems
Trondheim, Norway



---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [PATCHES] tzcode update

2008-02-18 Thread Bjorn Munch
On 18/02 14.22, Tom Lane wrote:
 I can't imagine that fixing this isn't pretty darn high on the Solaris
 to-do list, anyway.  Financial apps doing, say, 30-year mortgage
 projections are broken *today* on platforms without post-Y2038 calendar
 support.

Well, it IS mentioned in the BUGS section of at least one man page
(localtime), so it's clearly a known problem.

I don't know about 30-year mortgage, I don't think such financial apps
care whether the day 30 days into the future has DST or not. :-)  And
apart from that, the date was correct.

- Bjorn Munch

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings