all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Evan Straw <evan.straw99@gmail.com>
To: Pierre Niedhardt <mail@ambrevar.xyz>
Cc: 39079@debbugs.gnu.org
Subject: bug#39079: SBCL CFFI from Guix unable to find dynamic libraries
Date: Mon, 13 Jan 2020 14:11:53 -0800	[thread overview]
Message-ID: <87v9pfm2fq.fsf@gmail.com> (raw)
In-Reply-To: <87ftgm3bo4.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2563 bytes --]


Hi Pierre,
Thanks for your response.

>In the meantime, you can add this to your ~/.sbclrc:
>
>--8<---------------cut here---------------start------------->8---
>(when (ignore-errors (asdf:load-system "cffi"))
>  ;; Warning: Trailing "/" matters!
>  (dolist (guix-profile
>           `(,(when (uiop:directory-exists-p "~/.guix-profile")
>                (format nil "~a/.guix-profile/lib/" (uiop:getenv "HOME")))
>              ,@(mapcar (lambda (d)
>                          (format nil "~a~a/lib/"
>                                  (namestring d)
>                                  (first (last (pathname-directory d)))))
>                        (uiop:subdirectories "~/.guix-extra-profiles/"))))
>    (push guix-profile
>          (symbol-value (find-symbol (string '*foreign-library-directories*)
>                                     (find-package 'cffi))))))
>--8<---------------cut here---------------end--------------->8---

I attempted to add this to my .sbclrc, and added the "/usr/lib/x86_64-linux-gnu"
directory to that list as well. This seems to have made some progress, because
now, when I load CFFI, the *foreign-library-directories* variable is populated
with a list of directories. Additionally, CFFI is capable of loading libraries
installed through Guix as well with no issues. 

However, the thing that still doesn't appear to be working right is loading
libraries from the foreign distro. I get the same behavior as before when
attempting to load a library under the foreign distro's library directory
(/usr/lib/x86_64-linux-gnu): It loads the library itself but fails upon trying
to load any dependencies, even if they are in the same directory. Ideally, I
would just install the libraries I need from Guix, but I specifically want to
interface with a library from the system, in this case PulseAudio (I've just
been using libcurl as a test to make sure it works). 

I did some investigation and tried both installing just CFFI from another
source, and then SBCL itself. Installing CFFI from Quicklisp but keeping SBCL
from Guix gave the same behavior and was unable to load dependencies of the
library. Installing SBCL from APT and CFFI from Quicklisp was able to load the
library and all dependencies with no issues. From this, I'm wondering if it's a
problem with SBCL itself instead of CFFI? 

Do you (or anyone reading this thread) have any thoughts on this? Is this a bug
in the SBCL package, and if so, is there any way to work around it currently? 

Thanks for the help.
-- Evan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2020-01-13 22:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11  3:38 bug#39079: SBCL CFFI from Guix unable to find dynamic libraries Evan Straw
2020-01-11  9:58 ` Pierre Neidhardt
2020-01-13 22:11 ` Evan Straw [this message]
2020-01-13 22:22   ` Pierre Neidhardt
2020-01-14  5:52     ` Konrad Hinsen
2020-01-14  9:38       ` Pierre Neidhardt
2020-01-14 10:11         ` Konrad Hinsen
2020-01-14 10:25           ` Pierre Neidhardt
2020-01-14 21:30 ` Evan Straw
2020-01-15  7:45   ` Pierre Neidhardt
2020-01-15  8:53     ` Konrad Hinsen
2020-01-15  9:13       ` Pierre Neidhardt
2020-01-16 18:36         ` Evan Straw
2020-01-17 15:49           ` Pierre Neidhardt
2020-01-17 21:24       ` Ludovic Courtès
2020-01-17 21:27   ` Ludovic Courtès
2020-01-18 10:50     ` Pierre Neidhardt
2020-01-18 16:17       ` Ludovic Courtès

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=87v9pfm2fq.fsf@gmail.com \
    --to=evan.straw99@gmail.com \
    --cc=39079@debbugs.gnu.org \
    --cc=mail@ambrevar.xyz \
    /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.