[Yhc] What does Yhc need (error, ffi.h not found)

Isaac isaacdupree at charter.net
Fri Jul 7 08:34:04 EDT 2006


:) no, adding -lffi to the test doesn't work:

/usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/../../../../powerpc-unknown-linux-gnu/bin/ld:
cannot find -lffi
collect2: ld returned 1 exit status

And now that the scons has been fixed up, it gives me, as expected,

Checking for ffi_call() in C library ffi... no
YHC requires LibFFI to be installed and working.

In case the information helps:  the version of libffi (it seemed like) I
installed was 3.4.3, corresponding to the GCC release of that version
number (indeed, using its source code). (Although it's very probably
irrelevant, I'm using GCC 3.4.4 as my C compiler.)

Now looking around, I found /usr/lib/libffi -- it's a directory!
$ ls -lR /usr/lib/libffi/
/usr/lib/libffi/:
total 48
-rw-r--r--  1 root root 19970 Jul  5 17:31 libffi.a
-rwxr-xr-x  1 root root   722 Jul  5 17:31 libffi.la
lrwxrwxrwx  1 root root    15 Jul  5 17:31 libffi.so -> libffi.so.3.0.0
lrwxrwxrwx  1 root root    15 Jul  5 17:31 libffi.so.3 ->libffi.so.3.0.0
-rwxr-xr-x  1 root root 18640 Jul  5 17:31 libffi.so.3.0.0
drwxr-xr-x  2 root root  4096 Jul  5 17:31 nof

/usr/lib/libffi/nof:
total 52
-rw-r--r--  1 root root 21386 Jul  5 17:31 libffi.a
-rwxr-xr-x  1 root root   726 Jul  5 17:31 libffi.la
lrwxrwxrwx  1 root root    15 Jul  5 17:31 libffi.so -> libffi.so.3.0.0
lrwxrwxrwx  1 root root    15 Jul  5 17:31 libffi.so.3 ->libffi.so.3.0.0
-rwxr-xr-x  1 root root 21104 Jul  5 17:31 libffi.so.3.0.0

[a couple spaces deleted to keep the lines from wrapping]

I don't know how much of this setup is Gentoo-specific, though, and I
don't know how libffi would generically be installed (e.g. starting from
the source tarball) in general.


Thomas Shackell wrote:
> 
> 
> Isaac wrote:
>> Yes, I can compile that program "test.c" with gcc -c test.c
>> Just to test, without darcs-pulling anything, I re-ran scons on yhc, and
>> it worked to a greater extent than before (then erroring with:
>> /usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/../../../../powerpc-unknown-linux-gnu/bin/ld:
>>
>> cannot find -lffi
>> )
>> There must have been something temporary affecting that (my computer was
>> rebooted in between).
> 
> does gcc test.c -lffi work? :-)
> 
>> After darcs pull, scons errored:
> 
> <snip scons error>
> 
> sorry my fault, forgot to add a file to the repo when I made a change.
> 
> thanks :-)
> 
> 
> Tom
> 


More information about the Yhc mailing list