unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help Packaging Incudine (Common Lisp)
@ 2023-09-26 20:31 Théo Tyburn
  2023-09-28 12:23 ` Théo Tyburn
  2023-09-28 14:20 ` Théo Tyburn
  0 siblings, 2 replies; 9+ messages in thread
From: Théo Tyburn @ 2023-09-26 20:31 UTC (permalink / raw)
  To: guix-devel

Hi there,

I'm trying to package Incudine, a Music/DSP programming environment for
Common Lisp. I'm stuck with the binding of libsndfile. First
libsndfile.so could not be found, but I fixed the paths like it is
commonly done in other CL packages. Next problem is that somehow the
bindings are not working. The error I get:

> file: /gnu/store/s2657snmavhsnqyr0hf6f8a2v1lvrln2-sbcl-incudine-0.0.0-1.21c99e4/share/common-lisp/sbcl/incudine/contrib/cl-sndfile/cffi-sndfile.lisp
> in: DEFUN MAKE-SNDINFO
>     (CFFI:FOREIGN-TYPE-SIZE '(:STRUCT SNDFILE:INFO))
> 
> caught WARNING:
>   Error during compiler-macroexpansion of
>   (CFFI:FOREIGN-TYPE-SIZE '(:STRUCT INFO)). Use *BREAK-ON-SIGNALS* to intercept.
>   
>    Unknown CFFI type (:STRUCT INFO)

Now in the source file `cffi-sndfile.lisp`, there is:

> (declaim (inline make-sndinfo))
> (defun make-sndinfo (&optional pointer)
>   (%make-sndinfo
>     :pointer (or pointer
>                  (cffi:foreign-alloc :int8
>                    :count (cffi:foreign-type-size '(:struct info))
>                    :initial-element 0))))
> 
> [...]
> 
> (cffi:defcstruct info
>   (frames sf-count)
>   (sample-rate :int)
>   (channels :int)
>   (format :int)
>   (sections :int)
>   (seekable :int))

If I look at the source `sndfile.h` (which is present in source/.cl-union)
there is:

> struct SF_INFO
> {	sf_count_t	frames ;		/* Used to be called samples.  Changed to avoid confusion. */
> 	int			samplerate ;
> 	int			channels ;
> 	int			format ;
> 	int			sections ;
> 	int			seekable ;
> } ;

So things look like they should match. Is there something I'm missing
here? I have 0 experience with CFFI bindings, so there might be
something obvious I'm missing.

Cheers

Théo


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

* Re: Help Packaging Incudine (Common Lisp)
  2023-09-26 20:31 Help Packaging Incudine (Common Lisp) Théo Tyburn
@ 2023-09-28 12:23 ` Théo Tyburn
  2023-09-29  4:29   ` Liliana Marie Prikler
  2023-09-28 14:20 ` Théo Tyburn
  1 sibling, 1 reply; 9+ messages in thread
From: Théo Tyburn @ 2023-09-28 12:23 UTC (permalink / raw)
  To: guix-devel

Oh, it seems I took the WARNING message for an ERROR message.

The error message seems to just be:
> Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD tid=21 "main thread" RUNNING
>                                                          {100AFE8113}>:
>  COMPILE-FILE-ERROR while
>  compiling #<CL-SOURCE-FILE "cl-sndfile" "cffi-sndfile">

No sure what can be done with this.

I include the whole backlog, maybe this helps:

> Invoking sbcl:
> "/gnu/store/pp8pa2gl73gdn7vazjih16px7r28hqv0-sbcl-2.3.5/bin/sbcl"
> "--non-interactive" "--eval" "(require :asdf)" "--eval"
> "(asdf:initialize-source-registry (list :source-registry (list :tree
> (uiop:ensure-pathname
> \"/gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/share/common-lisp/sbcl/incudine\"
> :truenamize t :ensure-directory t)) :inherit-configuration))"
> "--eval" "(asdf:load-system \"cl-sndfile\")"
> This is SBCL 2.3.5, an implementation of ANSI Common Lisp.
> More information about SBCL is available at <http://www.sbcl.org/>.

> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses.  See the CREDITS and COPYING files in the
> distribution for more information.
> ; compiling file
> "/gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/share/common-lisp/sbcl/incudine/contrib/cl-sndfile/package.lisp"
> (written 01 JAN 1970 12:00:00 AM):

> ; wrote
> /gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/lib/common-lisp/sbcl/incudine/contrib/cl-sndfile/package-tmpGHU3ALSV.fasl
> ; compilation finished in 0:00:00.004
> ; compiling file
> "/gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/share/common-lisp/sbcl/incudine/contrib/cl-sndfile/error.lisp"
> (written 01 JAN 1970 12:00:00 AM):

> ; wrote
> /gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/lib/common-lisp/sbcl/incudine/contrib/cl-sndfile/error-tmpAAURSO1.fasl
> ; compilation finished in 0:00:00.008
> ; compiling file
> "/gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/share/common-lisp/sbcl/incudine/contrib/cl-sndfile/cffi-sndfile.lisp"
> (written 01 JAN 1970 12:00:00 AM):

> ; file:
> /gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/share/common-lisp/sbcl/incudine/contrib/cl-sndfile/cffi-sndfile.lisp
> ; in: DEFUN MAKE-SNDINFO
> ;     (CFFI:FOREIGN-TYPE-SIZE '(:STRUCT SNDFILE:INFO))
> ; 
> ; caught WARNING:
> ;   Error during compiler-macroexpansion of
> ;   (CFFI:FOREIGN-TYPE-SIZE '(:STRUCT INFO)). Use *BREAK-ON-SIGNALS* to intercept.
> ;   
> ;    Unknown CFFI type (:STRUCT INFO)


> ; wrote /gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/lib/common-lisp/sbcl/incudine/contrib/cl-sndfile/cffi-sndfile-tmp5GEXGEG5.fasl
> ; compilation finished in 0:00:00.152
> Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD tid=21 "main thread" RUNNING
>                                                           {100AFE8113}>:
>   COMPILE-FILE-ERROR while
>   compiling #<CL-SOURCE-FILE "cl-sndfile" "cffi-sndfile">

> Backtrace for: #<SB-THREAD:THREAD tid=21 "main thread" RUNNING {100AFE8113}>
> 0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {10056B7423}> #<unused argument> :QUIT T)1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {10056B7423}>)
> 2: (INVOKE-DEBUGGER #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {10056B7423}>)
> 3: (ERROR UIOP/LISP-BUILD:COMPILE-FILE-ERROR :CONTEXT-FORMAT "~/asdf-action::format-action/" :CONTEXT-ARGUMENTS ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-sndfile" "cffi-sndfile">)))
> 4: (UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-sndfile" "cffi-sndfile">)))
> 5: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-sndfile" "cffi-sndfile">)
> 6: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
> 7: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-sndfile" "cffi-sndfile">) [fast-method]
> 8: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1004CC5AC3}>) [fast-method]
> 9: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
> 10: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1004CC5AC3}>) [fast-method]
> 11: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "cl-sndfile"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
> 12: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "cl-sndfile">)
> 13: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
> 14: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "cl-sndfile">) [fast-method]
> 15: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> ASDF/LISP-ACTION:LOAD-OP "cl-sndfile")
> 16: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
> 17: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "cl-sndfile") [fast-method]
> 18: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {100454AFAB}> :OVERRIDE T :KEY NIL :OVERRIDE-CACHE T :OVERRIDE-FORCING NIL)
> 19: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
> 20: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {10034DA56B}> :OVERRIDE NIL :KEY NIL :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL)
> 21: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "cl-sndfile") [fast-method]
> 22: (ASDF/OPERATE:LOAD-SYSTEM "cl-sndfile")
> 23: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF/OPERATE:LOAD-SYSTEM "cl-sndfile") #<NULL-LEXENV>)
> 24: (EVAL (ASDF/OPERATE:LOAD-SYSTEM "cl-sndfile"))
> 25: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(require :asdf)") (:EVAL . #<(SIMPLE-ARRAY CHARACTER (258)) (asdf:initialize-source-registry (list :source-registry (list :tree (uiop:ensure-pathname "/gnu/store/g8g7v4dvdylv2n6kjixgyxxsmgaqa5ka-sbcl-incudine-0.0.0-1.21c99e4/share/common-lisp/sbcl/incudine" :t... {100B0D719F}>) (:EVAL . "(asdf:load-system \"cl-sndfile\")") (:QUIT)))
> 26: (SB-IMPL::TOPLEVEL-INIT)
> 27: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
> 28: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
> 29: (SB-IMPL::%START-LISP)

> unhandled condition in --disable-debugger mode, quitting
> ; 
> ; compilation unit aborted
> ;   caught 1 fatal ERROR condition
> ;   caught 1 WARNING condition


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

* Re: Help Packaging Incudine (Common Lisp)
  2023-09-26 20:31 Help Packaging Incudine (Common Lisp) Théo Tyburn
  2023-09-28 12:23 ` Théo Tyburn
@ 2023-09-28 14:20 ` Théo Tyburn
  1 sibling, 0 replies; 9+ messages in thread
From: Théo Tyburn @ 2023-09-28 14:20 UTC (permalink / raw)
  To: guix-devel

For some weird reasons I manage to compile this reluctant file in an
interactive session by accepting the error in the debugger and retrying
compilation later on when the compiled file is required.

Not sure in what retrying a compilation on the interactive debugger is
different from compiling normally. But I need to understand why the
retrying of compilation does in order to replicate it without the need
of an interactive session.

Here are the logs:
This is the first error where where I accept:

> ASDF could not load incudine because
> COMPILE-FILE-ERROR while
> compiling #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">.
> While evaluating the form starting at line 3, column 0
>   of #P"/home/teddd/src/music/incudine/require.lisp":

> debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
> #<THREAD tid=19946 "main thread" RUNNING {100AFF0113}>:
>   COMPILE-FILE-ERROR while
>   compiling #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">

> Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

> restarts (invokable by number or by possibly-abbreviated name):
>   0: [RETRY                        ] Retry
>                                      compiling #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">.
>   1: [ACCEPT                       ] Continue, treating
>                                      compiling #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">
>                                      as having been successful.
>   2:                                 Retry ASDF operation.
>   3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
>                                      configuration.
>   4:                                 Retry ASDF operation.
>   5:                                 Retry ASDF operation after resetting the
>                                      configuration.
>   6: [RETRY                        ] Retry EVAL of current toplevel form.
>   7: [CONTINUE                     ] Ignore error and continue loading file "/home/teddd/src/music/incudine/require.lisp".
>   8: [ABORT                        ] Abort loading file "/home/teddd/src/music/incudine/require.lisp".
>   9:                                 Ignore runtime option --load "require.lisp".
>  10:                                 Skip rest of --eval and --load options.
>  11:                                 Skip to toplevel READ/EVAL/PRINT loop.
>  12: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

> (UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/USER::INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">)))
> ; File has been modified since compilation:
> ;   SYS:CONTRIB;ASDF;ASDF.LISP.NEWEST
> ; Using form offset instead of character position.

>    source: (ERROR 'COMPILE-FILE-ERROR :CONTEXT-FORMAT CONTEXT-FORMAT
>                   :CONTEXT-ARGUMENTS CONTEXT-ARGUMENTS)
> 0] 1

Then comes the second error where I retry compilation:

> ASDF could not load incudine because
> Couldn't load
> #P"/home/teddd/.cache/common-lisp/sbcl-2.3.5-linux-x64/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile.fasl":
> file does not exist..
> While evaluating the form starting at line 3, column 0
>   of #P"/home/teddd/src/music/incudine/require.lisp":

> debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
> #<THREAD tid=19946 "main thread" RUNNING {100AFF0113}>:
>   Couldn't load
>   #P"/home/teddd/.cache/common-lisp/sbcl-2.3.5-linux-x64/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile.fasl":
>   file does not exist.

> Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

> restarts (invokable by number or by possibly-abbreviated name):
>   0: [TRY-RECOMPILING              ] Recompile cffi-sndfile and try loading it again
>   1: [RETRY                        ] Retry loading FASL for
>    #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">.
>   2: [ACCEPT                       ] Continue, treating loading FASL for
>    #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">
>                                      as having been successful.
>   3:                                 Retry ASDF operation.
>   4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
>                                      configuration.
>   5:                                 Retry ASDF operation.
>   6:                                 Retry ASDF operation after resetting the
>                                      configuration.
>   7: [RETRY                        ] Retry EVAL of current toplevel form.
>   8: [CONTINUE                     ] Ignore error and continue loading file "/home/teddd/src/music/incudine/require.lisp".
>   9: [ABORT                        ] Abort loading file "/home/teddd/src/music/incudine/require.lisp".
>  10:                                 Ignore runtime option --load "require.lisp".
>  11:                                 Skip rest of --eval and --load options.
>  12:                                 Skip to toplevel READ/EVAL/PRINT loop.
>  13: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

> (LOAD #P"/home/teddd/.cache/common-lisp/sbcl-2.3.5-linux-x64/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
> 0] 0
> ; compiling file "/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile.lisp" (written 28 SEP 2023 03:02:26 PM):

> ; wrote /home/teddd/.cache/common-lisp/sbcl-2.3.5-linux-x64/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile-tmpJAIDFZTC.fasl
> ; compilation finished in 0:00:00.132

Tada. Any idea how I could achieve this without an interactive session ?


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

* Re: Help Packaging Incudine (Common Lisp)
  2023-09-28 12:23 ` Théo Tyburn
@ 2023-09-29  4:29   ` Liliana Marie Prikler
  2023-09-30 13:31     ` Théo Tyburn
  0 siblings, 1 reply; 9+ messages in thread
From: Liliana Marie Prikler @ 2023-09-29  4:29 UTC (permalink / raw)
  To: Théo Tyburn, guix-devel

Am Donnerstag, dem 28.09.2023 um 12:23 +0000 schrieb Théo Tyburn:
> Oh, it seems I took the WARNING message for an ERROR message.
> 
> The error message seems to just be:
> > Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-
> > THREAD:THREAD tid=21 "main thread" RUNNING
> >                                                         
> > {100AFE8113}>:
> >  COMPILE-FILE-ERROR while
> >  compiling #<CL-SOURCE-FILE "cl-sndfile" "cffi-sndfile">
> 
> No sure what can be done with this.
Note that this error doesn't tell you where CL would have written the
compiled file to.

Am Donnerstag, dem 28.09.2023 um 14:21 +0000 schrieb Théo Tyburn:
> Not sure in what retrying a compilation on the interactive debugger
> is different from compiling normally. But I need to understand why
> the retrying of compilation does in order to replicate it without the
> need of an interactive session.
I'd hazard a guess that your $HOME is writable in the interactive case
and not so much during guix build :)
Well, that still doesn't explain why the compilation fails normally in
the interactive case, does it?  I think for that you'd have to look up
uiop/lisp-build:compile-file and see when it raises errors.  Enter
rubber ducky.

Cheers


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

* Re: Help Packaging Incudine (Common Lisp)
  2023-09-29  4:29   ` Liliana Marie Prikler
@ 2023-09-30 13:31     ` Théo Tyburn
  2023-10-22 12:07       ` Guillaume Le Vaillant
  0 siblings, 1 reply; 9+ messages in thread
From: Théo Tyburn @ 2023-09-30 13:31 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: guix-devel


Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Donnerstag, dem 28.09.2023 um 12:23 +0000 schrieb Théo Tyburn:
>> Oh, it seems I took the WARNING message for an ERROR message.
>> 
>> The error message seems to just be:
>> > Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-
>> > THREAD:THREAD tid=21 "main thread" RUNNING
>> >                                                         
>> > {100AFE8113}>:
>> >  COMPILE-FILE-ERROR while
>> >  compiling #<CL-SOURCE-FILE "cl-sndfile" "cffi-sndfile">
>> 
>> No sure what can be done with this.
> Note that this error doesn't tell you where CL would have written the
> compiled file to.
>
> Am Donnerstag, dem 28.09.2023 um 14:21 +0000 schrieb Théo Tyburn:
>> Not sure in what retrying a compilation on the interactive debugger
>> is different from compiling normally. But I need to understand why
>> the retrying of compilation does in order to replicate it without the
>> need of an interactive session.
> I'd hazard a guess that your $HOME is writable in the interactive case
> and not so much during guix build :)
> Well, that still doesn't explain why the compilation fails normally in
> the interactive case, does it?  I think for that you'd have to look up
> uiop/lisp-build:compile-file and see when it raises errors.  Enter
> rubber ducky.

Yes, that's probably the right place to look for hints. Need to find out
where and how compiled files are written.

Thanks


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

* Re: Help Packaging Incudine (Common Lisp)
  2023-09-30 13:31     ` Théo Tyburn
@ 2023-10-22 12:07       ` Guillaume Le Vaillant
  2023-10-22 14:15         ` Théo Tyburn
  0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Le Vaillant @ 2023-10-22 12:07 UTC (permalink / raw)
  To: Théo Tyburn; +Cc: Liliana Marie Prikler, guix-devel

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

Hi.
Could you send the package definition you made for Incudine?
I could take a look at it and try to find where the issue comes from.

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

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

* Re: Help Packaging Incudine (Common Lisp)
  2023-10-22 12:07       ` Guillaume Le Vaillant
@ 2023-10-22 14:15         ` Théo Tyburn
  2023-10-23  8:44           ` Guillaume Le Vaillant
  0 siblings, 1 reply; 9+ messages in thread
From: Théo Tyburn @ 2023-10-22 14:15 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: Liliana Marie Prikler, guix-devel

Hi, sure. Note that here the installation is narrowed to the asd system
"cl-sndfile". But you could add or replace it by "incudine".

> (define-public sbcl-incudine
>   (let ((commit "21c99e4fe1b152c125a1bc6df915759b46cdab78")
>         (revision "1"))
>     (package
>      (name "sbcl-incudine")
>      (version (git-version "0.0.0" revision commit))
>      (source
>       (origin
>        (method git-fetch)
>        (uri (git-reference
>              (url "https://git.code.sf.net/p/incudine/incudine")
>              (commit commit)))
>        (file-name (git-file-name "incudine" version))
>        (sha256
>         (base32 "1zh17ifb6l8cpj5lzjz218h02c7rhf9khnh0lra3qmxd8dlwhqpa"))))
>      (build-system asdf-build-system/sbcl)
> 	 (arguments
>       `(#:asd-systems '("cl-sndfile")
> 		#:phases
> 		(modify-phases
> 		 %standard-phases
> 		 (add-after 'unpack 'fix-paths
> 					(lambda* (#:key inputs #:allow-other-keys)
> 					  ;; contrib
> 					  (map (lambda (system-name)
> 							 (substitute* (string-append "contrib/cl-"
> 														 system-name
> 														 "/cffi-"
> 														 system-name
> 														 ".lisp") 
> 										  (((string-append "lib" system-name "\\.so"))
> 										   (search-input-file inputs
> 															  (string-append "/lib/lib"
> 																			 system-name
> 																			 ".so")))))
> 						   '("sndfile" "portmidi"))
> 					  ;; foreign
> 					  (map (lambda (system-name)
> 							 (substitute* (string-append "src/foreign.lisp") 
> 										  (((string-append "lib" system-name "\\.so"))
> 										   (search-input-file inputs
> 															  (string-append "/lib/lib"
> 																			 system-name
> 																			 ".so")))))
> 						   '("fftw3" "gslcblas" "gsl" ""))
> 					  )))))
>      (inputs
>       (list sbcl-alexandria sbcl-bordeaux-threads sbcl-cffi sbcl-swap-bytes
> 			sbcl-trivial-garbage
> 			;; pthread
> 			;; jack
> 			portmidi
> 			libsndfile
> 			;; fftw
> 			gsl
> 			;; fluidsynth
> 			;; lilv
> 			))
>      (home-page "https://incudine.sourceforge.net")
>      (synopsis "Music/DSP programming environment for Common Lisp")
>      (description
>       "Incudine is useful to design software synthesizers or sound plugins from scratch, exploiting the expressive power of Common Lisp, without the constraint to use pre-built unit generators. It is also a compositional tool that allows to produce high quality sounds controllable at the sample level, defining and redefining the digital signal processors and the musical structures on-the-fly. ")
>      (license license:bsd-2))))

Guillaume Le Vaillant <glv@posteo.net> writes:

> [[PGP Signed Part:Undecided]]
> Hi.
> Could you send the package definition you made for Incudine?
> I could take a look at it and try to find where the issue comes from.
>
> [[End of PGP Signed Part]]



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

* Re: Help Packaging Incudine (Common Lisp)
  2023-10-22 14:15         ` Théo Tyburn
@ 2023-10-23  8:44           ` Guillaume Le Vaillant
  2023-10-24 20:25             ` Théo Tyburn
  0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Le Vaillant @ 2023-10-23  8:44 UTC (permalink / raw)
  To: Théo Tyburn; +Cc: Liliana Marie Prikler, guix-devel

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

Hi.

It looks like there's a bug in "contrib/cl-sndfile/cffi-sndfile.lisp".
The 'make-sndinfo' function definition tries to get the size of the
'info' foreign structure before this foreign structure is defined.

After moving the definition of 'make-sndinfo' at the end of the file,
compilation works.

I think you can report this issue upstream.

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

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

* Re: Help Packaging Incudine (Common Lisp)
  2023-10-23  8:44           ` Guillaume Le Vaillant
@ 2023-10-24 20:25             ` Théo Tyburn
  0 siblings, 0 replies; 9+ messages in thread
From: Théo Tyburn @ 2023-10-24 20:25 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: Liliana Marie Prikler, guix-devel

That's interesting. I was also suspicious about this function and mentioned it upstream but they said it is normal to do it like this so I just ignored it. Also I remember having tried out a dummy package, so I really believed it was ok.

Thanks for your help!

On October 23, 2023 10:44:57 AM GMT+02:00, Guillaume Le Vaillant <glv@posteo.net> wrote:
>Hi.
>
>It looks like there's a bug in "contrib/cl-sndfile/cffi-sndfile.lisp".
>The 'make-sndinfo' function definition tries to get the size of the
>'info' foreign structure before this foreign structure is defined.
>
>After moving the definition of 'make-sndinfo' at the end of the file,
>compilation works.
>
>I think you can report this issue upstream.


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

end of thread, other threads:[~2023-10-24 20:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-26 20:31 Help Packaging Incudine (Common Lisp) Théo Tyburn
2023-09-28 12:23 ` Théo Tyburn
2023-09-29  4:29   ` Liliana Marie Prikler
2023-09-30 13:31     ` Théo Tyburn
2023-10-22 12:07       ` Guillaume Le Vaillant
2023-10-22 14:15         ` Théo Tyburn
2023-10-23  8:44           ` Guillaume Le Vaillant
2023-10-24 20:25             ` Théo Tyburn
2023-09-28 14:20 ` Théo Tyburn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).