bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39079: SBCL CFFI from Guix unable to find dynamic libraries


From: Pierre Neidhardt
Subject: bug#39079: SBCL CFFI from Guix unable to find dynamic libraries
Date: Sat, 11 Jan 2020 10:58:07 +0100

Hi Evan,

This is a current limitation on Guix because CFFI hardcodes the lib path
to /usr/lib, etc.
Maybe we could fix this, but it's not very clear how.

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---

In the above, edit "~/.guix-extra-profiles" to point to the directory
where you store all your profiles.

Hope that helps!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]