On 21.07.2016 07:31, Kamil Rytarowski wrote:
>
>
> On 23.05.2016 11:22, Kamil Rytarowski wrote:
>> On 23.05.2016 07:28, Thomas Klausner wrote:
>>> On Mon, May 23, 2016 at 03:35:03AM +0200, Kamil Rytarowski wrote:
>>>> On 16.04.2016 11:40, coypu%SDF.ORG@localhost wrote:
>>>>> Hi, I'm trying to run devel/meld and have base Xorg
>>>>> I get the following:
>>>>>
>>>>> $ ktruss meld |grep libGL
>>>>> Couldn't open libGL.so: Shared object "libGL.so" not found
>>>>> 25438 1 python2.7 open("/home/fly/pkg/lib/libGL.so", 0, 0x68) Err#2 ENOENT
>>>>> 25438 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"
>>>>>
>>>>> libGL.so is in /usr/X11R7/lib.
>>>>>
>>>>> What should be amended to fix this?
>>>>>
>>>>> Thanks.
>>>>>
>>>>
>>>> I'm having the same problem with other Gnome Python applications.
>>>>
>>>> I think we need to add RPATH to python for X11/lib.
>>>
>>> If it dlopen()s files, we don't need to change rpath, but just add
>>> /usr/X11R7/lib to the search path it goes through.
>>> Thomas
>>>
>>
>> How to do it exactly?
>>
>
> Still valid for the Python world.
>
> It looks like there is need to recognize pkgsrc and X11 specific paths
> by find_library().
>
> $ python2.7
> Python 2.7.11 (default, Apr 27 2016, 11:42:23)
> [GCC 5.3.0] on netbsd7
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from ctypes.util import find_library
>>>> find_library("m")
> 'libm.so.0'
>>>> find_library("crypto")
> 'libcrypto.so.11'
>>>> find_library("GL")
>>>> find_library("curl")
>>>>
>
I've committed fixes to Python 2.7 (lang/python27). Please test.
Now loading of X11 applications should just work.
If nobody objects I will forward port the fixes to python3.x.
There is a minor issue with meld, as it depends on a library that
violates mprotect. I'm going to fix.
Attachment:
signature.asc
Description: OpenPGP digital signature