NetBSD Problem Report #34108

From minskim@netbsd.org  Sat Jul 29 04:13:58 2006
Return-Path: <minskim@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 33AFE63B850
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Jul 2006 04:13:58 +0000 (UTC)
Message-Id: <20060729041358.2AAB563B11A@mail.netbsd.org>
Date: Sat, 29 Jul 2006 04:13:58 +0000 (UTC)
From: minskim@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: Wrong rpath order in BUILDLINK_LDFLAGS
X-Send-Pr-Version: 3.95

>Number:         34108
>Category:       pkg
>Synopsis:       Wrong rpath order in BUILDLINK_LDFLAGS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 29 04:15:00 +0000 2006
>Closed-Date:    
>Last-Modified:  Sun Jun 30 11:58:52 +0000 2013
>Originator:     Min Sik Kim
>Release:        pkgsrc-current
>Organization:
>Environment:
	Linux 2.6.12-10-amd64-xeon
>Description:
After adding LIBABISUFFIX for amd64 in mk/platform/Linux.mk, packages are
linked 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.

>How-To-Repeat:
Build a package depending on a pkgsrc library of which an older,
incompatible version is in /usr/lib64.

>Fix:
Change the order in BUILDLINK_LDFLAGS so that ${PREFIX}/lib always
preceds /usr/lib64.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: obache@NetBSD.org
State-Changed-When: Sun, 30 Jun 2013 11:58:52 +0000
State-Changed-Why:
With mk/buildlink3/bsd.buildlink3.mk rev1.221, system default paths will be
never added to RPATH, and should be fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.