[Yhc] What does Yhc need (error, ffi.h not found)
Thomas Shackell
shackell at cs.york.ac.uk
Fri Jul 7 09:29:16 EDT 2006
This is gentoo specific I believe, installing libffi in Ubuntu with
apt-get libffi4-dev
gives me
(tom at mitsumi:~)$ ls /usr/lib/libffi*
/usr/lib/libffi.a /usr/lib/libffi.so /usr/lib/libffi.so.4.0.1
/usr/lib/libffi.la /usr/lib/libffi.so.4
so I guess you need to add it to your LIBRARY_PATH and possibly
LD_LIBRARY_PATH :-)
Tom
Isaac wrote:
> :) 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