Subject: Re: BUILDLINK_LDFLAGS forces to use native libraries (was Re: CVS commit: pkgsrc/mk/platform)
To: Min Sik Kim <minskim@NetBSD.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-pkg
Date: 06/22/2006 14:33:53
On Jun 22, 11:02am, minskim@NetBSD.org ("Min Sik Kim") wrote:
-- Subject: BUILDLINK_LDFLAGS forces to use native libraries (was Re: CVS com

| 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.

So BUILDLINK_LDFLAGS should be changed to:
-L/home/msk/kg/lib -Wl,-R/home/msk/pkg/lib -L/usr/lib64 -Wl,-R/usr/lib64

The lib64 is still correct.

christos