Subject: Re: bl3 eating -Wl,--rpath -Wl,/path flags to gcc
To: Johnny C. Lam <jlam@NetBSD.org>
From: Dan McMahill <dmcmahill@NetBSD.org>
List: tech-pkg
Date: 03/25/2004 07:37:48
On Thu, Mar 25, 2004 at 04:14:50AM +0000, Johnny C. Lam wrote:
> On Wed, Mar 24, 2004 at 07:04:09PM -0500, Dan McMahill wrote:
> >
> > <.> /usr/pkgsrc-current/parallel/pvm3/work.bondage/.gcc/bin/gcc -O2 -mieee \
> > -I/usr/pkgsrc-current/parallel/pvm3/work.bondage/.buildlink/include \
> > -I../../include -DCTIMEISTIMET -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/ssh\" \
> > -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST -o .libs/hello \
> > ../../examples/hello.c ../../lib/NETBSDALPHA/.libs/libpvm3.so \
> > -L/usr/pkgsrc-current/parallel/pvm3/work.bondage/.buildlink/lib \
> > -L/usr/pkgsrc-current/parallel/pvm3/work.bondage/pvm3/lib/NETBSDALPHA
> >
> > so we have lost the -Wl,--rpath -Wl,/usr/pkg/pvm3/lib/NETBSDALPHA stuff. And
> > of course once installed:
> >
> > 1 % ldd /usr/pkg/pvm3/bin/NETBSDALPHA/hello
> > /usr/pkg/pvm3/bin/NETBSDALPHA/hello:
> > -lpvm3.3 => not found
> > -lc.12 => /usr/lib/libc.so.12
> >
> > 2 % env LD_LIBRARY_PATH=/usr/pkg/pvm3/lib/NETBSDALPHA ldd /usr/pkg/pvm3/bin/NETBSDALPHA/hello
> > /usr/pkg/pvm3/bin/NETBSDALPHA/hello:
> > -lpvm3.3 => /usr/pkg/pvm3/lib/NETBSDALPHA/libpvm3.so.3
> > -lc.12 => /usr/lib/libc.so.12
> >
> > So am I doing something wrong or is bl3 broken?
>
> A little bit of both :) The pvm3/buildlink3.mk file is missing some
> settings to tell the buildlink3 framework where to find the headers
> and libraries. By default, the buildlink3 framework will add
> ${PREFIX}/include and ${PREFIX}/lib to the header and library search
> paths. If the headers or libraries lie outside these directories,
> then they need to be specified in BUILDLINK_INCDIRS.<pkg> or
> BUILDLINK_LIBDIRS.<pkg>.
>
> I've committed some changes to pvm3/buildlink3.mk to match some settings
> that are present in the buildlink2.mk file.
>
This helps pkgs which use pvm3, but it doesn't help the binaries built
by pvm3 itself.
-Dan
--