Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling on OpenSuse #17

Open
ArnautDaniel opened this issue Feb 15, 2017 · 5 comments
Open

Error compiling on OpenSuse #17

ArnautDaniel opened this issue Feb 15, 2017 · 5 comments

Comments

@ArnautDaniel
Copy link

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
Copy link
Author

Works just fine on Manjaro with CCL 1.12.

Something must be up with OpenSuse's libffi package.

@vydd
Copy link
Owner

vydd commented Mar 14, 2017

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

@ArnautDaniel
Copy link
Author

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.

@vydd
Copy link
Owner

vydd commented May 23, 2017

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 vydd reopened this Sep 16, 2017
@vydd vydd changed the title Error compiling on OpenSuse [there's a fix] Error compiling on OpenSuse Sep 16, 2017
@vydd vydd changed the title [there's a fix] Error compiling on OpenSuse [WORKAROUND EXISTS] Error compiling on OpenSuse Sep 16, 2017
@jessup
Copy link

jessup commented Apr 1, 2019

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

@vydd vydd changed the title [WORKAROUND EXISTS] Error compiling on OpenSuse Error compiling on OpenSuse Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants