This was the error i got when i tried to load osicat. The include
parameter is highlighted.
? (ql:quickload "osicat")
To load "osicat":
Load 4 ASDF systems:
alexandria cffi cffi-grovel trivial-features
Install 1 Quicklisp release:
osicat
; Fetching #<URL
"http://beta.quicklisp.org/archive/osicat/2011-06-19/osicat-20110619-git.tgz">
; 51.27KB
==================================================
52,505 bytes in 0.15 seconds (346.45KB/sec)
; Loading "osicat"
[package osicat-sys]..............................
[package osicat-posix]; E:/Apps/Mingw/bin/gcc.exe -m32
-I/Apps/CommonLisp/quicklisp/dists/quicklisp/software/c
ffi_0.10.6/ -fPIC -o
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/CommonLisp/qui
cklisp/dists/quicklisp/software/osicat-20110619-git/posix/basic-unixint.exe
C:/Users/Karl_H/AppData/Local/comm
on-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists/quicklisp/software/osicat-20110619-git/pos
ix/basic-unixint.c
> Error: External process exited with code 1.
> Command was: "E:/Apps/Mingw/bin/gcc.exe"
"-m32"*_"-I/Apps/CommonLisp/quicklisp/dists/quicklisp/softwar
e/cffi_0.10.6/"_ *"-fPIC" "-o"
"C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/Commo
nLisp/quicklisp/dists/quicklisp/software/osicat-20110619-git/posix/basic-unixint.exe"
"C:/Users/Karl_H/AppData
/Local/common-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists/quicklisp/software/osicat-20110
619-git/posix/basic-unixint.c"
> Output was:
>
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists
/quicklisp/software/osicat-20110619-git/posix/basic-unixint.c:1:0:
warning: -fPIC ignored for target (all code
is position independent)
>
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists
/quicklisp/software/osicat-20110619-git/posix/basic-unixint.c:16:27:
fatal error: grovel/common.h: No such fil
e or directory
> compilation terminated.
>
> While executing: CFFI-GROVEL::INVOKE, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
I applied some changes to grovel.lisp that seem to fix the problem with
the groveler. The problem was that (directory-namestring ...) doesn't
include the device name that is used for the drive letter (this is at
least true for ccl and ecl on windows 7 64bit). That is the drive letter
is missing in the namestring and neither the cffi install directory nor
the lib is found by the compiler and so on. This patch may be a little
improvisational but thats due to the little time i spend with lisp
programming yet. I send the path as attachment.
There is still a problem with osicat after applying the patch but this
seems osicat related:
? (ql:quickload "osicat")
To load "osicat":
Load 4 ASDF systems:
alexandria cffi cffi-grovel trivial-features
Install 1 Quicklisp release:
osicat
; Fetching #<URL
"http://beta.quicklisp.org/archive/osicat/2011-06-19/osicat-20110619-git.tgz">
; 51.27KB
==================================================
52,505 bytes in 0.20 seconds (258.96KB/sec)
; Loading "osicat"
[package osicat-sys]..............................
[package osicat-posix]; E:/Apps/Mingw/bin/gcc.exe -m32
-IE:/Apps/CommonLisp/quicklisp/local-projects/cffi/ -o
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists/quicklis
p/software/osicat-20110619-git/posix/basic-unixint.exe
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7
-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists/quicklisp/software/osicat-20110619-git/posix/basic-unixint.c
;
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists/quickl
isp/software/osicat-20110619-git/posix/basic-unixint.exe
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1
.7-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists/quicklisp/software/osicat-20110619-git/posix/basic-unixint.gr
ovel-tmp.lisp
................; E:/Apps/Mingw/bin/gcc.exe -m32
-IE:/Apps/CommonLisp/quicklisp/local-projects/cffi/ -shared -
o
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7-f95-win-x86/E/Apps/CommonLisp/quicklisp/dists/quickl
isp/software/osicat-20110619-git/posix/libosicat.dll
C:/Users/Karl_H/AppData/Local/common-lisp/cache/ccl-1.7-f
95-win-x86/E/Apps/CommonLisp/quicklisp/dists/quicklisp/software/osicat-20110619-git/posix/wrappers.c
............
..................................................
[package osicat-windows]..........................
[package osicat].
Read error between positions 3522 and 4277 in
E:/Apps/CommonLisp/quicklisp/dists/quicklisp/software/osicat-201
10619-git/src/osicat.lisp.
> Error: Unbound variable: OSICAT-POSIX:S-IFLNK
> While executing: CCL::CHEAP-EVAL, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Retry getting the value of OSICAT-POSIX:S-IFLNK.
> Type :? for other options.
I hope this may help,
best regards,
Karl
Am 30.11.2011 20:30, schrieb Luís Oliveira:
On Wed, Nov 30, 2011 at 1:40 PM, Karl Heinrichmeyer
<k...@gudrun-heinrichmeyer.de> wrote:
When I tried to load the osicat library via quicklisp yesterday i got an
error because the cffi-groveler couldn't find the c compiler and because the
path in the include parameter was ill formed (the drive letter was missing).
Regarding the first issue, unless Windows has some new concept of a
default system compiler, I guess all we can do is look for more likely
places. Right now, it's looking at "c:/msys/1.0/bin/gcc.exe". Perhaps
it could do better than that.
It is fine to use the CC environment variable, but it would be nice if
there was any note in the manual that the variable is important.
What include parameter are you referring to? Do you have a patch?
Osicat is probably the best test-case for cffi-grovel on Windows.
There's also a port of iolib to Windows:
<http://src.knowledgetools.de/tomas/winapi/index.html>.
Cheers,
>From 60254ebd11b37ac3481d65bb720f43c81c77cd6f Mon Sep 17 00:00:00 2001
From: Karl Heinrichmeyer <karl.heinrichme...@gmail.com>
Date: Wed, 30 Nov 2011 21:50:30 +0100
Subject: [PATCH] I applied some changes to grovel.lisp that seem to fix the
problem with the groveler. The problem was that (directory-namestring ...)
doesn't include the device name that is used for the drive letter (this is at
least true for ccl and ecl on windows 7 64bit). That is the drive letter is
missing in the namestring and neither the cffi install directory nor the lib is
found by the compiler and so on. This patch may be a little improvisational but
thats due to the little time i spend with lisp programming yet.
---
grovel/grovel.lisp | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/grovel/grovel.lisp b/grovel/grovel.lisp
index 40bcdbe..39f6f87 100644
--- a/grovel/grovel.lisp
+++ b/grovel/grovel.lisp
@@ -36,6 +36,12 @@
(loop for s in strings
collect (string-trim '(#\Space #\Tab) s)))
+
+(defun directory-namestring-with-device (pathname)
+ (namestring
+ (make-pathname :device (pathname-device pathname)
+ :directory (pathname-directory pathname))))
+
;;;# Error Conditions
;;; This warning is signalled when cffi-grovel can't find some macro.
@@ -265,9 +271,8 @@ int main(int argc, char**argv) {
,@*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))))
+ (directory-namestring-with-device
+ (truename(asdf:system-definition-pathname :cffi-grovel))))
,@(when library *platform-library-flags*)
"-o" ,(native-namestring output-file)
,(native-namestring input-file))))
@@ -715,7 +720,7 @@ int main(int argc, char**argv) {
(cffi:define-foreign-library
(,named-library-name
:type :grovel-wrapper
- :search-path ,(directory-namestring lib-file))
+ :search-path ,(directory-namestring-with-device
lib-file))
(t ,(namestring (lib-filename lib-soname))))
(cffi:use-foreign-library ,named-library-name))
out)
--
1.7.3.1.msysgit.0
_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel