all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* sbcl/glibc troubles
@ 2018-09-13  3:14 Benjamin Slade
  2018-09-13  7:47 ` Pierre Neidhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Slade @ 2018-09-13  3:14 UTC (permalink / raw)
  To: Guix-Help

I'm trying (ultimately) to install "shuffletron" [
http://vintage-digital.com/hefner/software/shuffletron/ ], a common lisp
music player, but I'm getting stuck on one of its dependencies,
"osicat", with the following error from `(ql:quickload "osicat")` under sbcl:

<-------------------------------------------------->
; Loading "osicat"
..
debugger invoked on a CFFI:LOAD-FOREIGN-LIBRARY-ERROR in thread
#<THREAD "main thread" RUNNING {10005585B3}>:
  Unable to load foreign library (LIBOSICAT).
  Error opening shared object "/home/emacsomancer/.cache/common-lisp/sbcl-1.4.4-linux-x64/home/emacsomancer/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/libosicat.so":
  /gnu/store/l4lr0f5cjd0nbsaaf8b5dmcw1a1yypr3-glibc-2.27/lib/libc.so.6: version `GLIBC_2.28' not found (required by /home/emacsomancer/.cache/common-lisp/sbcl-1.4.4-linux-x64/home/emacsomancer/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/libosicat.so).
<-------------------------------------------------->

I have glibc-2.28 installed however.  Is there a way to get it to
associate with this instead of (for whatever reason) with glibc-2.27?

 —Ben

--
Benjamin Slade - https://babbagefiles.xyz
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sbcl/glibc troubles
  2018-09-13  3:14 sbcl/glibc troubles Benjamin Slade
@ 2018-09-13  7:47 ` Pierre Neidhardt
  2018-09-14  2:52   ` Benjamin Slade
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Neidhardt @ 2018-09-13  7:47 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: Guix-Help

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

This is the typical issue you'll always run into when using Common Lisp with
foreign libraries.
I know this very well since I'm working on packaging other Common Lisp programs
like Next browser and cl-torrents.

CFFI is the Common Lisp C Foreign Function Interface.  It looks up libraries in
/usr/lib... by default.  You want to change this path in
`cffi:*foreign-library-directories*`.  Ideally, you would add the canonical path
of all the required libraries there.  If you want to go the lazy way, simply
install the libraries in your user profile and add ~/.guix-profile/lib to this
variable.

Basically all you need is to call

--8<---------------cut here---------------start------------->8---
(ql:quickload :cffi)
(push (format nil "~a/.guix-profile/lib/" (uiop:getenv "HOME")) cffi:*foreign-library-directories*)
--8<---------------cut here---------------end--------------->8---

before calling quickload.
Note that the trailing "/" in the library path is important.

Hope that helps!

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sbcl/glibc troubles
  2018-09-13  7:47 ` Pierre Neidhardt
@ 2018-09-14  2:52   ` Benjamin Slade
  2018-09-14  6:51     ` Pierre Neidhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Slade @ 2018-09-14  2:52 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: Guix-Help

On 2018-09-13T01:47:49-0600, Pierre Neidhardt <mail@ambrevar.xyz> wrote:

 > Basically all you need is to call

 > --8<---------------cut here---------------start------------->8---
 > (ql:quickload :cffi)
 > (push (format nil "~a/.guix-profile/lib/" (uiop:getenv "HOME")) cffi:*foreign-library-directories*)
 > --8<---------------cut here---------------end--------------->8---

 > before calling quickload.
 > Note that the trailing "/" in the library path is important.

I must not be doing something right, because it still complains about
not being able to find GLIBC_2.28. I notice it also says:

(CFFI::FL-ERROR "Unable to load foreign library (~A).~%  ~A" :LIBOSICAT #<(SIMPLE-BASE-STRING 422) Error opening shared object "/home/slade/.cache/common-lisp/sbcl-1.4.4-linux-x64/home/slade/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/libosicat.so":

 —Ben


-- 
Benjamin Slade - https://babbagefiles.xyz
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sbcl/glibc troubles
  2018-09-14  2:52   ` Benjamin Slade
@ 2018-09-14  6:51     ` Pierre Neidhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Neidhardt @ 2018-09-14  6:51 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: Guix-Help

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

Sorry, I misread the error message.
Your error is unrelated I think, although you might need the aforementioned
trick later.

The problem is with libosicat.  How did you install it?
It seems to me that it came pre-compiled as a binary.
You can check this with

  ldd /home/slade/.cache/common-lisp/sbcl-1.4.4-linux-x64/home/slade/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/libosicat.so

(Find `ldd` in the gcc-toolchain package.)

If I'm right, you need to package libosicat for Guix first so that the linker
knows about the right Glibc, etc. which paths are different on Guix compared to
most traditional distributions.

Once you get libosicat compiled correctly (check the output of ldd to make sure
there is no missing library) it should work fine.  If not, try to customize
cffi:*foreign-library-directories*.

Let me know if you need help with osicat.

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-14  6:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-13  3:14 sbcl/glibc troubles Benjamin Slade
2018-09-13  7:47 ` Pierre Neidhardt
2018-09-14  2:52   ` Benjamin Slade
2018-09-14  6:51     ` Pierre Neidhardt

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.