Compiling glib on CentOS

Do you get this error message while compiling glib on CentOS ?

checking for LIBFFI... no
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.

Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

First, let’s check if libffi is installed:

[laurent@new-host]/usr/lib/pkgconfig> rpm -qa | grep libffi
libffi-3.0.5-3.2.el6.i686

[laurent@new-host]/> sudo find . -name *libffi*
./usr/share/doc/libffi-3.0.5
./usr/lib/libffi.so.5
./usr/lib/libffi.so.5.0.6
./var/lib/yum/yumdb/l/61825035e703e1d6d36e2c2f67e195b58eaf7475-libffi-3.0.5-3.2.el6-i686

OK, it is installed, so this certainly means that pkg-config doesn’t know about it. For more information concerning pkg-config, check this link.

 

[laurent@new-host]/usr/lib/pkgconfig> pkg-config --print-errors libffi
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found

OK: why am I missing the /usr/lib/pkgconfig/libffi.pc file ?

That’s because it’s part of the ‘libffi-devel’ package that is not installed by default !

Install it using yum and you’ll get everything you need:

[laurent@new-host]/usr/lib/pkgconfig> rpm -ql libffi-devel-3.0.5-3.2.el6.i686
/usr/lib/libffi-3.0.5
/usr/lib/libffi-3.0.5/include
/usr/lib/libffi-3.0.5/include/ffi.h
/usr/lib/libffi-3.0.5/include/ffitarget.h
/usr/lib/libffi.so
/usr/lib/pkgconfig/libffi.pc
/usr/share/info/libffi.info.gz
/usr/share/man/man3/ffi.3.gz
/usr/share/man/man3/ffi_call.3.gz
/usr/share/man/man3/ffi_prep_cif.3.gz

Laurent KUBASKI

Advertisements

About lkubaski
www.kubaski.com

7 Responses to Compiling glib on CentOS

  1. Thank you! I was trying to compile gtk+ (that have a lot of dependences, i’m still trying here…) and your post was helpful so far. Just sorry my bad English, i’m Brazilian. Just… Thank you! o/

  2. lkubaski says:

    He he: thanks a lot for being the first one to comment after 400 views ! đŸ™‚

  3. Pingback: Compilando o glib no CentOS « Documentos do Administrador

  4. I have a blog too and i know how a comment make the people that wrote the post (you) happy. I think we have to be grate when people help us.
    You take part of your time to wrote that. You didn’t need to write what you learned, you can retain it with yourself, but you shared what you learned and comment is the minimum thing i can to do.
    I wrote a post in my blog about this subject (i wrote in PT-BR) and linked for here.
    I see in About page that you’re French. Why did you write in English? I love French and i really want to learn to speak this language someday. I think that it is not too different than portuguese, and everyone says (at least, on Brazil) that Paris is the city of love. Again, my English is not very good, but i hope you can understand u.u

  5. Ashu says:

    Thanks!!!!!!!!!! It was really helpfull. this is what i was exactly looking for.

  6. steve says:

    Perfect. This was the remedy to my problem.

  7. jim says:

    yes thank you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: