Skip site navigation (1) Skip section navigation (2)

Re: [PORTS] Postgres 6.5.1 on IRIX 6.5 Locating Shared Object Libs

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Mark Dalphin <mdalphin(at)amgen(dot)com>
Cc: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>, "pgsql-ports(at)postgresql(dot)org" <pgsql-ports(at)postgreSQL(dot)org>
Subject: Re: [PORTS] Postgres 6.5.1 on IRIX 6.5 Locating Shared Object Libs
Date: 1999-09-27 20:53:30
Message-ID: 199909272053.QAA16778@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-ports
Applied.


> Hi,
> 
> Some time ago (Jul 30 for the contents of the letter copied below), there was some discussion about why release 6.5.1 of PostgreSQL seemed to have a problem locating shared object libraries (DSOs) under IRIX 6.5. This problem seems to
> have been introduced with the release of 6.5.1 and was not present in 6.4.2.  What changed?
> 
> I have located a change that fixes the problem for me which involves a command line switch during compilation (ie on the "cc" line, although the swich is actually passed to 'ld'.) which specifies to the dynamic loader, 'rld', where to
> locate the particular shared object in question.  The relevant section from the man page for 'ld' reads:
> 
>      -rpath library_path
>                Adds the library_path to the search path for DSOs.  Each
>                library path is appended to the list of directories at the
>                time the executable or DSO is loaded.  This option directs
>                rld(5) to look in the named directories, but to look only
>                for DSOs, and to stop looking when the correct one is found.
> 
>                This option can be specified only when the -shared or
>                -call_shared options are also in effect.  For more
>                information, see the rld(5) man page.  (C, C++, F77, F90)
> 
> A patch to 'Makefile.shlib' is supplied below:
> 
> *** Makefile.shlib.orig Mon Aug 30 11:00:23 1999
> --- Makefile.shlib      Mon Aug 30 11:01:47 1999
> ***************
> *** 59,65 ****
>   ifeq ($(PORTNAME), irix5)
>     install-shlib-dep := install-shlib
>     shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
> !   LDFLAGS_SL := -shared
>     CFLAGS += $(CFLAGS_SL)
>   endif
> 
> --- 59,65 ----
>   ifeq ($(PORTNAME), irix5)
>     install-shlib-dep := install-shlib
>     shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
> !   LDFLAGS_SL := -shared -rpath $(LIBDIR)
>     CFLAGS += $(CFLAGS_SL)
>   endif
> 
> "G. Anthony Reina" wrote:
> 
> > Mark Dalphin wrote:
> >
> > > I have not compiled for multiple modes, only -n32, but I have run into exactly the same problem. Version 6.4.2 seemed to know where to look for the shared object, but something has changed for 6.5.1. I am not sure what, though I have
> > > been looking.  There is also more information about this under "man rld", but my reading of it suggests that your cc line, above, should work.  My current work around is to specify LD_LIBRARY_PATH when I start the postmaster. That
> > > won't help when compiling other programs, however, I think
> > >
> >
> > Mark,
> >
> >     Yeah, from my understanding cc should know where to look for the libraries since I specify the correct place with the -L option. It seems like cc isn't even recognizing that this option has been set.
> >
> >     The only difference I can see between Postgres 6.4.2 and 6.5.1 in this matter is that the library has changed from libpq.a to libpq.so.2. For some reason I think that move from .a to .so has made the difference. Copying the
> > lipq.so.2 over to the /usr/lib32 directory will fix the bug (or at least I haven't found any problems with it so far). But, I'd rather like to figure out specifically why this is occuring rather than kludging a work around.
> >
> >     Maybe between the two of us working on the problem we'll have a better chance of coming across the reason.
> >
> > -Tony
> 
> --
> Mark Dalphin                          email: mdalphin(at)amgen(dot)com
> Mail Stop: 29-2-A                     phone: +1-805-447-4951 (work)
> One Amgen Center Drive                       +1-805-375-0680 (home)
> Thousand Oaks, CA 91320                 fax: +1-805-499-9955 (work)
> 
> 
> 
> 
> ************
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist(at)candle(dot)pha(dot)pa(dot)us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-ports by date

Next:From: Bruce MomjianDate: 1999-09-28 04:34:48
Subject: Re: [PORTS] plpgsql & bsdi 4.0
Previous:From: Ted Nolan SRI Augusta GADate: 1999-09-27 17:30:08
Subject: Re: [PORTS] ipc-daemon runs wild on NT?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group