Compiling GLib from source version 2-32.4

joe asked:

I am having some issues compiling Glib. These are my configure options that I have passed to ./configure:

./configure LIBFFI_LIBS=/usr/local/lib/libffi.so.6 LIBFFI_CFLAGS=-I/usr/local/lib/libffi-3.0.11/include LIBFFI_CFLAGS=-L/usr/local/lib ZLIB_LIBS=/usr/local/lib/ ZLIB_CFLAGS=/usr/local/include/ CC=/usr/bin/gcc

and this is the error that I get when I run the make command

make[4]: Entering directory `/home/joe/Downloads/glib-2.32.4/gobject'
CCLD   gobject-query
./.libs/libgobject-2.0.so: undefined reference to `ffi_type_pointer'
./.libs/libgobject-2.0.so: undefined reference to `ffi_type_float'
./.libs/libgobject-2.0.so: undefined reference to `ffi_type_void'
./.libs/libgobject-2.0.so: undefined reference to `ffi_type_sint64'
./.libs/libgobject-2.0.so: undefined reference to `ffi_prep_cif'
./.libs/libgobject-2.0.so: undefined reference to `ffi_type_uint32'
./.libs/libgobject-2.0.so: undefined reference to `ffi_type_double'
./.libs/libgobject-2.0.so: undefined reference to `ffi_call'
./.libs/libgobject-2.0.so: undefined reference to `ffi_type_sint32'
./.libs/libgobject-2.0.so: undefined reference to `ffi_type_uint64'
collect2: ld returned 1 exit status
make[4]: *** [gobject-query] Error 1
make[4]: Leaving directory `/home/joe/Downloads/glib-2.32.4/gobject'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/joe/Downloads/glib-2.32.4/gobject'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/joe/Downloads/glib-2.32.4/gobject'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/joe/Downloads/glib-2.32.4'
make: *** [all] Error 2

My answer:


You are missing the development files (headers, libs) for libffi.

To install them, install the libffi-devel (RedHat-type) or libffi-dev (Debian-type) package.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.