From sanxiyn at gmail.com Mon Jul 20 12:14:09 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Mon, 20 Jul 2009 21:14:09 +0900 Subject: [clpython-devel] Compile error Message-ID: <5b0248170907200514o2e8e5225ofbaacc82275d3465@mail.gmail.com> I cloned the reposity from GitHub. When I tried to compile it I get: ; compiling file "/home/tinuviel/github/cl-python/core/metaclass.lisp" ; compiling (IN-PACKAGE :CLPYTHON); compilation aborted because of fatal error: ; READ failure in COMPILE-FILE: ; SB-INT:SIMPLE-READER-PACKAGE-ERROR at 2925 (line 111, column 30) ; Symbol "DEFINE-HASH-TABLE-TEST" not found in the SB-INT package. I am using Debian Sid, and installed SBCL, closer-mop, ptester from the Debian repository. sbcl 1.0.29.11 cl-closer-mop 0.42 cl-ptester 1.2 -- Seo Sanghyeon From metawilm at gmail.com Mon Jul 20 13:07:57 2009 From: metawilm at gmail.com (Willem Broekema) Date: Mon, 20 Jul 2009 15:07:57 +0200 Subject: [clpython-devel] Compile error In-Reply-To: <5b0248170907200514o2e8e5225ofbaacc82275d3465@mail.gmail.com> References: <5b0248170907200514o2e8e5225ofbaacc82275d3465@mail.gmail.com> Message-ID: On Mon, Jul 20, 2009 at 2:14 PM, Seo Sanghyeon wrote: > I cloned the reposity from GitHub. When I tried to compile it I get: > > ; compiling file "/home/tinuviel/github/cl-python/core/metaclass.lisp" > ; compiling (IN-PACKAGE :CLPYTHON); compilation aborted because of fatal error: > ; ? READ failure in COMPILE-FILE: > ; ? ? SB-INT:SIMPLE-READER-PACKAGE-ERROR at 2925 (line 111, column 30) > ; ? ? ? Symbol "DEFINE-HASH-TABLE-TEST" not found in the SB-INT package. > > I am using Debian Sid, and installed SBCL, closer-mop, ptester from > the Debian repository. Right, the SBCL interface for custom hash/test functions has recently changed. I've just committed a fix to use the new macro sb-ext:define-hash-table-test. - Willem From sanxiyn at gmail.com Fri Jul 24 10:14:04 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Fri, 24 Jul 2009 19:14:04 +0900 Subject: [clpython-devel] Cannot import Message-ID: <5b0248170907240314p6aaea7a7o6af8465adae97a27@mail.gmail.com> $ sbcl * (require 'clpython) * (clpython.app.repl:repl) >>> import sys >>> sys.path.append('/usr/lib/python2.5') >>> import types debugger invoked on a CLPYTHON.USER.BUILTIN.TYPE.EXCEPTION:|ImportError| in thread ImportError: Could not find module/package `types'.Search paths tried: ".", "/usr/lib/python2.5" Any idea? -- Seo Sanghyeon From metawilm at gmail.com Fri Jul 24 11:22:44 2009 From: metawilm at gmail.com (Willem Broekema) Date: Fri, 24 Jul 2009 13:22:44 +0200 Subject: [clpython-devel] Cannot import In-Reply-To: <5b0248170907240314p6aaea7a7o6af8465adae97a27@mail.gmail.com> References: <5b0248170907240314p6aaea7a7o6af8465adae97a27@mail.gmail.com> Message-ID: On Fri, Jul 24, 2009 at 12:14 PM, Seo Sanghyeon wrote: > $ sbcl > * (require 'clpython) > * (clpython.app.repl:repl) >>>> import sys >>>> sys.path.append('/usr/lib/python2.5') >>>> import types > debugger invoked on a > CLPYTHON.USER.BUILTIN.TYPE.EXCEPTION:|ImportError| in thread > ?ImportError: Could not find module/package `types'.Search paths > tried: ".", "/usr/lib/python2.5" > > Any idea? Assuming there is a file /usr/lib/python2.5/types.py, try adding a backslash to the end: "/usr/lib/python2.5/". I've been working on import improvements, so that many built-in modules including "types" can be imported. I'll submit that shortly. - Willem From sanxiyn at gmail.com Fri Jul 24 12:33:57 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Fri, 24 Jul 2009 21:33:57 +0900 Subject: [clpython-devel] Cannot import In-Reply-To: References: <5b0248170907240314p6aaea7a7o6af8465adae97a27@mail.gmail.com> Message-ID: <5b0248170907240533s2c64322v2aa39b0618ba25c9@mail.gmail.com> 2009/7/24 Willem Broekema : > Assuming there is a file /usr/lib/python2.5/types.py, try adding a > backslash to the end: "/usr/lib/python2.5/". I get a different error. >>> import types debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread: error opening #P"/usr/lib/python2.5/types.fasl": Permission denied -- Seo Sanghyeon From metawilm at gmail.com Fri Jul 24 13:55:12 2009 From: metawilm at gmail.com (Willem Broekema) Date: Fri, 24 Jul 2009 15:55:12 +0200 Subject: [clpython-devel] Cannot import In-Reply-To: <5b0248170907240533s2c64322v2aa39b0618ba25c9@mail.gmail.com> References: <5b0248170907240314p6aaea7a7o6af8465adae97a27@mail.gmail.com> <5b0248170907240533s2c64322v2aa39b0618ba25c9@mail.gmail.com> Message-ID: On Fri, Jul 24, 2009 at 2:33 PM, Seo Sanghyeon wrote: > I get a different error. > >>>> import types > debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread: error > opening #P"/usr/lib/python2.5/types.fasl": Permission denied By default CLPython tries to write the fasl file next to the source file, which is not allowed. To resolve it you could create a new writable directory and copy or symlink all the standard Python libs there. That's not a very nice solution, so let me know if you have a suggestion on how to handle this issue. Writing the fasl file to a temporary file, perhaps? (If you have asdf-binary-locations installed, CLPython will use that to determine the fasl file location, and you should not get this error.) - Willem From sanxiyn at gmail.com Sat Jul 25 09:23:47 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Sat, 25 Jul 2009 18:23:47 +0900 Subject: [clpython-devel] Cannot import In-Reply-To: References: <5b0248170907240314p6aaea7a7o6af8465adae97a27@mail.gmail.com> <5b0248170907240533s2c64322v2aa39b0618ba25c9@mail.gmail.com> Message-ID: <5b0248170907250223m386f738dv5d0a5f7c8b584edf@mail.gmail.com> 2009/7/24 Willem Broekema : > (If you have asdf-binary-locations installed, CLPython will use that > to determine the fasl file location, and you should not get this > error.) I've setup asdf-binary-locations, and the problem is gone. Thanks. Here are my suggestions: 1. CLPython should not force people to add slash at the end for sys.path entries. CPython does not work that way. 2. CLPython documentation should say something about write permission for .fasl files. asdf-binary-locations seems to be a good solution. -- Seo Sanghyeon From metawilm at gmail.com Mon Jul 27 21:06:40 2009 From: metawilm at gmail.com (Willem Broekema) Date: Mon, 27 Jul 2009 23:06:40 +0200 Subject: [clpython-devel] Cannot import In-Reply-To: References: <5b0248170907240314p6aaea7a7o6af8465adae97a27@mail.gmail.com> Message-ID: On Fri, Jul 24, 2009 at 1:22 PM, Willem Broekema wrote: > I've been working on import improvements, so that many built-in > modules including "types" can be imported. I'll submit that shortly. And I've just committed that. Everyone, please let me know if there are particular built-in modules that you wish were available, or better yet, please try to add missing functionality, using the existing modules in /lib as examples. - Willem