LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   No package 'libffi' found (https://www.linuxquestions.org/questions/linux-software-2/no-package-libffi-found-927807/)

woow 02-05-2012 06:52 PM

No package 'libffi' found
 
I try to install glib-2.30.2 from http://ftp.gnome.org/pub/GNOME/sources/glib/2.30/ ang get the following error:

./configure

Code:

configure: error: Package requirements (libffi >= 3.0.0) were not met:

No package 'libffi' found

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

rpm -q libffi -> libffi-3.0.5-3.2
rpm -q libffi-devel -> libffi-devel-3.0.5-3.2.

I have installed and configured pkg-confign

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

I also find the followin errors on when trying to install gtk+-3.2.3 from http://developer.gnome.org/gtk3/stab...-building.html

Code:

configure: error: Package requirements (glib-2.0 >= 2.29.14    atk >= 2.1.5    pango >= 1.29.0    cairo >= 1.10.0    cairo-gobject >= 1.10.0    gdk-pixbuf-2.0 >= 2.23.5) were not met:
No package 'atk' found
No package 'pango' found
No package 'cairo' found
No package 'cairo-gobject' found
No package 'gdk-pixbuf-2.0' found

also

rpm -q atk -> atk-1.28.0-2
rpm -q pango -> pango-1.28.1-3
rpm -q cairo -> cairo-1.8.8-3.1
rpm -q cairo-gobject -> (nothing)
rpm -q gdk-pixbuf-2.0 -> gdk-pixbuf-0.22.0-38

can anyone who has experienced the same problem help me?

RockDoctor 02-06-2012 08:51 AM

Haven't experienced the problem, as all of the packages you're trying to install are available in my distro's (Fedora) repositories, so a simple yum install <requestedpackage> will install the requested package and any dependencies. You're clearly using an rpm-based distro. Why not use your your distro's package manager?

woow 02-07-2012 08:23 AM

Well, I have all the required libraries installed from my destro rpm repositories. The problem comes when gtk+3.2.3 is NOT available to any of those. My target is to install gtk+3.2.3.

rpm -qi gtk+

Code:

Name        : gtk+                        Relocations: (not relocatable)
Version    : 1.2.10                            Vendor: ATrpms.net
Release    : 70.el6                        Build Date: Sat 22 Jan 2011 03:32:36 PM EET
Install Date: Thu 02 Feb 2012 10:27:59 PM EET      Build Host: flocki.atrpms.net
Group      : System Environment/Libraries  Source RPM: gtk+-1.2.10-70.el6.src.rpm
Size        : 2518419                          License: LGPLv2+
Signature  : DSA/SHA1, Sat 22 Jan 2011 03:32:41 PM EET, Key ID 508ce5e666534c2b
Packager    : ATrpms <http://ATrpms.net/>
URL        : http://www.gtk.org/
Summary    : The GIMP ToolKit

yum update -> nothing
yum info gtk+ > (same output as rpm -i)

So I try to compile it myself, using the instruction from GTK+ web site. Starting from gtk+ which requests glib-2.0.0 or greater, there is also no available glib-2.*.* in any repo.

rpm -qi glib

Code:

Name        : glib                        Relocations: (not relocatable)
Version    : 1.2.10                            Vendor: ATrpms.net
Release    : 33.el6                        Build Date: Sat 22 Jan 2011 07:40:48 PM EET
Install Date: Thu 02 Feb 2012 10:27:58 PM EET      Build Host: flocki.atrpms.net
Group      : System Environment/Libraries  Source RPM: glib-1.2.10-33.el6.src.rpm
Size        : 362709                          License: LGPLv2+
Signature  : DSA/SHA1, Sat 22 Jan 2011 07:40:48 PM EET, Key ID 508ce5e666534c2b
Packager    : ATrpms <http://ATrpms.net/>
URL        : http://www.gtk.org/
Summary    : A library of handy utility functions

Trying glib-2.30.2, haltsout the configuration asking for libffi-3.0.0 or greater, although I have it installed already from yum repo and in version 3.0.5

rpm -qi libffi

Code:

Name        : libffi                      Relocations: (not relocatable)
Version    : 3.0.5                            Vendor: CentOS
Release    : 3.2.el6                      Build Date: Thu 11 Nov 2010 10:25:12 PM EET
Install Date: Fri 16 Dec 2011 07:05:37 AM EET      Build Host: c6b5.bsys.dev.centos.org
Group      : System Environment/Libraries  Source RPM: libffi-3.0.5-3.2.el6.src.rpm
Size        : 42881                            License: BSD
Signature  : RSA/8, Sun 03 Jul 2011 07:33:39 AM EEST, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL        : http://sourceware.org/libffi
Summary    : A portable foreign function interface library

So, it comes up that it doesn't find the olready installed libraries to their normal place,
and that's why guys in GTK+ website suggest to use pkg-config tool,
to instruct process and find those libraries before compiling.

I wrote this thread,if someone has any knowledge of how to use this pkg-config tool, cause I haven't use this tool before. Thank you for your answer.

knudfl 02-07-2012 08:58 AM

I'd guess, that you are excluding /usr/lib/pkgconfig/ with this :
( from post #1 ) PKG_CONFIG_PATH=/usr/local/lib/pkgconfig


May be this will work :
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

woow 02-07-2012 04:24 PM

I tested that. Same results

also please note:
Code:

$ whereis pkg-config
pkg-config: /usr/bin/pkg-config /usr/local/bin/pkg-config /usr/share/man/man1/pkg-config.1.gz

$ ls -l /usr/local/lib/pkg-config
total 32
-rw-r--r--. 1 root root 369 Feb  5 23:42 gio-2.0.pc
-rw-r--r--. 1 root root 315 Feb  5 23:42 gio-unix-2.0.pc
-rw-r--r--. 1 root root 354 Feb  5 23:42 glib-2.0.pc
-rw-r--r--. 1 root root 317 Feb  5 23:42 gmodule-2.0.pc
-rw-r--r--. 1 root root 317 Feb  5 23:42 gmodule-export-2.0.pc
-rw-r--r--. 1 root root 296 Feb  5 23:42 gmodule-no-export-2.0.pc
-rw-r--r--. 1 root root 280 Feb  5 23:42 gobject-2.0.pc
-rw-r--r--. 1 root root 246 Feb  5 23:42 gthread-2.0.pc

$ cat /usr/local/lib/pkgconfig/glib-2.0.pc 
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: GLib
Description: C Utility Library
Version: 2.30.2
Libs: -L${libdir} -lglib-2.0
Libs.private:  -lrt
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include

Thank you.

knudfl 02-07-2012 04:46 PM

May be this : PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/***
isn't working at all.

I always use this command :
export PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig/
&& ./configure && make

The export command is temporary : Will reset to default,
when you exit the terminal.


Quote:

pkg-config: /usr/bin/pkg-config /usr/local/bin/pkg-config
Only /usr/bin/pkg-config is supposed to be installed.
May be uninstall the extra pkg-config in /usr/local/ .

.

woow 02-07-2012 05:16 PM

man pages in linux are to instruct users how to use the packages, inside pkg-config I see this:

Code:

METADATA FILE SYNTAX
      To add a library to the set of packages pkg-config knows about, simply install a .pc file. You should install this file to libdir/pkgconfig.

      Here is an example file:
      # This is a comment
      prefix=/home/hp/unst  # this defines a variable
      exec_prefix=${prefix}  # defining another variable in terms of the first
      libdir=${exec_prefix}/lib
      includedir=${prefix}/include

      Name: GObject                            # human-readable name
      Description: Object/type system for GLib # human-readable description
      Version: 1.3.1
      URL: http://www.gtk.org
      Requires: glib-2.0 = 1.3.1
      Conflicts: foobar <= 4.5
      Libs: -L${libdir} -lgobject-1.3
      Libs.private: -lm
      Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib/include

      You would normally generate the file using configure, so that the prefix, etc. are set to the proper values.  The GNU Autoconf manual recommends generating files like .pc
      files at build time rather than configure time, so when you build the .pc file is a matter of taste and preference.

I don't understand that "... using configure, so th... " also I don't understand how to uninstall this /usr/local/lib/pkgconfig folder (i just moved it), I think it was placed there when I sourced the pkg-config tool and no /usr/lib/pkgconfig exists. I also see .pc files incide the glib sources, which I can't understand: where do they know where my libraries exist in my system? How were they generated there?

I followed your instructions with no luck. I'm burned!!
What's this libffi library anyway.. what a mess

____________ SOLVED ____________

OK I just sourced libffi and magically the libffi.pc file appeared on /usr/local/lib/pkgconfig folder
and also the glib-2.30.2 was installed correctly.

John VV 02-07-2012 08:30 PM

just take EXTRA care that you do not fubar the system with a second and different glib and gtk

if /usr/local is in the system path and gnome or the OS ( cent6) find the different packages .You will be in for some problems

in building the dev tree for gimp it is VERY easy to make a normal every day typo and royally mess up the system


All times are GMT -5. The time now is 04:41 PM.