[Openmcl-devel] Trouble with ffigen

David Steuber david at david-steuber.com
Tue Feb 1 21:00:52 PST 2005


In my quest to be able to create my one CDB files from scratch, I  
discovered a problem I am having with the ffigen based on GCC 3.4.1:

david at interloper:~/usr/src/ccl/darwin-headers/gl/C
$ ls -l System/Library/Frameworks/OpenGL.framework/Headers/
total 616
-rw-r--r--  1 david  staff   14152  1 Feb 22:14 OpenGL.ffi
-rw-r--r--  1 david  staff   87118  1 Feb 22:14 gl.ffi
-rw-r--r--  1 david  staff  117545  1 Feb 22:23 glext.ffi
-rw-r--r--  1 david  staff   86070  1 Feb 22:14 glu.ffi
david at interloper:~/usr/src/ccl/darwin-headers/gl/C
$ openmcl
Welcome to OpenMCL Version (Beta: Darwin) 0.14.2-p1!
? (require :parse-ffi)
:PARSE-FFI
("PARSE-FFI")
? (ccl::parse-standard-ffi-files :gl)
#P"/Users/david/usr/src/ccl/darwin-headers/gl/C/System/Library/ 
Frameworks/GLUT.framework/Headers/glut.ffi" ... NIL
#P"/Users/david/usr/src/ccl/darwin-headers/gl/C/System/Library/ 
Frameworks/OpenGL.framework/Headers/gl.ffi" ... NIL
#P"/Users/david/usr/src/ccl/darwin-headers/gl/C/System/Library/ 
Frameworks/OpenGL.framework/Headers/glext.ffi" ... NIL
#P"/Users/david/usr/src/ccl/darwin-headers/gl/C/System/Library/ 
Frameworks/OpenGL.framework/Headers/glu.ffi" ... NIL
#P"/Users/david/usr/src/ccl/darwin-headers/gl/C/System/Library/ 
Frameworks/OpenGL.framework/Headers/OpenGL.ffi" ... NIL
T
? (use-interface-dir :gl)
#<INTERFACE-DIR :GL #P"gl/" #x638F146>
? #$GL_ACCUM

 > Error in process listener(1): Constant not found: OS::GL_ACCUM
 > While executing: CCL::LOAD-OS-CONSTANT
 > Type :POP to abort.
Type :? for other options.
1 > :pop

? (quit)
david at interloper:~/usr/src/ccl/darwin-headers/gl/C
$ ls
CVS             System          my-glext.h      populate.sh      
populate.sh-BAK
david at interloper:~/usr/src/ccl/darwin-headers/gl/C
$ cd ..
david at interloper:~/usr/src/ccl/darwin-headers/gl
$ ls -l
total 424
drwxr-xr-x  8 david  staff    272  1 Feb 22:24 C
drwxr-xr-x  5 david  staff    170 18 Jun  2004 CVS
-rw-r--r--  1 david  staff   6952  1 Feb 22:28 constants.cdb
-rw-r--r--  1 david  staff  76112  4 May  2004 constants.cdb-BAK
-rw-r--r--  1 david  staff  58340  1 Feb 22:28 functions.cdb
-rw-r--r--  1 david  staff  41774  4 May  2004 functions.cdb-BAK
-rw-r--r--  1 david  staff   2048  1 Feb 22:28 records.cdb
-rw-r--r--  1 david  staff   2048  4 May  2004 records.cdb-BAK
-rw-r--r--  1 david  staff   3373  1 Feb 22:28 types.cdb
-rw-r--r--  1 david  staff   3373  4 May  2004 types.cdb-BAK
-rw-r--r--  1 david  staff   2462  1 Feb 22:28 vars.cdb
-rw-r--r--  1 david  staff   2506  4 May  2004 vars.cdb-BAK
david at interloper:~/usr/src/ccl/darwin-headers/gl/C/System/Library/ 
Frameworks/OpenGL.framework/Headers
$ grep -i GL_ACCUM *.ffi
david at interloper:~/usr/src/ccl/darwin-headers/gl/C/System/Library/ 
Frameworks/OpenGL.framework/Headers
$

#define constants are not getting in.  I used populate.sh and this  
version of h-to-ffi.sh:

#!/bin/sh
# -fsyntax-only enables the parser hooks for ffi generation
# -g3 emits macro definitions
GEN="ffigen -fsyntax-only -g3"

echo +++ ${1}
mkdir -p .`dirname ${1}`
OFILE=.`dirname ${1}`/`basename ${1} .h`.ffi

${GEN} -I include/ $* -o ${OFILE}

Can anyone tell me what I'm doing wrong?




More information about the Openmcl-devel mailing list