From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: next browser (was: Packaging a free Firefox) Date: Thu, 24 May 2018 16:18:28 +0200 Message-ID: <87fu2hw30r.fsf@gmail.com> References: <87y3h1g42q.fsf@lassieur.org> <87wowlg3vu.fsf@lassieur.org> <20180503050020.ljaqgrop6uwy24op@abyayala> <87muxhfhqq.fsf@gmail.com> <876044lsci.fsf@gmail.com> <20180503233604.69fd089c@uwaterloo.ca> <87mux8n5gq.fsf@gmail.com> <20180510020041.1e8b3956@uwaterloo.ca> <87d0y3hije.fsf@gmail.com> <3e43616290027f58207fe54d748183e9.squirrel@mailservices.uwaterloo.ca> <877eobh92c.fsf@gmail.com> <20180511010037.6951035e@uwaterloo.ca> <87efi7wion.fsf@gmail.com> <871se1crci.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLr4g-0003BB-5S for guix-devel@gnu.org; Thu, 24 May 2018 10:18:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLr4Z-0007Mt-VJ for guix-devel@gnu.org; Thu, 24 May 2018 10:18:38 -0400 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:53198) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLr4Z-0007MV-Nz for guix-devel@gnu.org; Thu, 24 May 2018 10:18:31 -0400 Received: by mail-wm0-x22f.google.com with SMTP id 18-v6so51752wml.2 for ; Thu, 24 May 2018 07:18:31 -0700 (PDT) In-reply-to: <871se1crci.fsf@elephly.net> 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: Ricardo Wurmus Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ricardo Wurmus writes: >> The main issue is with cffi: it does not find the libraries installed by= Guix. > [=E2=80=A6] > > I don=E2=80=99t understand this. Should it load any libraries that the u= ser may > have installed? Or do you only refer to a specific set of libraries > that is known at build time? Sorry for the confusing report, I suppose it needs more details: cffi is the "common foreign function interface" for Common Lisp. It allows for writing bindings to libraries written in different languages (mostly C as far as I understand). http://common-lisp.net/project/cffi cffi-based projects like Next load libraries at runtime (in this case .so files). No special provision is taken for finding those libaries, or at least nothing I could spot from the source code. I understand that it relies on system calls. But while dlopen("libsqlite3.so") works in C, cffi fails to load "libsqlite3.so", unless we specify an appropriate LD_LIBRARY_PATH. I'm not quite sure how applications find libraries on GuixSD. >> --8<---------------cut here---------------start------------->8--- >> LISP?=3Dsbcl >> >> build-gtk: >> $(LISP) \ >> --eval '(ql:quickload :cffi)' \ >> --eval '(push (format nil "~a/.guix-profile/lib/" (uiop:getenv "HOME")= ) cffi:*foreign-library-directories*)' \ >> ## Rest is as usual. >> --load next.asd \ >> --eval '(ql:quickload :next/gtk)' \ >> --eval '(asdf:make :next/gtk)' \ >> --eval '(quit)' >> --8<---------------cut here---------------end--------------->8--- > > This would not be good, because packages can be installed in different > profiles, not only in the user=E2=80=99s home directory. Indeed, but I don't know a better solution. Any idea how to do this properly? GuixSD has LIBRARY_PATH=3D~/.guix-profile/lib, can we use that? =2D-=20 Pierre Neidhardt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlsGybQACgkQm9z0l6S7 zH/sCAf9EinP4o8pS66rr9knHU7fljcryVbGFmy/JB3kxcY55kNNmIwKA+7tkIvZ VAnipcfZ6LOZtyyHeMSgMfHH/Qw3EVzb1WJzTRWqPjrYCdrbDE8m5IV7Zx4ZZQKQ BuhRWOlhsEuY0iJuoF2RE1II90CnJqfAjbclpDhWCPhIYQ5xfXBd1MSoQjE6tH9q pSJcitQcUZLFeczcFKewXDFpIh3XG8I/b3MSjaXwsc9eJcwhVS4no7Tzn5w/uYUm JoZNKz2eaWZ7a6SjMw+25KUPi+GLLUdoXq+VAUVfSkiEvYjsfoIbxYgBRJTFqk0C cdzf1yu2dP3O1DRSLUJxERMgbqR6fw== =ICkV -----END PGP SIGNATURE----- --=-=-=--