Subject: Re: needed by .buildlink/lib/ but it is
To: Jeremy C. Reed <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 06/01/2002 11:52:46
On Sat, 1 Jun 2002, Jeremy C. Reed wrote:

> -L/usr/local/pkgsrc/my-packages/scribus/work/.buildlink/lib -lc -ltiff -lm
> -lqt-mt -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread -lXext -lX11
> /usr/bin/ld: warning:, needed by
> /usr/local/pkgsrc/my-packages/scribus/work/.buildlink/lib/, not
> found (try using --rpath)

You ought to put "-ljpeg" on that command line...

> Any ideas on how I can get it to use the
> (The message above said try --rpath, but I am not sure.)

...and "-Wl,-R${LOCALBASE}/lib". We usually use "-R" instead of
"--rpath" because it also works with a.out, whereas "--rpath" is
new-toolchain-only. If there are conditionals for ELF-only, or for GNU
"ld", it's OK to use "-Wl,-rpath,${LOCALBASE}/lib. Buildlink adds all
that to ${LDFLAGS} (and ${LIBS}?). But now, all configure scripts
respect ${LDFLAGS}, but some make systems don't, so often you have to
sprinkle LDFLAGS=@LDFLAGS@ and ${LDFLAGS} into the's.
[Look at the patches to similiar packages.] Another possible approach
is to add the run path arguments to some suitable hook via
CONFIGURE_ARGS+= to the package-level makefile.

> What is especially confusing is that the configure script works fine, but
> I have to more to get the actual compile to work.

You mean it completes without blowing up? That's only half the battle.
The hard part is making it do what you want. ;-)