[Openmcl-devel] h-to-ffi giving kooky results

Gary Byers gb at clozure.com
Tue Sep 6 21:53:20 PDT 2005

When I run darwin-headers/libc/C/populate.sh on a 10.3.9, I get a single
warning (the scalb() function in /usr/include/math.h has a prototype that
conflicts with a GCC 4.0 compiler intrinsic.)  I'm using the FFIGEN package


The older (MUCH older) version of FFIGEN that's on the server is based
on GCC 2.95, and it expects that the installed "gcc" driver is GCC
2.95's (and "gcc -E" invokes gcc 2.95's preprocessor).  If the
installed "gcc" driver belongs to GCC 3.x or later (likely, over the
last few years), I believe that that can lead to errors like those
that you're getting.  (I'm actually surprised that it would work at
all.)  There's a footnote in section 9.7 of the documentation that
explains this issue; as of Tiger (or XCode 2.x), I don't believe that
the suggested workaround would work.

On Tue, 6 Sep 2005, Hamilton Link wrote:

> OK, for a very very simple file with just #defines in it, h-to-ffi.sh is 
> working.
> With anything that includes stdio or basically anything of substance, I get a 
> mountain of:
> /usr/include/ppc/endian.h:0: warning: unrecognized text at end of #line
> /usr/include/ppc/endian.h:22: warning: unrecognized text at end of #line
> /usr/include/ppc/endian.h:56: warning: unrecognized text at end of #line
> for file after file after file, and line after line after line.
> I couldn't get past this for gandalf, and as it turns out when I run 
> darwin-headers/libc/C/populate.sh I get the same thing.
> This is a preprocessor warning of some sort that means... what?  That I'm 
> using the wrong h-to-ffi.sh?  Or the wrong compiler? I googled this and saw 
> other people with basically the same problem, but those guys were mostly 
> trying to recompile linux and gcc and things like that, generally with other 
> incompatible versions of things.
> I have the gandalf bundle built, no problemo, and can open it using UFFI, but 
> I don't have reader macros working yet because of this.  Anyone with clever 
> ideas out there?  I'm out in deep water with this one, I'm afraid.
> thanks,
> hamilton
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

More information about the Openmcl-devel mailing list