Subject: Re: buildlink2 problems with new libogg and libvorbis packages
To: None <>
From: Klaus Heinz <>
List: tech-pkg
Date: 10/05/2002 05:45:05
Greg A. Woods wrote:

> immediately obvious to my eyes.  If someone could tell me how this is
> suupposed to work (i.e. where exactly does buildlink2 supply the
> appropriate -Wl,-R flag(s) so that intermediate built targets that use
> non-standard libraries can work "in situ", then maybe I could trace back
> to where the problems begin in my environment.

As far as I understand it, adds -L${LOCALBASE}/lib (and
-L${X11BASE}/lib if appropriate) and adds the linker flags -Wl...
if _USE_RPATH is set to 'yes' (in mk/ _always_ prepends -L${LOCALBASE}/lib (and
-L${X11BASE}/lib if appropriate) to LDFLAGS.
See line 388 ff in v1.1063 and look for _BLNK_LDFLAGS in

Also make sure USE_BUILDLINK2 is used instead of USE_BUILDLINK_ONLY.

Here's an example I used yesterday:

added by bsd.pkg.*
| added by
| |   gcc  ... some object files ...
| +->    -L/usr/pkg/lib -L/usr/X11R6/lib
+--->    -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
  +->    -lX11  -lm -o ../rocksndiamonds
  from the application Makefile

Did you look at the value of LDFLAGS when the configure script was
  make PKG_DEBUG_LEVEL=1 configure