[Gsll-devel] Build error (fsbv)

Liam Healy lhealy at common-lisp.net
Wed Jun 24 01:22:28 UTC 2009


On Sun, Jun 21, 2009 at 9:52 AM, Jason Nielsen<jdn at math.carleton.ca> wrote:
> Hi Zach,
>
> On Sat, 20 Jun 2009, Zach wrote:
>>
>> Looks like it can't find ffi.h.  I suppose that you should be able to
>> point it to the correct location by changing the the form in the asd file
>> from
>>
>> (cffi-grovel:grovel-file "libffi" :pathname #+unix "libffi-unix")
>>
>> to
>>
>> (cffi-grovel:grovel-file "libffi" :pathname #+unix "libffi-unix" :cc-flags
>> "-I/path/to/ffi/headers")
>
> Thanks that fixed the problem.
>
>> I know this since I have for a long time had to do this for any system
>> that uses cffi-grovel, since I often have libraries in only somewhat
>> standard
>> places under OS X.  Since you are using common-lisp-controller, that means
>> you are using a Linux, right?  If so, this should really work out of the box
>> for you.  Whether the shortcoming is with FSBV or CFFI-GROVEL, I don't
>> know (for instance, it would be nice if CFFI-GROVEL took a default cc-flags
>> from
>> the CFLAGS environment variable or something).
>
> I am using Linux which is why I was a bit confused as it should work and was
> working until recently.  Either way it is working now so thanks again.
>
> Jason
>
>

Not so fast...  I'd like to try to come up with a solution that works
for the major OSes/distrbutions when things are installed in standard
places.  The :cc-flags is a hack to add a new path; why is it
necessary?

What version of Linux are you using?
What library(ies) are you having problems with?
Are they installed in the system-standard places?
What files are in the "wrong" place?   Where are they?

As for me, I use Debian.  Everything is installed from the
distribution, so packages like libffi-dev place the .h files in the
standard places.  For example,

dpkg -L libffi-dev
...
/usr/include/x86_64-linux-gnu/ffi.h
/usr/include/x86_64-linux-gnu/ffitarget.h
...

I put (include "ffi.h") in libffi-unix.lisp, and that works.
My understanding is that almost all distributions conform to the FHS
http://www.pathname.com/fhs/ and so this should work on all these
distributions.  If that is not the case,  I would like to know why.
I do not know how to provide alternative .h paths, but I can ask on
the cffi-grovel list if necessary.  I hope it is not necessary; the
preferred solution is to (include ...) the files in the right place.

Liam




More information about the gsll-devel mailing list