Re: [HACKERS] Bug in linking in old libraries

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Bug in linking in old libraries
Date: 1998-05-08 17:16:53
Message-ID: 199805081716.NAA09605@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I have found a problem with libpgtcl and cases where the linking brings
> > in the old libpq libraries in the current installed directory, rather
> > than the one in the current source.
>
> This strikes me as just plain brain fade in src/bin/pgtclsh/Makefile.
> Instead of
>
> # try to find libpgtcl.a in either directory
> LIBPGTCL= -L$(SRCDIR)/interfaces/libpgtcl -L$(LIBDIR) -lpgtcl
> LIBPQ= -L$(LIBPQDIR) -L$(LIBDIR) -lpq
>
> it should just have
>
> LIBPGTCL= -L$(SRCDIR)/interfaces/libpgtcl -lpgtcl
> LIBPQ= -L$(LIBPQDIR) -lpq
>
> There's no good reason to be referencing the library install directory,
> since even if it exists it may contain an incompatible down-rev library.
>
> On some machines there is an issue of telling the executable to look for
> shared libraries in LIBDIR at run time, but that is handled by different
> switches that Makefile.port supplies via LDFLAGS.
>
> A quick grep for LIBDIR shows no indication that the same mistake has
> been made anywhere else.

Thanks for checking. I will make the change.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-05-08 17:25:17 Re: [QUESTIONS] Using psql \f to change delimiter to space
Previous Message Jackson, DeJuan 1998-05-08 16:50:23 RE: [QUESTIONS] Important questions about PostgreSQL