NetBSD Problem Report #51074

From www@NetBSD.org  Mon Apr 18 04:37:50 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2556D7A2B1
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 18 Apr 2016 04:37:50 +0000 (UTC)
Message-Id: <20160418043748.C0F357A478@mollari.NetBSD.org>
Date: Mon, 18 Apr 2016 04:37:48 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: devel/meld doesn't work with base Xorg
X-Send-Pr-Version: www-1.0

>Number:         51074
>Category:       pkg
>Synopsis:       devel/meld doesn't work with base Xorg
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 18 04:40:00 +0000 2016
>Closed-Date:    Sat Jul 23 19:52:38 +0000 2016
>Last-Modified:  Sat Jul 23 19:52:38 +0000 2016
>Originator:     coypu
>Release:        pkgsrc-current, NetBSD-current
>Organization:
>Environment:
NetBSD net.Home 7.99.27 NetBSD 7.99.27 (GENERIC) #2: Thu Apr 14 12:13:00 IDT 2016  fly@net.Home:/usr/obj.amd64/sys/arch/amd64/compile/GENERIC amd64
>Description:
built devel/meld version 3.15.2 with unprivileged bootstrapped pkgsrc (I don't think this matters), with base Xorg.
it opens libGL.so, but looks in the wrong directory:

$ ktruss meld |grep libGL
Couldn't open libGL.so: Shared object "libGL.so" not found
   202      1 python2.7 open("/home/fly/pkg/lib/libGL.so", 0, 0x68) Err#2 ENOENT
   202      1 python2.7 open("/usr/lib/libGL.so", 0, 0x1) Err#2 ENOENT
       "Couldn't open libGL.so: Shared object "libGL.so" not found\n"

in my case, libGL.so is in /usr/X11R7/lib.

I believe this problem affects more than just this package, and exists for any python packages using libGL.so.
>How-To-Repeat:

>Fix:
tnn mentions that the fix should have:
-L${X11BASE}/lib ${COMPILER_RPATH_FLAG}${X11BASE}/lib

but I'm not sure where to put it.

>Release-Note:

>Audit-Trail:
From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/51074: devel/meld doesn't work with base Xorg
Date: Tue, 14 Jun 2016 17:16:54 +0000

 Hi,

 setup.py in python27 has the following:

     def add_multiarch_paths(self):
         # Debian/Ubuntu multiarch support.
         # https://wiki.ubuntu.com/MultiarchSpec
         cc = sysconfig.get_config_var('CC')
         tmpfile = os.path.join(self.build_temp, 'multiarch')
         if not os.path.exists(self.build_temp):
             os.makedirs(self.build_temp)
         ret = os.system(
             '%s -print-multiarch > %s 2> /dev/null' % (cc, tmpfile))
         multiarch_path_component = ''
         try:
             if ret >> 8 == 0:
                 with open(tmpfile) as fp:
                     multiarch_path_component = fp.readline().strip()
         finally:
             os.unlink(tmpfile)

         if multiarch_path_component != '':
             add_dir_to_list(self.compiler.library_dirs,
                             '/usr/lib/' + multiarch_path_component)
             add_dir_to_list(self.compiler.include_dirs,
                             '/usr/include/' + multiarch_path_component)

 Does that sound like it will work?
 I am not familiar enough with python to use this.

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sat, 23 Jul 2016 19:52:38 +0000
State-Changed-Why:
kamil fixed it


>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.