
I am trying to build yhc from source but I get stuck at this error: gcc -Wall -I. -c -o src/runtime/BCKernel/pretty.o src/runtime/BCKernel/pretty.c In file included from src/runtime/BCKernel/types.h:5, from src/runtime/BCKernel/hashtable.h:4, from src/runtime/BCKernel/module.h:18, from src/runtime/BCKernel/pretty.c:1: src/runtime/BCKernel/platform.h:103:17: error: ffi.h: Arquivo ou diretório não encontrado (Last message means roughly 'ffi.h: File or directory not found') I got the source from the repo via darcs get and already tried to build both using scons and make. The message above was presented while trying to build via scons, but the make message is very similar. Is ffi.h some header file that I was supposed to have? This smells like my machine is somehow messed up. What should I check in my environment besides the dependencies outlined on the readme.txt? Thanks in advance, Thiago Arrais

Hi Thiago,
src/runtime/BCKernel/platform.h:103:17: error: ffi.h: Arquivo ou diretório não encontrado
(Last message means roughly 'ffi.h: File or directory not found')
Scons is the way to build Yhc now. Can you tell us what platform you are building on? Which distribution of Linux/Mac etc. The problem is possibly that you do not have libffi installed, if you are running something like gentoo or darwinports then emerge libffi or similar may well work. Unfortunately our build engineer is on holiday this week, so if we can't figure it out we might have to wait for him to come back. Thanks Neil

Neil,
On 7/18/06, Neil Mitchell
Scons is the way to build Yhc now. Can you tell us what platform you are building on? Which distribution of Linux/Mac etc.
This is an i686/i386 GNU Linux Fedora Core 4 machine. I searched the list archives and I thought someone said that ffi wasn't needed as an external dependency any more as it would be automatically downloaded during the build process. I may be mistaken, thought. Anyway, I have downloaded gcc source and will try to do something with it. Cheers, Thiago Arrais

Hi,
I searched the list archives and I thought someone said that ffi wasn't needed as an external dependency any more as it would be automatically downloaded during the build process. I may be mistaken, thought. Yes, that sounds right - it used to be only downloaded on Windows, but now it may well be downloaded on Linux as well.
Can you please check yhc-devel/depends/ctypes to check that the ctypes library was successfully downloaded. After that I'm not really sure what to do... Thanks Neil

On 7/18/06, Neil Mitchell
Can you please check yhc-devel/depends/ctypes to check that the ctypes library was successfully downloaded.
I think so. Here is the directory listing ---------- listing ---------- $ cd ctypes/ $ ls callbacks.c _ctypes.c _ctypes_test.c libffi malloc_closure.c callproc.c ctypes_dlfcn.h _ctypes_test.h libffi_arm_wince SConscript cfield.c ctypes.h darwin libffi_msvc stgdict.c ------------------------------- There is even a libffi dir with a ffi.h somewhere inside. It seems the build script can't find it. Pretty weird.
After that I'm not really sure what to do...
I will experiment a little and come back here with any results. Thanks, Thiago Arrais

Just for the record, there is a second machine I tried to build on and couldn't. I will try a third one also. This one is a i686/i386 GNU/Linux Ubuntu Dapper Drake box. I tried basically the same thing that I tried on the Fedora box: darcs get the repo, install scons (since i didn't have it previously) and then `scons build'. The error is pretty much the same that ocurred on the Fedora box earlier: gcc -Wall -I. -c -o src/runtime/BCKernel/external.o src/runtime/BCKernel/external.c In file included from src/runtime/BCKernel/types.h:5, from src/runtime/BCKernel/hashtable.h:4, from src/runtime/BCKernel/module.h:18, from src/runtime/BCKernel/external.h:4, from src/runtime/BCKernel/external.c:1: src/runtime/BCKernel/platform.h:103:17: error: ffi.h: No such file or directory Thanks, Thiago Arrais

I see that there was some work on the code base today. Any progress on this thread's specific issue (things don't seem to work for me yet)? I am eager to start experimenting YHC within EclipseFP... Cheers, Thiago Arrais

Hi Thiago,
I see that there was some work on the code base today. Any progress on this thread's specific issue (things don't seem to work for me yet)? Nope, the progress is entirely on a separate part of the compiler, the -core flag (its very cool progress, but unfortunately useless for you)
Our build guru, Andrew, is still away (I thought he was getting back today, but I guess I was wrong) - hopefully he'll be back tomorrow
I am eager to start experimenting YHC within EclipseFP... Sounds very cool!
Thanks Neil

Hi, This was a problem caused by the fact that my development machine has libffi installed. I hadn't set the path to use the downloaded ffi.h, but because ffi.h is globally accessible on this machine it was still finding it and so I didn't notice. I've just pushed a patch to darcs that fixes the problem on another machine I have access to, that doesn't have libffi installed. Hopefully this will fix you problem Thiago. Andrew

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I've just pushed a patch to darcs that fixes the problem on another machine I have access to, that doesn't have libffi installed.
Which only works for x86: hunk ./build/platform.py 24 + env.Append(CPPPATH=["#depends/ctypes/libffi/include", "#depends/ctypes/libffi/src/x86"]) On ppc I got these errors, though I can't be sure the particular errors are due to the architecture mismatch: gcc -Wall -I. -Idepends/ctypes/libffi/include - -Idepends/ctypes/libffi/src/x86 -Idepends/ctypes/libffi/include - -Idepends/ctypes/libffi/src/x86 -Idepends/ctypes/libffi -c -o depends/ctypes/libffi/src/cfield.o depends/ctypes/libffi/src/cfield.c In file included from depends/ctypes/libffi/include/ffi.h:63, from depends/ctypes/libffi/src/cfield.c:1: depends/ctypes/libffi/src/x86/ffitarget.h:64: error: `FFI_DEFAULT_ABI' undeclared here (not in a function) depends/ctypes/libffi/src/x86/ffitarget.h:65: error: enumerator value for `FFI_LAST_ABI' not integer constant scons: *** [depends/ctypes/libffi/src/cfield.o] Error 1 scons: building terminated because of errors. Actually, changing that place to ppc didn't help by itself; a quick grep suggests that "x86" is hardcoded in a few places in build/SConscript.libffi as well. I don't know what the correct portable incantation is for that in python/scons, though (on my system I'd use uname -m, but that obviously isn't likely to work on Windows). I look forward to the time when I can get a mere failure to compile my circularly dependent modules again :D (not that I'd mind if it was possible by then ;) Isaac -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFExfsKHgcxvIWYTTURAkUnAJ0athHUYwDbZevYWumjZtLBGb3PXwCdHZCx mrDXw2GbGhnM6IjhIhr/8UY= =3i2q -----END PGP SIGNATURE-----

Andrew, Thanks for the patch. It works for me now and I will (hopefully) start to integrate YHC into EclipseFP soon. Cheers, Thiago Arrais

Answering to myself after finding the list archives. My gcc isn't finding ffi.h anyhow. I tried a simple program that tried to include ffi.h and it gave me test.c:1:17: error: ffi.h: Arquivo ou diretório não encontrado Seems my gcc didn't come with ffi support. Is there anyway I can get it? Cheers, Thiago Arrais
participants (4)
-
Andrew Wilkinson
-
Isaac
-
Neil Mitchell
-
Thiago Arrais