Subject: Re: bl3 eating -Wl,--rpath -Wl,/path flags to gcc
To: Dan McMahill <dmcmahill@NetBSD.org>
From: Johnny C. Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 03/25/2004 04:14:50
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.
Cheers,
-- Johnny Lam <jlam@NetBSD.org>