[Openmcl-devel] 3 questions - TLS the default? global thread-shared vars? .CDB gen broken?

Jason E. Aten j.e.aten at gmail.com
Fri Mar 18 22:09:52 PDT 2011


Hi,  I now have a project that I love to use CCL on, but I'm just learning
my way around this system.

I have generated three questions as I'm getting started with CCL.  The
context is: I'm running on ubuntu 10.04 x86_64, with CCL 1.6 / LinuxX8664.

1) I have to allocate alot of thread-local variables (so that they won't
require locking), and a substantial number of shared-between-thread
variables that will require a mutex. In looking through the documentation
for CCL, I get the impression that by default all variables are thread
local.  If someone could confirm for certain this impression, that would be
great.

2) How does one allocate or a thread-shared variable (of infinite extent,
i.e. from the heap, not on the stack), in contrast to a
thread-locally-stored varaible? In order words, when two different threads
need to be able to name the same variable (after locking the thread inspects
the shared variable, possibly updates it, then releases the lock), how do I
tell lisp this is what I'd like?

3) I was able to build the ffigen without issue, however
CCL::PARSE-STANDARD-FFI-FILES doesn't seem to work,  producing "Error: The
directory #P"ccl:x86-headers64;subdir;" does not exist, cannot open/create
#P"ccl:x86-headers64;subdir;new-constants.cdb.newest"

As an aside, I note that the documentation on how to produce .cdb files
seems to have some odd symbols in it, reminiscent of a corrupt/incomplete
latex compilation.  Specifically,  "ccl:headers;subdir;C;populate.sh" is
shown in certain places in the docs, and appears also to be used somehow in
the source code, but represents a non-usable path on Linux, which seems to
be causing the issue (perhaps?) Specifically, I'm following these
instructions. Please advise if there are others? :

>From  http://ccl.clozure.com/ccl-documentation.html#The-Interface-Translator

12.7.2. Details: rebuilding the CDB databases, step by step
...
2. Edit the "ccl:headers;subdir;C;populate.sh"shell script. When you're
confident that the files and preprocessor options match your environment, cd
to the"ccl:headers;subdir;C;" directory and invoke ./populate.sh. Repeat
this step until you're able to cleanly translate all files referenced in the
shell script.

3. Run CCL:              ? (require "PARSE-FFI")
              ? (ccl::parse-standard-ffi-files :SUBDIR)

When I try step 3, I only get:

Error: The directory #P"ccl:x86-headers64;subdir;" does not exist, cannot
open/create #P"ccl:x86-headers64;subdir;new-constants.cdb.newest"

Any suggestions appreciated.  Thank you!

Best regards,
Jason

full attempt log for #3:
jaten at afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf/C$ ls
populate.sh  usr
jaten at afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf/C$ ./populate.sh
+++ /usr/include/libelf.h
jaten at afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf/C$ find usr  -print|xargs
ls -al
-rw-r--r-- 1 jaten jaten 183476 2011-03-18 23:53 usr/include/libelf.ffi
usr:
total 12
drwxr-xr-x 3 jaten jaten 4096 2011-03-18 23:53 .
drwxr-xr-x 4 jaten jaten 4096 2011-03-18 23:53 ..
drwxr-xr-x 2 jaten jaten 4096 2011-03-18 23:53 include

usr/include:
total 188
drwxr-xr-x 2 jaten jaten   4096 2011-03-18 23:53 .
drwxr-xr-x 3 jaten jaten   4096 2011-03-18 23:53 ..
-rw-r--r-- 1 jaten jaten 183476 2011-03-18 23:53 libelf.ffi
jaten at afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf/C$ cd ..
jaten at afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf$ ls
C  constants.cdb  functions.cdb  objc-classes.cdb  objc-methods.cdb
 records.cdb  types.cdb  vars.cdb  ;; these were there from un-tarring the
archive; I haven't been able to generate any .cdb files
jaten at afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf$ ccl
trying: /home/jaten/pkg/ccl/lx86cl64
Welcome to Clozure Common Lisp Version 1.6  (LinuxX8664)!
? (require "PARSE-FFI")
"PARSE-FFI"
("PARSE-FFI")
? (ccl::parse-standard-ffi-files :SUBDIR)
> Error: The directory #P"ccl:x86-headers64;subdir;" does not exist, cannot
open/create #P"ccl:x86-headers64;subdir;new-constants.cdb.newest"
> While executing: CCL::FID-OPEN-OUTPUT, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :POP

? :pwd
#P"/home/jaten/pkg/clozure-cl/ccl/x86-headers64/elf/"

; notes: doesn't work from any other directory in the heirarchy either.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20110319/59d72b5b/attachment.htm>


More information about the Openmcl-devel mailing list