I am trying to boot the system cl-mpiusing quicklisp. This is the definition of the system:
(asdf:defsystem cl-mpi
:description "Common Lisp bindings for the Message Passing Interface (MPI)"
:author "Alex Fukunaga"
:version "0.1.0"
:license "MIT"
:depends-on (:cffi :cffi-grovel)
:components
((:file "packages")
(:file "cl-mpi-configure" :depends-on ("packages"))
(cffi-grovel:grovel-file "mpi-grovel" :depends-on ("packages" "cl-mpi-configure"))
(:file "mpi" :depends-on ("packages"))))
This does not compile because it "does not know" what it is installed for $CC. I need it to be installed in mpicc. I found the code where, in my opinion, it installs it:
(defun cc-compile-and-link (input-file output-file &key library)
(let ((arglist
`(,(or (getenv "CC") *cc*)
,@*cpu-word-size-flags*
,@*cc-flags*
;; add the cffi directory to the include path to make common.h visible
,(format nil "-I~A"
(directory-namestring
(truename
(asdf:system-definition-pathname :cffi-grovel))))
,@(when library *platform-library-flags*)
"-o" ,(native-namestring output-file)
,(native-namestring input-file))))
(when library
;; if it a library that may be used, remove it
;; so we won't possibly be overwriting the code of any existing process
(ignore-some-conditions (file-error)
(delete-file output-file)))
(apply #'invoke arglist)))
The above is inside the package asdf. However, I cannot figure out how to change defsystemto compiler accounting.
PS: It looks like this:
External process exited with code 1.
Command was: "cc" "-m64" "-I/home/wvxvw/quicklisp/dists/quicklisp/software/cffi_0.11.1/"
"-o" "/home/wvxvw/.cache/common-lisp/sbcl-1.1.2-1.fc18-linux-x64/home/wvxvw/quicklisp/local-projects/cl-mpi/mpi-grovel"
"/home/wvxvw/.cache/common-lisp/sbcl-1.1.2-1.fc18-linux-x64/home/wvxvw/quicklisp/local-projects/cl-mpi/mpi-grovel.c"
Output was:
/home/wvxvw/.cache/common-lisp/sbcl-1.1.2-1.fc18-linux-x64/home/wvxvw/quicklisp/local-projects/cl-mpi/mpi-grovel.c:6:34:
fatal error: /usr/include/mpi/mpi.h: No such file or directory
compilation terminated.
formatted for readability. The compiler does not find the header, because the corresponding compiler is not ( mpicc"knows" where to look for the header mpi.h, it will not search in /usr/include).
. $CC mpicc, /usr/include/mpich-x86_64/mpi.h - , include path, ? , ?
mpicc:
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:oos 'asdf:load-op :cffi-grovel)
(setf cffi-grovel::*cc* "mpicc"))
defsystem
EDIT: , cffi, bad include:( :
#include </usr/include/mpi/mpi.h>
:
#include "mpi.h"
- ?
, . , ,
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:oos 'asdf:load-op :cffi-grovel)
(setf cffi-grovel::*cc* "mpicc"
mpi::*mpi-header-file* "/usr/include/mpich-x86_64/mpi.h"))
, .
, , ! I.e., C ?