[PATCH] Fix 'make check' when the system glib is older than 2.34



Because of the dependence of libgobject on libffi (in my case installed
inside '/usr/lib64') and the order of the libraries on 'LDADD', the libtool
executables created for tests search for libglib in the system 'libdir'
before searching the path of the glib being build.

In my case, the symbol that made me notice this was
'g_datalist_id_replace_data' that only was added on 2.34.

Before patch:
$ libtool execute ldd gobject/tests/qdata
	linux-vdso.so.1 (0x00007fff76dde000)
	libgobject-2.0.so.0 => /home/vinicius/work/glib/gobject/.libs/libgobject-2.0.so.0 (0x00007f3ba4853000)
	libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007f3ba464b000)
	libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007f3ba444a000)
	libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f3ba412b000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3ba3f0f000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f3ba3d07000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f3ba395f000)
	libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f3ba374a000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f3ba4aa3000)

After patch:
$ libtool execute ldd gobject/tests/qdata
	linux-vdso.so.1 (0x00007fff94fff000)
	libgthread-2.0.so.0 => /home/vinicius/work/glib/gthread/.libs/libgthread-2.0.so.0 (0x00007f3a456e2000)
	libglib-2.0.so.0 => /home/vinicius/work/glib/glib/.libs/libglib-2.0.so.0 (0x00007f3a453be000)
	libgobject-2.0.so.0 => /home/vinicius/work/glib/gobject/.libs/libgobject-2.0.so.0 (0x00007f3a4516e000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3a44f34000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f3a44d2b000)
	libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007f3a44b23000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f3a4477b000)
	libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f3a44566000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f3a458e3000)
---
Hi,

I still think that there should be a better way to solve this.

Cheers,

 gobject/tests/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gobject/tests/Makefile.am b/gobject/tests/Makefile.am
index 212cbda..da94026 100644
--- a/gobject/tests/Makefile.am
+++ b/gobject/tests/Makefile.am
@@ -12,7 +12,7 @@ else
 endif
 
 noinst_PROGRAMS  = $(TEST_PROGS)
-LDADD = ../libgobject-2.0.la $(top_builddir)/gthread/libgthread-2.0.la $(top_builddir)/glib/libglib-2.0.la
+LDADD = $(top_builddir)/gthread/libgthread-2.0.la $(top_builddir)/glib/libglib-2.0.la ../libgobject-2.0.la
 
 TEST_PROGS += 		\
 	qdata		\
-- 
1.8.0



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]