<div>Hi, I now have a project that I love to use CCL on, but I'm just learning my way around this system.</div><div><br></div><div>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.</div>
<div><br></div><div>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. </div>
<div><br></div><div>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?</div>
<div><br></div><div>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"</div>
<div><br></div><div>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? :</div>
<div><br></div><div>From <a href="http://ccl.clozure.com/ccl-documentation.html#The-Interface-Translator">http://ccl.clozure.com/ccl-documentation.html#The-Interface-Translator</a></div><div><br></div><div><div>12.7.2. Details: rebuilding the CDB databases, step by step</div>
<div>...</div><div>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.</div>
<div><br></div><div>3. Run CCL: ? (require "PARSE-FFI")</div><div> ? (ccl::parse-standard-ffi-files :SUBDIR)</div><div><br></div><div>When I try step 3, I only get: </div><div><br></div>
<div>Error: The directory #P"ccl:x86-headers64;subdir;" does not exist, cannot open/create #P"ccl:x86-headers64;subdir;new-constants.cdb.newest"</div><div><br></div><div>Any suggestions appreciated. Thank you!</div>
<div><br></div><div>Best regards,</div><div>Jason</div><div><br></div><div>full attempt log for #3:</div><div><div><font class="Apple-style-span" face="garamond, serif">jaten@afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf/C$ ls </font></div>
<div><font class="Apple-style-span" face="garamond, serif">populate.sh usr</font></div><div><font class="Apple-style-span" face="garamond, serif">jaten@afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf/C$ ./populate.sh </font></div>
<div><font class="Apple-style-span" face="garamond, serif">+++ /usr/include/libelf.h</font></div><div><font class="Apple-style-span" face="garamond, serif">jaten@afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf/C$ find usr -print|xargs ls -al</font></div>
<div><font class="Apple-style-span" face="garamond, serif">-rw-r--r-- 1 jaten jaten 183476 2011-03-18 23:53 usr/include/libelf.ffi</font></div><div><font class="Apple-style-span" face="garamond, serif">usr:</font></div><div>
<font class="Apple-style-span" face="garamond, serif">total 12</font></div><div><font class="Apple-style-span" face="garamond, serif">drwxr-xr-x 3 jaten jaten 4096 2011-03-18 23:53 .</font></div><div><font class="Apple-style-span" face="garamond, serif">drwxr-xr-x 4 jaten jaten 4096 2011-03-18 23:53 ..</font></div>
<div><font class="Apple-style-span" face="garamond, serif">drwxr-xr-x 2 jaten jaten 4096 2011-03-18 23:53 include</font></div><div><font class="Apple-style-span" face="garamond, serif"><br></font></div><div><font class="Apple-style-span" face="garamond, serif">usr/include:</font></div>
<div><font class="Apple-style-span" face="garamond, serif">total 188</font></div><div><font class="Apple-style-span" face="garamond, serif">drwxr-xr-x 2 jaten jaten 4096 2011-03-18 23:53 .</font></div><div><font class="Apple-style-span" face="garamond, serif">drwxr-xr-x 3 jaten jaten 4096 2011-03-18 23:53 ..</font></div>
<div><font class="Apple-style-span" face="garamond, serif">-rw-r--r-- 1 jaten jaten 183476 2011-03-18 23:53 libelf.ffi</font></div><div><font class="Apple-style-span" face="garamond, serif">jaten@afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf/C$ cd ..</font></div>
<div><font class="Apple-style-span" face="garamond, serif">jaten@afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf$ ls</font></div><div><font class="Apple-style-span" face="garamond, serif">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</font></div>
<div><font class="Apple-style-span" face="garamond, serif">jaten@afarm:~/pkg/clozure-cl/ccl/x86-headers64/elf$ ccl</font></div><div><font class="Apple-style-span" face="garamond, serif">trying: /home/jaten/pkg/ccl/lx86cl64</font></div>
<div><font class="Apple-style-span" face="garamond, serif">Welcome to Clozure Common Lisp Version 1.6 (LinuxX8664)!</font></div><div><font class="Apple-style-span" face="garamond, serif">? (require "PARSE-FFI")</font></div>
<div><font class="Apple-style-span" face="garamond, serif">"PARSE-FFI"</font></div><div><font class="Apple-style-span" face="garamond, serif">("PARSE-FFI")</font></div><div><font class="Apple-style-span" face="garamond, serif">? (ccl::parse-standard-ffi-files :SUBDIR)</font></div>
<div><font class="Apple-style-span" face="garamond, serif">> Error: The directory #P"ccl:x86-headers64;subdir;" does not exist, cannot open/create #P"ccl:x86-headers64;subdir;new-constants.cdb.newest"</font></div>
<div><font class="Apple-style-span" face="garamond, serif">> While executing: CCL::FID-OPEN-OUTPUT, in process listener(1).</font></div><div><font class="Apple-style-span" face="garamond, serif">> Type :POP to abort, :R for a list of available restarts.</font></div>
<div><font class="Apple-style-span" face="garamond, serif">> Type :? for other options.</font></div><div><font class="Apple-style-span" face="garamond, serif">1 > :POP</font></div><div><font class="Apple-style-span" face="garamond, serif"><br>
</font></div><div><font class="Apple-style-span" face="garamond, serif">? :pwd</font></div><div><font class="Apple-style-span" face="garamond, serif">#P"/home/jaten/pkg/clozure-cl/ccl/x86-headers64/elf/"</font></div>
<div><font class="Apple-style-span" face="garamond, serif"><br></font></div><div><font class="Apple-style-span" face="garamond, serif">; notes: doesn't work from any other directory in the heirarchy either.</font></div>
<div><br></div></div></div>