From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= Subject: Python: Error loading shared library in Guix Date: Tue, 19 Mar 2019 15:25:19 +0100 Message-ID: <20190319152519.1caef235@alma-ubu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/9/rlxLzLcFUDQUEIfsiVTqb"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:34012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6Fs4-0007xy-M7 for guix-devel@gnu.org; Tue, 19 Mar 2019 10:37:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6FgC-0000xV-C3 for guix-devel@gnu.org; Tue, 19 Mar 2019 10:25:25 -0400 Received: from m4s11.vlinux.de ([83.151.27.109]:33524 helo=bjoernhoefling.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6FgB-0000ue-HR for guix-devel@gnu.org; Tue, 19 Mar 2019 10:25:24 -0400 Received: from alma-ubu (p508ACFE7.dip0.t-ipconnect.de [80.138.207.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bjoernhoefling.de (Postfix) with ESMTPSA id 913A23F995 for ; Tue, 19 Mar 2019 15:25:20 +0100 (CET) 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: guix-devel --Sig_/9/rlxLzLcFUDQUEIfsiVTqb Content-Type: multipart/mixed; boundary="MP_/=OeY1_.9gNsk6dB.Krn.aSF" --MP_/=OeY1_.9gNsk6dB.Krn.aSF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I'm trying to package TaskCoach (https://www.taskcoach.org/) and stumble upon a problem when running it: It cannot load a shared library with ctypes. Here is the stacktrace: File "/gnu/store/xnigri1g96wl0n14d9bfjyn7jnkn0f6c-taskcoach-1.4.4/lib/pyt= hon2.7/site-packages/taskcoachlib/application/application.py", line 226, in= init self.settings, splash=3Dsplash) File "/gnu/store/xnigri1g96wl0n14d9bfjyn7jnkn0f6c-taskcoach-1.4.4/lib/pyt= hon2.7/site-packages/taskcoachlib/gui/mainwindow.py", line 92, in __init__ self.taskFile.efforts()) File "/gnu/store/xnigri1g96wl0n14d9bfjyn7jnkn0f6c-taskcoach-1.4.4/lib/pyt= hon2.7/site-packages/taskcoachlib/gui/idlecontroller.py", line 84, in __ini= t__ super(IdleController, self).__init__() File "/gnu/store/xnigri1g96wl0n14d9bfjyn7jnkn0f6c-taskcoach-1.4.4/lib/pyt= hon2.7/site-packages/taskcoachlib/patterns/observer.py", line 333, in __ini= t__ super(Observer, self).__init__(*args, **kwargs) File "/gnu/store/xnigri1g96wl0n14d9bfjyn7jnkn0f6c-taskcoach-1.4.4/lib/pyt= hon2.7/site-packages/taskcoachlib/powermgt/idle.py", line 111, in __init__ IdleQuery.__init__(self) File "/gnu/store/xnigri1g96wl0n14d9bfjyn7jnkn0f6c-taskcoach-1.4.4/lib/pyt= hon2.7/site-packages/taskcoachlib/powermgt/idle.py", line 46, in __init__ _xss =3D CDLL('libXss.so.1') File "/gnu/store/aws3fsg614lqr392y5pp9w65dy7gmvlx-python2-2.7.15/lib/pyth= on2.7/ctypes/__init__.py", line 366, in __init__ self._handle =3D _dlopen(self._name, mode) OSError: libXss.so.1: cannot open shared object file: No such file or direc= tory I had no glue at all what's going on, so I read a bit in the Python manual and tried to reproduce this in a container: https://docs.python.org/3/library/ctypes.html $ guix environment -C --ad-hoc python2 coreutils binutils less which libxscrnsaver zlib [env]# ls $GUIX_ENVIRONMENT/lib libXss.a libXss.so libXss.so.1.0.0 libbfd.la libopcodes.la libpython= 2.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/pyth= on2.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 directo= ry So, it can load "libc.so.6", but not "libz.so.1", which I found in my environments lib folder. What's wrong here? How can I load the library in Guix? Do I have to set anything beforehand? I thought the environment would care for me. Do I need to add anything to my package definition to fix that? If that helps, I attached the first version of my package definition, it's not nice, but builds and runs (until the above stacktrace appears). Thanks, Bj=C3=B6rn =09 --MP_/=OeY1_.9gNsk6dB.Krn.aSF Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-XXX-TaskCoach-First-stub.patch =46rom d5ef3a9fb50b88fe1b38b8d62bf3ff78c0fcd147 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Bj=3DC3=3DB6rn=3D20H=3DC3=3DB6fling?=3D Date: Mon, 18 Mar 2019 23:15:01 +0100 Subject: [PATCH] XXX: TaskCoach: First stub. --- gnu/packages/task-management.scm | 99 +++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-managemen= t.scm index 701e14a5e2..911e4a8475 100644 --- a/gnu/packages/task-management.scm +++ b/gnu/packages/task-management.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 Tom=C3=A1=C5=A1 =C4=8Cech +;;; Copyright =C2=A9 2019 Bj=C3=B6rn H=C3=B6fling ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,9 +22,14 @@ #:use-module (guix packages) #:use-module (gnu packages linux) #:use-module (gnu packages lua) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages tls) + #:use-module (gnu packages wxwidgets) + #:use-module (gnu packages xorg) #:use-module (guix download) - #:use-module (guix build-system cmake)) + #:use-module (guix build-system cmake) + #:use-module (guix build-system python)) =20 (define-public taskwarrior (package @@ -59,3 +65,94 @@ Done time management method. It supports network synchronization, filteri= ng and querying data, exposing task data in multiple formats to other tools.") (license license:expat))) + +(define-public taskcoach + (package + (name "taskcoach") + (version "1.4.4") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/taskcoach/taskcoach/Release-" version = "/TaskCoach-" version ".tar.gz")) + (sha256 (base32 + "1jb5n4xmb7qdhcgg3lfin293jcks1g8qvqkjfrfifpmfmpmjqv50")))) + (build-system python-build-system) + (inputs + `(("python2-wxpython" ,python2-wxpython) + ("python2-twisted" ,python2-twisted) + )) + (propagated-inputs + `( + ("libxscrnsaver" ,libxscrnsaver) + )) + + (arguments + `(#:tests? #f ; TODO: Needs X11. Maybe simulate one? Cmp. OpenCV. + #:python ,python-2)) + ;; `(#:tests? #f ; No tests implemented. + ;; #:phases + ;; (modify-phases %standard-phases + ;; (add-before + ;; 'patch-source-shebangs 'remove-broken-symlinks + ;; (lambda _ + ;; ;; These files are broken symlinks - delete them. + ;; (delete-file "src/cal") + ;; (delete-file "src/calendar") + ;; (delete-file "src/tw")))))) + (home-page "https://www.taskcoach.org") + (synopsis "TODO") + (description + "TODO") + ;; thirdparty: + ;; aui: wxPython license. + ;; chardet: LGPL 2.1+ + + ;; EXPAT: + ;; guid.py + ;; deltaTime.py + ;; https://github.com/pyparsing/pyparsing/blob/master/examples/deltaTi= me.py + ;; This is part of pyparsing and thus under EXPAT license. + + ;; snarl.py: This is the same file modulo whitespace and header change= s that was + ;; published under version 0.2a und GPLv2 here: + ;; https://github.com/abl/python-snarl/commit/4e6a26edfc477f5a56493a3a= 91d7cc3547e28945 + + ;; _weakrefset.py: Part of Python, license:psfl. + + ;; dateutil: PSFL + + ;; desktop: LGPG 3+ + + ;; gntp: This is GNTP v0.8, see + ;; https://github.com/kfdm/gntp/tree/a4c1c69cabaa0faa1f650eab193c98725= 16eb192/gntp + ;; and is thus under EXPAT license. + + ;; keyring: EXPAT | PSFL + ;; See https://github.com/philipn/python-keyring-lib + + ;; lockfile: MIT + ;; https://github.com/smontanaro/pylockfile/blob/426db4cc4389539797f2b= 5f26883a55534ce6648/LICENSE + + ;; ntlm: LGPLv3+ + ;; http://sourceforge.net/projects/ntlmaps/ + + ;; pubsub: BSD-2-clause: + ;; http://pypubsub.sourceforge.net/about.html#license + + ;; squaremap: EXPAT + ;; https://bazaar.launchpad.net/~mcfletch/squaremap/trunk/view/head:/l= icense.txt + + ;; timeline + ;; according to this stackoverflow answer, this is written by Frank Ni= ssink for TaskCoach: + ;; https://stackoverflow.com/questions/715950/a-wxpython-timeline-widg= et/819462#819462 + ;; thus, it is GPL3+ + + ;; wxScheduler: + ;; https://github.com/expobrain/wxscheduler/tree/1.3.0 + ;; wxLicense + + ;; xdg + ;; LGPL v2 + ;; https://github.com/takluyver/pyxdg/blob/master/COPYING + (license license:gpl3+))) --=20 2.20.1 --MP_/=OeY1_.9gNsk6dB.Krn.aSF-- --Sig_/9/rlxLzLcFUDQUEIfsiVTqb Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXJD7zwAKCRC/KGy2WT5f /d9lAJ9GLRQyP8LacqM0ukluPxLHj7jjagCfQjbpvNQv+/HbZBcljs4cPEybwCg= =Oata -----END PGP SIGNATURE----- --Sig_/9/rlxLzLcFUDQUEIfsiVTqb--