Subject: BUILDLINK_LDFLAGS forces to use native libraries (was Re: CVS commit: pkgsrc/mk/platform)
To: None <tech-pkg@netbsd.org>
From: Min Sik Kim <minskim@NetBSD.org>
List: tech-pkg
Date: 06/22/2006 11:02:19
On 1/6/06, Christos Zoulas <christos@netbsd.org> wrote:
>
> Module Name:    pkgsrc
> Committed By:   christos
> Date:           Fri Jan  6 22:47:24 UTC 2006
>
> Modified Files:
>         pkgsrc/mk/platform: Linux.mk
>
> Log Message:
> set the LIBABISUFFIX to 64 for amd64...

This makes packages link against native libraries instead of pkgsrc ones.

% cd textproc/libxml2
% bmake show-var VARNAME=PREFIX
/home/msk/pkg
% bmake show-var PKG_PHASE=build VARNAME=BUILDLINK_LDFLAGS
-L/usr/lib64 -Wl,-R/usr/lib64 -Wl,-R/home/msk/pkg/lib
% bmake install
% ldd /home/msk/pkg/bin/xmlcatalog
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00002aaaaabc3000)
        libdl.so.2 => /lib/libdl.so.2 (0x00002aaaaadfe000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002aaaaaf02000)
        libm.so.6 => /lib/libm.so.6 (0x00002aaaab018000)
        libc.so.6 => /lib/libc.so.6 (0x00002aaaab19e000)
        /lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)

Because of /usr/lib64 in BUILDLINK_LDFLAGS, xmlcatalog (installeld by
libxml2) uses /usr/lib64/libxml2.so.2 instead of
${PREFIX}/libxml2.so.2, and /usr/lib64/libz.so.1 instead of
${PREFIX}/libz.so.1.

Regards,
Min