Vector Linux

Started by loofah, May 30, 2012, 01:34:39 PM

Previous topic - Next topic

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

#1
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

#2
The problem you are encountering with libffi stems from Slackware and is described in http://www.linuxquestions.org/questions/slackware-14/guile-upgrade-dependency-problems-884879/">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 (http://www.linuxquestions.org/questions/slackware-14/finally-gimp-2-8-a-943103/page2.html#post4671080">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 http://slackbuilds.org/repository/12.2/libraries/libffi/">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

#3
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/">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.