Re: Fix for HP-UX shared library builds

From: Giles Lean <giles(at)nemeton(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Fix for HP-UX shared library builds
Date: 2003-01-11 01:59:39
Message-ID: 29364.1042250379@nemeton.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


I wrote:

> Tom Lane wrote:
>
> > I am hesitant to apply it to 7.3 since that would mean (I think) an
> > incompatible renaming of the shlib, which we'd best avoid on a minor
> > release, no? What will happen for existing users of 7.3 if we do put
> > this in 7.3.2?

> I'll investigate and find out what happens when a client linked
> against libpq.sl finds that has turned into a symbolic link. I think
> the dynamic loader will follow the link, but I'm guessing. :-(

I have now tested this.

A binary linked against a libpq.sl will still run after libpq.sl is
updated to be a symbolic link to libpq.sl.3. This makes the change
safe to apply to the 7.3.x branch, I believe:

1. 7.3.1 clients will continue to work for 7.3.2 and later

2. clients re-linked against 7.3.2 or later will avoid the flag day
when the library major number is increased, probably with the 7.4
release. This is the advantage of applying the patch.

3. 7.3.1 clients that are not relinked will fail if they are not
relinked when the library major number is incremented, but that's
the case if the patch is not applied, too.

4. since the HP-UX port didn't use library major numbers the library
version bump in the 7.3.1 release made no difference, so 7.3
clients are in the same position as 7.3.1 clients for #1-#3 above.

Tom -- in your court now. Please do apply the change to HEAD (which I
think you were planning to do) and 7.3.x if you think it appropriate.

*** src/Makefile.shlib-7.3.1 Thu Oct 10 02:21:54 2002
--- src/Makefile.shlib Tue Jan 7 09:25:40 2003
***************
*** 126,134 ****
endif

ifeq ($(PORTNAME), hpux)
! # HPUX doesn't believe in version numbers for shlibs
! shlib := lib$(NAME)$(DLSUFFIX)
! LINK.shared = $(LD) -b +b $(libdir)
endif

ifeq ($(PORTNAME), irix5)
--- 126,133 ----
endif

ifeq ($(PORTNAME), hpux)
! shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
! LINK.shared = $(LD) +h $(soname) -b +b $(libdir)
endif

ifeq ($(PORTNAME), irix5)

Regards,

Giles

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-01-11 02:24:08 Re: pg_dump a specific schema
Previous Message Neil Conway 2003-01-10 23:00:04 Re: pg_dump a specific schema