Subject: Re: dilema with use of LDFLAGS=-L${LOCALBASE}/lib vs. private
To: NetBSD Packages Technical Discussion List <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 10/22/1999 17:57:05
On Fri, 22 Oct 1999, Greg A. Woods wrote:

> Actually, as I mentioned in a recent reply to a bug report, it is
> beginning to look as if the "exceptions" are actually only those few
> packages which specifically need "-L${LOCALBASE}/lib", and in almost
> every case that flag should always appear at or at least near the *end*
> of the compile command, which is almost totally impossible to influence
> from within pkgsrc/mk/ -- it must be done by directly hacking
> the package's Makefiles or whatever with a patch.
> So, my new proposal is simply:
> - LDFLAGS+=		-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib

That won't make any difference.
> and then fix up (with local patches) any packages which are dependent on
> libraries which might have been installed by other packages.

The problems you reported were with packages that use GNU configure.
The package system only sets LDFLAGS in the environment for configure;
it's up to configure to use that to find the libraries it needs, and
to save and use the value of LDFLAGS in the generated Makefiles.

If configure is picking up the wrong library entirely, and not simply
the wrong version, it's a bug. The best solution is for one of the
packages to change the name of it's library.