Re: [HACKERS] Bug in linking in old libraries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: Re: [HACKERS] Bug in linking in old libraries
Date: 1998-05-08 15:34:53
Message-ID: 17827.894641693@sss.pgh.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.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jackson, DeJuan 1998-05-08 15:57:57 RE: [QUESTIONS] Using psql \f to change delimiter to space
Previous Message Tom Lane 1998-05-08 15:20:42 Re: [HACKERS] compile problem in libpq