[Openmcl-devel] IOKit

Ron Garret ron at flownet.com
Mon Aug 1 11:42:41 PDT 2016


I want to talk to a USB device from CCL, and to do that I need to invoke IOKit.  Unfortunately, the IOKit headers are not included in the standard distribution so I tried to build them myself.  To do that, I needed to build ffigen, which I tried to do by following the instructions here:

http://trac.clozure.com/ccl/wiki/BuildFFIGEN

Unfortunately, that failed thusly:

gcc -c   -g -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition    -DHAVE_CONFIG_H -I/usr/local/include   -I. -I. -I../../gcc-4.0.0/gcc -I../../gcc-4.0.0/gcc/. -I../../gcc-4.0.0/gcc/../include -I../../gcc-4.0.0/gcc/../libcpp/include  ../../gcc-4.0.0/gcc/timevar.c -o timevar.o
gcc   -g -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition    -DHAVE_CONFIG_H -I/usr/local/include   -I. -I. -I../../gcc-4.0.0/gcc -I../../gcc-4.0.0/gcc/. -I../../gcc-4.0.0/gcc/../include -I../../gcc-4.0.0/gcc/../libcpp/include  \
	  -DTARGET_NAME=\"powerpc-apple-darwin8\" \
	  -c ../../gcc-4.0.0/gcc/toplev.c -o toplev.o
In file included from ../../gcc-4.0.0/gcc/toplev.c:55:
../../gcc-4.0.0/gcc/output.h:122:6: warning: '__format__' attribute argument not
      supported: asm_fprintf [-Wignored-attributes]
     ATTRIBUTE_ASM_FPRINTF(2, 3);
     ^
../../gcc-4.0.0/gcc/output.h:112:53: note: expanded from macro
      'ATTRIBUTE_ASM_FPRINTF'
#define ATTRIBUTE_ASM_FPRINTF(m, n) __attribute__ ((__format__ (__asm_fp...
                                                    ^
../../gcc-4.0.0/gcc/toplev.c:547:1: error: redefinition of a 'extern inline'
      function 'floor_log2' is not supported in C99 mode
floor_log2 (unsigned HOST_WIDE_INT x)
^
../../gcc-4.0.0/gcc/toplev.h:180:1: note: previous definition is here
floor_log2 (unsigned HOST_WIDE_INT x)
^
../../gcc-4.0.0/gcc/toplev.c:582:1: error: redefinition of a 'extern inline'
      function 'exact_log2' is not supported in C99 mode
exact_log2 (unsigned HOST_WIDE_INT x)
^
../../gcc-4.0.0/gcc/toplev.h:186:1: note: previous definition is here
exact_log2 (unsigned HOST_WIDE_INT x)
^
../../gcc-4.0.0/gcc/toplev.c:994:5: warning: implicit declaration of function
      'ffi_init' is invalid in C99 [-Wimplicit-function-declaration]
    ffi_init (asm_out_file, main_input_filename);
    ^
../../gcc-4.0.0/gcc/toplev.c:1261:5: warning: implicit declaration of function
      'print_ffi_version' is invalid in C99 [-Wimplicit-function-declaration]
    print_ffi_version (file, indent);
    ^
../../gcc-4.0.0/gcc/toplev.c:2007:5: warning: implicit declaration of function
      'ffi_early_init' is invalid in C99 [-Wimplicit-function-declaration]
    ffi_early_init ();
    ^
4 warnings and 2 errors generated.
make[1]: *** [toplev.o] Error 1
make: *** [compile] Error 2

So now I’m stuck.  Suggestions on how to proceed, or even better, if someone who has a working ffigen could produce a CDB database for IOKit on Mavericks that would be much appreciated.

rg




More information about the Openmcl-devel mailing list