from Greg Bennett, who is trying to move a large Lisp application to Linux. I hope to convert all the graphics routines to use OpenGL, leading me to investigate cl-opengl. At bottom, this means I need to be able to load cffi. This effort includes my first dealings with cffi, and also includes my first dealings with asdf, although I have used mk-defsystem under Windows. The attached material provides details from this effort during which building cffi failed. I am sufficiently new to linux, asdf, and cffi that I cannot tell whether I face a difficulty with asdf or (not xor) cffi. Since the break occurred in processing cffi.asd I have begun with the guess that it is to cffi-devel that I might look for assistance. With those apologies for my inexperience, I look forward to learning from the list. Thx in advance for all advice and assistance. Cheers /Greg Bennett ;;; cffi-asdf-errors.lisp ;;; I am trying to investigate cl-opengl via the examples available from ;;; its website. Thus I need to install cl-cffi. ;;; The Lisp is CMUCL 19E running under Ubuntu 8.10 (32bit version) ;;; installed on an HP dv7 64bit laptop ;;; I rescued cl-cffi via ;;; sudo apt-get install cl-cffi ;;; which did its job correctly, as far as I can see, but I am no judge ;;; of all that is involved in installation on linux. ;;; In this, my first experience with asdf, ;;; I followed the ASDF manual (p1-2), I made a symbolic link in ~ ;;; ln -s /usr/share/common-lisp/systems/cffi.asd ;;; and followed this in CMUCL (with asdf.lisp already loaded) by ;;; (asdf:operate 'asdf:load-op 'cffi) ;;; Here is the output ; loading system definition from cffi.asd into #<The ASDF0 package> ; Loading #P"/usr/share/common-lisp/source.cl-uffi/cffi.asd". ; registering #<SYSTEM CFFI {587DAE95}> as CFFI ; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. O C): ; Compiling Top-Level Form: File-error in function (FLET #.GO ENSURE-DIRECTORIES-EXIST): Can't create directory /usr/. [Condition of type KERNEL:SIMPLE-FILE-ERROR] Restarts: 0: [RETRY ] Try to create the directory again 1: [RETRY ] Retry performing #<ASDF:COMPILE-OP NIL {58A0DCAD}> on #<ASDF:CL-SOURCE-FILE "utils" {587E3975}> 2: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {580DCAD}> on #<ASDF:CL-SOURCE-FILE "utils" {587E3975}> asveve having been successful. 3: [ABORT ] Return to Top-Level. Debug (type H for help) ((FLET #:GO ENSURE-DIRECTORIES-EXIST) #P"/usr/share/common-lisp/source/cl-cffi/src/utils.x86f") Source: Error finding soource: Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer exists: target:code/filesys.lisp 0] ;;; END of OUTPUT ;; I *do* have /usr/share/common-lisp/source/cl-cffi/src/utils.lisp but can find no ;; trace of a file utils.x86f in /usr
On Fri, Nov 21, 2008 at 2:08 PM, Greg Bennett <gwbennett@sentex.ca> wrote:
;;; I rescued cl-cffi via ;;; sudo apt-get install cl-cffi ;;; which did its job correctly, as far as I can see, but I am no judge ;;; of all that is involved in installation on linux.
In my experience, using Debian/Ubuntu Lisp packages is often more trouble than it's worth. I haven't used those in a while, but from the output that you sent it doesn't seem like it's a CFFI issue. I'd start by trying SBCL instead of CMUCL, and if that doesn't work I would go for clbuild[1]. HTH. [1] http://common-lisp.net/project/clbuild/ -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/
Luís Oliveira wrote:
On Fri, Nov 21, 2008 at 2:08 PM, Greg Bennett <gwbennett@sentex.ca> wrote:
;;; I rescued cl-cffi via ;;; sudo apt-get install cl-cffi ;;; which did its job correctly, as far as I can see, but I am no judge ;;; of all that is involved in installation on linux.
In my experience, using Debian/Ubuntu Lisp packages is often more trouble than it's worth. I haven't used those in a while, but from the output that you sent it doesn't seem like it's a CFFI issue. I'd start by trying SBCL instead of CMUCL, and if that doesn't work I would go for clbuild[1].
HTH.
Luis, thanks for you information. I shall certainly look into clbuild. You were quite correct in diagnosing that my difficulty was not a CFFI issue. At the suggestion of Dmitry Kalyanov I re-did my efforts running CMUCL as root -> all was well. Thus linux permissions were an issue somewhere in the processes, I assume. Cheers /Greg Bennett
Hi, CFFI and others As I know, Debian's common-lisp-controller (CLC) is very good as a ASDF addition, CLC let each Linux user could compile lisp source code from a common place (/usr/share/common-lisp/source) and put the fasl files in user-specific position. Ubuntu just copy this facility from Debian, but seems not maintained well. (I thought Greg is on ubuntu but debian) The only problem is that Debian's CL packages are usually a little old. To resolve this issue, I just use SBCL's ASDF-INSTALL package to install new packages into #p"~/.clc/site" to get the newest version from Cliki link, than other CLs (CMUCL, CLISP, ECL, even GCL) could use these fresh packages. On 2008-11-21, at 22:50, Luís Oliveira wrote:
On Fri, Nov 21, 2008 at 2:08 PM, Greg Bennett <gwbennett@sentex.ca> wrote:
;;; I rescued cl-cffi via ;;; sudo apt-get install cl-cffi ;;; which did its job correctly, as far as I can see, but I am no judge ;;; of all that is involved in installation on linux.
In my experience, using Debian/Ubuntu Lisp packages is often more trouble than it's worth. I haven't used those in a while, but from the output that you sent it doesn't seem like it's a CFFI issue. I'd start by trying SBCL instead of CMUCL, and if that doesn't work I would go for clbuild[1].
HTH.
[1] http://common-lisp.net/project/clbuild/
-- Luís Oliveira http://student.dei.uc.pt/~lmoliv/
_______________________________________________ cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
-- Chun Tian (binghe) NetEase.com, Inc. P. R. China
В сообщении от Friday 21 November 2008 17:08:19 Greg Bennett написал(а):
The attached material provides details from this effort during which building cffi failed. I am sufficiently new to linux, asdf, and cffi that I cannot tell whether I face a difficulty with asdf or (not xor) cffi. Since the break occurred in processing cffi.asd I have begun with the guess that it is to cffi-devel that I might look for assistance.
;; I *do* have /usr/share/common-lisp/source/cl-cffi/src/utils.lisp but can find no ;; trace of a file utils.x86f in /usr
AFAIK, by default compiled files (fasls (fast loading files); utils.x86f is a fasl) are stored near the source files. So, you do not have the permission to write the file. In debian/ubuntu, Common Lisp Controller is used to load libraries. Try using it to load cffi. As a general solution, install asdf-binary-locations (this is a library that tells asdf to store compiled binaries in separate directories). Or for immediate solution, run lisp under root and load the cffi from there. Subsequent loads should work from regular users.
Kalyanov Dmitry wrote:
В сообщении от Friday 21 November 2008 17:08:19 Greg Bennett написал(а):
The attached material provides details from this effort during which building cffi failed. I am sufficiently new to linux, asdf, and cffi that I cannot tell whether I face a difficulty with asdf or (not xor) cffi. Since the break occurred in processing cffi.asd I have begun with the guess that it is to cffi-devel that I might look for assistance.
;; I *do* have /usr/share/common-lisp/source/cl-cffi/src/utils.lisp but can
find no
;; trace of a file utils.x86f in /usr
AFAIK, by default compiled files (fasls (fast loading files); utils.x86f is a fasl) are stored near the source files. So, you do not have the permission to write the file. In debian/ubuntu, Common Lisp Controller is used to load libraries. Try using it to load cffi.
As a general solution, install asdf-binary-locations (this is a library that tells asdf to store compiled binaries in separate directories). Or for immediate solution, run lisp under root and load the cffi from there. Subsequent loads should work from regular users.
------------------------------------------------------------------------
_______________________________________________ cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
Dmitry, thanks for your information. I tried the last first - running lisp as root - which worked well so that I can now run the example files. Thus it seems that linux permissions were involved somewhere in the processes. The .x86f files were indeed installed near the source, both in directories under my home directory which makes the permission issue slightly puzzling (at least to me). Perhaps other compiled files were installed elsewhere as the work was done. I shall certainly look into asdf-binary-locations. Cheers /Greg Bennett
participants (4)
-
Chun Tian (binghe)
-
Greg Bennett
-
Kalyanov Dmitry
-
Luís Oliveira