lem icon indicating copy to clipboard operation
lem copied to clipboard

cffi-grovel error when running gcc in quicklisp installation

Open swapneils opened this issue 1 year ago • 3 comments

I was trying to install the :sketch package (https://github.com/vydd/sketch) to experiment with maybe linking graphics to lem buffers.

After the following logs show up:

; Loading "sketch"
; pkg-config libffi --cflags
-IC:/msys64/mingw64/bin/../include 
; gcc -o "~\.lem\quicklisp\dists\quicklisp\software\cffi-20231021-git\libffi\libffi-types__grovel-tmpIQ3BBKJ9.obj" -c -m64 -IC:/msys64/mingw64/bin/../include -I~/.lem/quicklisp/dists/quicklisp/software/cffi-20231021-git/ "~\.lem\quicklisp\dists\quicklisp\software\cffi-20231021-git\libffi\libffi-types__grovel.c"

I consistently get the following error:

The value
  NIL
is not of type
  (SIGNED-BYTE 64)
when binding SB-ALIEN::VALUE
   [Condition of type CFFI-GROVEL:GROVEL-ERROR]

How can we get around this issue? Or is it an unavoidable consequence of using the pre-built binary instead of building from source?

swapneils avatar Dec 06 '23 10:12 swapneils

You are doing some very interesting things.

The environment in which I built the release binary and the environment in which you loaded sketch are different, so that could be the cause. If you build from source, does it succeed?

cxxxr avatar Dec 06 '23 12:12 cxxxr

I haven't been able to build from source yet (https://github.com/lem-project/lem/issues/628#issuecomment-1842840549); my local SBCL can load :sketch fine, though, so presumably it would work in that case.

swapneils avatar Dec 07 '23 02:12 swapneils

Update: Imports fine with terminal lem built with make in WSL, so it's probably another of the issues regarding the binaries. Will leave as open for now until there's a solution to the binaries using the original desktop's environment rather than the user's, which should also fix this issue.

swapneils avatar Dec 07 '23 09:12 swapneils