vydd/sketch

quicklisp CFFI-GROVEL:GROVEL-ERROR Couldn't execute "cc"

viburnums opened this issue · 2 comments

I am running Debian 12 (testing/bookworm) with SBCL 2.2.9.debian, have loaded/tested cl-sdl2, have libffi8 and libffi-dev packages installed with apt...
(i am fairly new to both CL and linux so it is entirely possible that i am doing something very obvious wrong!)
Receive the following error when trying to (ql:quickload :sketch)

Couldn't execute "cc": No such file or directory
   [Condition of type CFFI-GROVEL:GROVEL-ERROR]

Restarts:
 0: [RETRY] Retry #<PROCESS-OP > on #<GROVEL-FILE "cffi-libffi" "libffi" "libffi-types">.
 1: [ACCEPT] Continue, treating #<PROCESS-OP > on #<GROVEL-FILE "cffi-libffi" "libffi" "libffi-types"> as having been successful.
 2: [RETRY] Retry ASDF operation.
 3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
 4: [RETRY] Retry ASDF operation.
 5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
 --more--

Backtrace:
 0: (CFFI-GROVEL:GROVEL-ERROR "~a" #<SIMPLE-ERROR "Couldn't execute ~S: ~A" {10019B21D3}>)
 1: ((FLET "THUNK" :IN CFFI-GROVEL:PROCESS-GROVEL-FILE))
 2: (SB-IMPL::%WITH-STANDARD-IO-SYNTAX #<FUNCTION (FLET "THUNK" :IN CFFI-GROVEL:PROCESS-GROVEL-FILE) {7F1FED7C4A5B}>)
 3: (CFFI-GROVEL:PROCESS-GROVEL-FILE #P"/home/norav/quicklisp/dists/quicklisp/software/cffi-20230214-git/libffi/libffi-types.lisp" #P"/home/norav/.cache/common-lisp/sbcl-2.2.9.debian-linux-x64/home/norav/..
 4: ((:METHOD ASDF/ACTION:PERFORM (CFFI-GROVEL::PROCESS-OP CFFI-GROVEL:GROVEL-FILE)) #<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE "cffi-libffi" "libffi" "libffi-types">) [fast-method]
 5: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE "cffi-libffi" "libffi" "libffi-types">)
 6: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
 7: ((:METHOD ASDF/ACTION:PERFORM :AROUND (CFFI-GROVEL::PROCESS-OP CFFI-GROVEL::CC-FLAGS-MIXIN)) #<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE "cffi-libffi" "libffi" "libffi-types">) [fast-method]
 8: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE "cffi-libffi" "libffi" "libffi-types">) [fast-method]
 9: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1007384103}>) [fast-method]
10: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
11: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1007384103}>) [fast-method]
12: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "sketch"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
13: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "sketch"> :VERBOSE NIL)
14: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
15: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "sketch"> :VERBOSE NIL) [fast-method]
16: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> ASDF/LISP-ACTION:LOAD-OP "sketch" :VERBOSE NIL)
17: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
18: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "sketch" :VERBOSE NIL) [fast-method]
19: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {100737E6AB}> :OVERRIDE T :KEY NIL :OVERRIDE-CACHE T :OVERRIDE-FORCING NIL)
 --more--

Well, it looks like you don't have a C compiler named cc. There is probably a configuration variable to change it to something like gcc/clang/whatever, but I guess it would be easier to install it / make a symbolic link /usr/bin/cc to another C compiler.

P.S. The variable is (probably) cffi-toolchain:*cc*.
You could try

(ql:quickload :cffi-toolchain)
(setf cffi-toolchain:*cc* <name-of-c-compiler>)
(ql:quickload :sketch)

Hopefully it helps!

Turns out all I had to do was install gcc (cc is an alias command for it) and it worked. So yes it turned out to be a very obvious thing I was missing, thank you very much for pointing me in the right direction though!