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

no class named CFFI-GROVEL::PROCESS-OP #37

Open
chaldar opened this issue Jun 11, 2015 · 8 comments
Open

no class named CFFI-GROVEL::PROCESS-OP #37

chaldar opened this issue Jun 11, 2015 · 8 comments

Comments

@chaldar
Copy link

chaldar commented Jun 11, 2015

Trying to load cl-cuda in sbcl, I get this error:

* (ql:quickload :cl-cuda)

debugger invoked on a LOAD-SYSTEM-DEFINITION-ERROR in thread #<THREAD "main thread" RUNNING {1002A8B383}>: Error while trying to load definition for system cl-cuda from pathname /home/dev/quicklisp/local-projects/cl-cuda/cl-cuda.asd: There is no class named CFFI-GROVEL::PROCESS-OP.

What am I doing wrong?

@takagi
Copy link
Owner

takagi commented Jun 11, 2015

CFFI-GROVEL::PROCESS-OP is defined in cffi's grovel/asdf.lisp file line 48.
It seems that old version (ver 0.10 or older) of cffi did not have
PROCESS-OP. Please confirm that.

2015-06-11 14:44 GMT+09:00 chaldar [email protected]:

Trying to load cl-cuda in sbcl, I get this error:

  • (ql:quickload :cl-cuda)

debugger invoked on a LOAD-SYSTEM-DEFINITION-ERROR in thread #: Error
while trying to load definition for system cl-cuda from pathname
/home/dev/quicklisp/local-projects/cl-cuda/cl-cuda.asd: There is no class
named CFFI-GROVEL::PROCESS-OP.

What am I doing wrong?


Reply to this email directly or view it on GitHub
#37.

@chaldar
Copy link
Author

chaldar commented Jun 12, 2015

Thanks. The cffi package in the Ubuntu repository is thoroughly outdated. Installed latest cffi through Quicklisp and the problem is gone :-).

@chaldar chaldar closed this as completed Jun 12, 2015
@chaldar
Copy link
Author

chaldar commented Jun 12, 2015

Sorry, a new problem cropped up, so reopening the issue. Loading of cl-cuda fails as shown below. I am on Ubuntu 14.04 running SBCL 1.1.14.debian build. CUDA 7.0 toolkit is installed in /usr/local/cuda. PATH and LD_LIBRARY_PATH are set as per CUDA installation instructions. I can build and run the NVIDIA CUDA sample programs. I also set CUDA_HOME to /usr/local/cuda even though recent CUDA toolkit installations do not ask for it.

How does cffi-grovel find the .h header files? Do I need to tweak the include path? How?

debugger invoked on a CFFI-GROVEL:GROVEL-ERROR in thread #<THREAD "main thread" RUNNING {1002A8AF73}>: External process exited with code 1.
Command was: "cc" "-m64" "-I/home/dev/quicklisp/dists/quicklisp/software/cffi_0.14.0/" "-o" "/home/chandan/.cache/common-lisp/sbcl-1.1.14.debian-linux-x64/home/dev/quicklisp/local-projects/cl-cuda/src/driver-api/type-grovel" "/home/chandan/.cache/common-lisp/sbcl-1.1.14.debian-linux-x64/home/dev/quicklisp/local-projects/cl-cuda/src/driver-api/type-grovel.c"
Output was:
/home/chandan/.cache/common-lisp/sbcl-1.1.14.debian-linux-x64/home/dev/quicklisp/local-projects/cl-cuda/src/driver-api/type-grovel.c:6:18: fatal error: cuda.h: No such file or directory
#include <cuda.h>
^
compilation terminated.

@chaldar chaldar reopened this Jun 12, 2015
@takagi
Copy link
Owner

takagi commented Jun 12, 2015

CFFI-GROVEL generates C source codes from specification files, type-grovel.lisp in this case, to just executes C compiler such as gcc or clang to compile the generated C source codes, type-grovel.c. Please confirm that the C compiler finds cuda.h via environment variable INCLUDE.

@Disclosure
Copy link

I had this issue on Ubuntu 16.04 where the cuda.h file would not be found no matter which environment variable I placed the include paths in when trying to install cl-cuda. This line was failing in the terminal as well despite going through all the installation steps specified by Nvidia:

cc -m64 -o /home/yuri/.cache/common-lisp/sbcl-1.3.1.debian-linux-x64/home/yuri/quicklisp/dists/quicklisp/software/cl-cuda-20161031-git/src/driver-api/type-grovel__grovel-tmpJAIDFZTC -I/home/yuri/quicklisp/dists/quicklisp/software/cffi_0.18.0/ /home/yuri/.cache/common-lisp/sbcl-1.3.1.debian-linux-x64/home/yuri/quicklisp/dists/quicklisp/software/cl-cuda-20161031-git/src/driver-api/type-grovel__grovel.c

A solution was to place a symlink to cuda.h file directly into -I/home/yuri/quicklisp/dists/quicklisp/software/cffi_0.18.0/ The compilation completed without any further problems and cl-cuda loaded successfully.

@guicho271828
Copy link

Adding /usr/local/cuda-8.0/targets/x86_64-linux/include to CPATH environment variable solves this.

@guicho271828
Copy link

@takagi , that should be for Windows, am I correct?

I might write up some troubleshooting / tutorial for installing cl-cuda.

@guicho271828
Copy link

guicho271828 commented Jan 18, 2017

Actually, you need both of:

/usr/local/cuda-8.0/targets/x86_64-linux/include -> CPATH
/usr/local/cuda-8.0/targets/x86_64-linux/lib         -> /etc/ld.conf.d/cuda-8-0.conf (if it does not exist)
/usr/local/cuda-8.0/bin                                         -> PATH

On ubuntu, setting LD_LIBRARY_PATH in ~/.profile doesn't work because it is reset and ignored every time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants