Discussion:
libffi not found even if installed in default path
Thaddee Tyl
2012-01-28 02:13:52 UTC
Permalink
I got the following message from `./configure`:

checking for LIBFFI... no
configure: error: Package requirements (libffi) were not met:

No package 'libffi' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

I then (just in case) installed the latest libffi by hand. Its README
indicates that:

Libffi will install under /usr/local by default.

Indeed:

$ find /usr -name 'libffi.*'
/usr/lib/libffi.dylib
/usr/local/lib/libffi.5.dylib
/usr/local/lib/libffi.a
/usr/local/lib/libffi.dylib
/usr/local/lib/libffi.la
/usr/local/lib/pkgconfig/libffi.pc
/usr/local/share/info/libffi.info

However, it did not help, and the `./configure` still fails with the very
same error message.

What information can I give you to help me? What should I do to make it
work?
--
View this message in context: http://old.nabble.com/libffi-not-found-even-if-installed-in-default-path-tp33218407p33218407.html
Sent from the Gnu - Guile - User mailing list archive at Nabble.com.
Mike Gran
2012-01-28 06:34:10 UTC
Permalink
    $ find /usr -name 'libffi.*'
    /usr/lib/libffi.dylib
    /usr/local/lib/libffi.5.dylib
    /usr/local/lib/libffi.a
    /usr/local/lib/libffi.dylib
    /usr/local/lib/libffi.la
    /usr/local/lib/pkgconfig/libffi.pc
    /usr/local/share/info/libffi.info
However, it did not help, and the `./configure` still fails with the very
same error message.
Did you try running configure as something like
 
  'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure'
 
 
-Mike
Mike Gran
2012-01-28 14:05:56 UTC
Permalink
 
Still, isn't it odd that it doesn't find libffi in the standard
installation path?
Well yes and no.  The guile developers decided that they weren't going
to search for libraries in ./configure.  They were going to use
pkgconfig instead.  So they instead just look for the pkgconfig
file for each library, and those files tell ./configure where the
library is located.
 
Each library that Guile depends on makes a pkgconfig file when
you build it from source.
 
The problem is that some distros forget to include the pkgconfig
files, or only include them in separate devel packages.
 
Depending on pkgconfig files is controversial.  Some GNU
developers find it convenient.  Some think it is a terrible
idea.
 
-Mike

Loading...