From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Python: Error loading shared library in Guix Date: Tue, 19 Mar 2019 15:52:41 +0100 Message-ID: <8736nincg6.fsf@elephly.net> References: <20190319152519.1caef235@alma-ubu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:41441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6GBw-0000AO-5Q for guix-devel@gnu.org; Tue, 19 Mar 2019 10:58:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6G7k-0000s4-7u for guix-devel@gnu.org; Tue, 19 Mar 2019 10:53:53 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6G7h-0007oi-M8 for guix-devel@gnu.org; Tue, 19 Mar 2019 10:53:50 -0400 In-reply-to: <20190319152519.1caef235@alma-ubu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?Q?Bj=C3=B6rn_H=C3=B6fling?= Cc: guix-devel Bj=C3=B6rn H=C3=B6fling writes: > [env]# ls $GUIX_ENVIRONMENT/lib > libXss.a libXss.so libXss.so.1.0.0 libbfd.la libopcodes.la libpyth= on2.7.so.1.0 libz.so.1 pkgconfig > libXss.la libXss.so.1 libbfd.a libopcodes.a libpython2.7.so libz.so = libz.so.1.2.11 python2.7 > > [env]# python > Python 2.7.15 (default, Jan 1 1970, 00:00:01)=20 > [GCC 5.5.0] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import ctypes; >>>> from ctypes import *; >>>> libc=3DCDLL("libc.so.6"); >>>> libc > >>>> libz=3DCDLL("libz.so.1"); > Traceback (most recent call last): > File "", line 1, in > File "/gnu/store/aws3fsg614lqr392y5pp9w65dy7gmvlx-python2-2.7.15/lib/py= thon2.7/ctypes/__init__.py", line 366, in __init__ > self._handle =3D _dlopen(self._name, mode) > OSError: libz.so.1: cannot open shared object file: No such file or direc= tory Using the full file name would work, for example: ./pre-inst-env guix environment --ad-hoc python zlib -- \ python3 -c "import os; import ctypes; libz=3Dctypes.CDLL(os.environ['GU= IX_ENVIRONMENT']+'/lib/libz.so.1')" --=20 Ricardo