sketch icon indicating copy to clipboard operation
sketch copied to clipboard

Error compiling on OpenSuse

Open ArnautDaniel opened this issue 9 years ago • 5 comments

cc -m64 -o /home/silver/.cache/common-lisp/sbcl-1.3.11-1.4-suse-linux-x64/home/silver/quicklisp/dists/quicklisp/software/cffi_0.18.0/libffi/libffi-types__grovel-tmpGHU3ALSV -I/home/silver/quicklisp/dists/quicklisp/software/cffi_0.18.0/ /home/silver/.cache/common-lisp/sbcl-1.3.11-1.4-suse-linux-x64/home/silver/quicklisp/dists/quicklisp/software/cffi_0.18.0/libffi/libffi-types__grovel.c

 with command ("cc" "-m64" "-o"
               "/home/silver/.cache/common-lisp/sbcl-1.3.11-1.4-suse-linux-x64/home/silver/quicklisp/dists/quicklisp/software/cffi_0.18.0/libffi/libffi-types__grovel-tmpGHU3ALSV"
               "-I/home/silver/quicklisp/dists/quicklisp/software/cffi_0.18.0/"
               "/home/silver/.cache/common-lisp/sbcl-1.3.11-1.4-suse-linux-x64/home/silver/quicklisp/dists/quicklisp/software/cffi_0.18.0/libffi/libffi-types__grovel.c")
 exited with error code 1
   [Condition of type CFFI-GROVEL:GROVEL-ERROR]

Getting the following error when trying to ql:quickload sketch. Running openSuse Tumbleweed, tried it with sbcl 1.3.11 and CCL 1.12 and got the same error.

Tried starting swank in emacs and separately and clearing out the common lisp cache so it had a fresh try each time.

ArnautDaniel avatar Feb 15 '17 00:02 ArnautDaniel

Works just fine on Manjaro with CCL 1.12.

Something must be up with OpenSuse's libffi package.

ArnautDaniel avatar Feb 15 '17 14:02 ArnautDaniel

Thanks for reporting. I don't have a way to test it now though, so I will leave the issue open.

vydd avatar Mar 14 '17 21:03 vydd

I keep forgetting how I fix this on other OS'. I think its a header problem with missing some Linux and GCC headers.

Going to close since I don't use suse anymore and I don't think its a sketch problem.

ArnautDaniel avatar Mar 14 '17 22:03 ArnautDaniel

Installed OpenSuse Tumbleweed and hit the same issue.

Firstly, I had to fix (FL-ERROR "Unable to load any of the alternatives:~% ~S" ("libffi.so.6" "libffi32.so.6" "libffi.so.5" "libffi32.so.5")) by using ("libffi.so"), because that's where libffi can be found on tumbleweed. I should mention that it's libffi7, but libffi6 installed from unofficial sources didn't work either for the next step, so I just used the one on the system.

Shortly after, I got a new error:

grov.c:72:41: error: ‘FFI_SYSV’ undeclared (first use in this function)
   fprintf(output, "%"PRIiMAX, (intmax_t)FFI_SYSV);

I checked ffi.h and ffitarget.h. ffi_abi struct in ffitarget.h on my machine resolves to

#elif defined(X86_64) || (defined (__x86_64__) && defined (X86_DARWIN))
  FFI_FIRST_ABI = 1,
  FFI_UNIX64,
  FFI_WIN64,
  FFI_EFI64 = FFI_WIN64,
  FFI_LAST_ABI,
  FFI_DEFAULT_ABI = FFI_UNIX64

leaving FFI_SYSV undefined. As a temporary fix, I added #define FFI_SYSV 1 to grovel/common.h, reloaded sketch, and now everything works fine. I don't know how to fix this properly, but hopefully someone will be able to help with that.

Most importantly, Sketch works fine on Tumbleweed now :)

EDIT: reported here: https://bugs.launchpad.net/cffi/+bug/1692751

vydd avatar May 23 '17 01:05 vydd

This workaround solved the same problem for me on Ubuntu 18.04.2 LTS.

jessup avatar Apr 01 '19 14:04 jessup