all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Python: Error loading shared library in Guix
Date: Tue, 19 Mar 2019 15:52:41 +0100	[thread overview]
Message-ID: <8736nincg6.fsf@elephly.net> (raw)
In-Reply-To: <20190319152519.1caef235@alma-ubu>


Björn Höfling <bjoern.hoefling@bjoernhoefling.de> writes:

> [env]# ls $GUIX_ENVIRONMENT/lib
> libXss.a   libXss.so	libXss.so.1.0.0  libbfd.la     libopcodes.la	libpython2.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) 
> [GCC 5.5.0] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import ctypes;
>>>> from ctypes import *;
>>>> libc=CDLL("libc.so.6");
>>>> libc
> <CDLL 'libc.so.6', handle 7fac69a4b550 at 7fac69733110>
>>>> libz=CDLL("libz.so.1");
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/gnu/store/aws3fsg614lqr392y5pp9w65dy7gmvlx-python2-2.7.15/lib/python2.7/ctypes/__init__.py", line 366, in __init__
>     self._handle = _dlopen(self._name, mode)
> OSError: libz.so.1: cannot open shared object file: No such file or directory

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=ctypes.CDLL(os.environ['GUIX_ENVIRONMENT']+'/lib/libz.so.1')"

-- 
Ricardo

  reply	other threads:[~2019-03-19 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 14:25 Python: Error loading shared library in Guix Björn Höfling
2019-03-19 14:52 ` Ricardo Wurmus [this message]
2019-03-19 18:04   ` Björn Höfling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736nincg6.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=bjoern.hoefling@bjoernhoefling.de \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.