Vector Linux

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
loofah
Posts: 1
Joined: Sun Mar 18, 2012 7:35 pm

Vector Linux

Post by loofah »

Vector is fast but it won't compile Newlisp.

In file included from newlisp.c:20:0:
newlisp.h:39:34: fatal error: i386-linux-gnu/ffi.h: No such file or directory


I've tried finding the right library (Vector is based on Slackware) but it's not working for me. Any quick fixes?

Thanks

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Vector Linux

Post by Lutz »

Do either

make -f makefile_linux

or

make -f makefile_linux_utf8

or use any other makefile_linux_* , which does not have ffi in the name. You still can use a simple form of the ffi as described in the manual for the import function.

saulgoode
Posts: 10
Joined: Sat Jul 16, 2011 6:15 am

Re: Vector Linux

Post by saulgoode »

The problem you are encountering with libffi stems from Slackware and is described in this thread on LinuxQuestions.org.

Basically, the Slackware package for gcc-java includes a version of libffi -- but it does not include the pkgconfig or header files (Robby Workman considers this a mistake and states that libffi will be shipped as a separate package in the next Slackware).

I have found that installing the libffi SlackBuild from Slackware 12.2 was sufficient for most of my ffi needs, though you might want to edit the script to build a more recent version. I do not know whether this approach would interfere with gcc-java as I do not use Java.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Vector Linux

Post by Lutz »

Thanks for clarifying the situation for Vector Linux.

Here some general comments for usage of libffi in newLISP:

The extended ffi requiring libffi and ffi.h for compiling, was only introduced a short time ago in February of 2012. Except for module/gsl.lsp all other modules shipped in the distributions work with the older simple form of import not requiring libffi.

The configure utility will pick libffi enabled makefiles only for Windows, OSX and Linux. For all other OS it will pick makefiles not requiring libffi.

Ted Walther's configure-alt utility, which automatically configures the memory model (32-bit or 64-bit) never configures for the new extended ffi using libffi.

The path for ffi.h chosen in newlisp.h, is only valid for OSX and UBUNTU Linux, for all other OSs the path might be different and has to be adjusted.

In any case, libffi from http://sourceware.org/libffi/ is pretty easy to make for most platforms. On Windows, Mac OSX and UBUNTU Linux it is already installed by default.

Locked