Foo Chuan Wei skribis: > I am using Guix on Ubuntu 20.04, and SBCL 2.1.9 (installed using `guix > install sbcl`). I have installed cl-gsll (`guix install cl-gsll`), but > `(asdf:load-system :gsll)` fails. Why? > > This is my ASDF configuration > > ;;;; File: ~/.config/common-lisp/source-registry.conf.d/guix-asdf.conf > (:tree "~/.guix-profile/share/common-lisp/") > > > This is the error message when `(asdf:load-system :gsll)` fails: > > ; pkg-config libffi --cflags > ; ERROR: Couldn't execute "pkg-config": No such file or directory > > > ; Attempting to continue anyway. > ; gcc -o /home/fcw/.cache/common-lisp/sbcl-2.1.9-linux-x64/gnu/store/5c2r9qg7krpnsqiia34jf6s8w71vgqsf-cl-cffi-0.24.1/share/common-lisp/source/cl-cffi/libffi/libffi-types__grovel-tmpTASQCYAW.o -c -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wunused-parameter -fno-omit-frame-pointer -momit-leaf-frame-pointer -fPIC -I/gnu/store/5c2r9qg7krpnsqiia34jf6s8w71vgqsf-cl-cffi-0.24.1/share/common-lisp/source/cl-cffi/ /home/fcw/.cache/common-lisp/sbcl-2.1.9-linux-x64/gnu/store/5c2r9qg7krpnsqiia34jf6s8w71vgqsf-cl-cffi-0.24.1/share/common-lisp/source/cl-cffi/libffi/libffi-types__grovel.c > While evaluating the form starting at line 21, column 0 > of #P"/gnu/store/q27bpjg4pcm81j9ij66fhdpvlwx3jdcz-cl-gsll-0.0.0-1.1a8ada2/share/common-lisp/source/cl-gsll/gsll.asd": > > debugger invoked on a ASDF/FIND-SYSTEM:LOAD-SYSTEM-DEFINITION-ERROR in thread #: Error while trying to load definition for system gsll from pathname /gnu/store/q27bpjg4pcm81j9ij66fhdpvlwx3jdcz-cl-gsll-0.0.0-1.1a8ada2/share/common-lisp/source/cl-gsll/gsll.asd: Couldn't execute "gcc": No such file or directory > > 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 # on #. > 1: [ACCEPT ] Continue, treating # on # as having been successful. > 2: [RETRY ] Retry EVAL of current toplevel form. > 3: [CONTINUE ] Ignore error and continue loading file "/gnu/store/q27bpjg4pcm81j9ij66fhdpvlwx3jdcz-cl-gsll-0.0.0-1.1a8ada2/share/common-lisp/source/cl-gsll/gsll.asd". > 4: [ABORT ] Abort loading file "/gnu/store/q27bpjg4pcm81j9ij66fhdpvlwx3jdcz-cl-gsll-0.0.0-1.1a8ada2/share/common-lisp/source/cl-gsll/gsll.asd". > 5: Retry # on #. > 6: Continue, treating # on # as having been successful. > 7: Retry ASDF operation. > 8: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration. > 9: Retry ASDF operation. > 10: Retry ASDF operation after resetting the configuration. > 11: Exit debugger, returning to top level. > > ((FLET "H0" :IN ASDF/ACTION:PERFORM) #) > ; File has been modified since compilation: > ; SYS:CONTRIB;ASDF;ASDF.LISP.NEWEST > ; Using form offset instead of character position. > error finding frame source: invalid feature expression: "#.(UIOP/UTILITY:SYMBOL-TEST-TO-FEATURE-EXPRESSION (COMMON-LISP:QUOTE #:COMPILER-ERROR-CONTEXT-%SOURCE) (COMMON-LISP:QUOTE #:SB-C))" > source: NIL > 0] > > The problem does not appear when using sbcl-gsll instead of cl-gsll. > How do I fix the problem when using cl-gsll? It seems to be missing some > kind of input or native-input. I think the problem comes from the fact that the build system for cl-xxx packages doesn't use the custom phases added to some sbcl-xxx packages (like the 'fix-cffi-paths' phase of sbcl-gsll). Instead a fixed set of phases is used (see '%standard-phases/source' from "guix/build/asdf-build-system.scm", used in the 'sbcl-package->cl-source-package' function from "guix/build-system/asdf.scm"). Therefore cl-xxx packages usually contain upstream version of the code, without Guix-specific fixes, and having the dependencies installed in a traditional/FHS way is necessary to compile the code. For example the following seems to work: --8<---------------cut here---------------start------------->8--- guix shell -C sbcl cl-gsll gcc-toolchain libffi gsl -- sbcl --eval '(require :asdf)' --eval '(asdf:load-system "gsll")' --8<---------------cut here---------------end--------------->8---