Skip to contentSkip to conversation

ipset tool: Fix link with libtool >= 2.4.4

PATCH In review Olivier Blin 3 participants 5 messages Jan 6, 2016 – Jan 9, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipset tool: Fix link with libtool >= 2.4.4

Hi,

This is a simple patch to fix link of ipset with latest libtool versions.

Cheers

#1 lore raw

PATCH 1/1 Fix link with libtool >= 2.4.4

As of libtool-2.4.4, -ldl is no longer prepended to LIBS. Since types.c needs dlopen() and dlerror(), use LIBADD_DLOPEN, as suggested in libtool-2.4.4 release notes.

---
 lib/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Makefile.am +1 -1
index 36f60b0..4a376ca 100644
@@ -24,7 +24,7 @@ lib_LTLIBRARIES = libipset.la
 include $(top_srcdir)/lib/Make_extra.am
 
 libipset_la_LDFLAGS = -Wl,--version-script=$(top_srcdir)/lib/libipset.map -version-info $(LIBVERSION)
-libipset_la_LIBADD  = ${libmnl_LIBS} $(IPSET_SETTYPE_STATIC_OBJECTS)
+libipset_la_LIBADD  = ${libmnl_LIBS} $(IPSET_SETTYPE_STATIC_OBJECTS) $(LIBADD_DLOPEN)
 libipset_la_SOURCES = \
 	data.c \
 	errcode.c \
Signature · 1 line
2.6.4
#3 lore raw
Quoted 6 lines · Jozsef Kadlecsik
Quoted 2 lines · Olivier Blin

This is a simple patch to fix link of ipset with latest libtool versions.

Is the patch compatible with non-latest libtool versions?

Hi Jozsef,

I have tested this with libtool 2.4.2 and 2.4.6 versions, ipset builds fine with both.

The only downside is that -ldl is now passed twice with older libtool versions, but this should not be a problem.

Thanks

Signature · 1 line
Olivier Blin - blino
#4 lore raw
Quoted 7 lines · Olivier Blin
Quoted 5 lines · Jozsef Kadlecsik
Quoted 2 lines · Olivier Blin

This is a simple patch to fix link of ipset with latest libtool versions.

Quoted 7 lines
Quoted 1 line

Is the patch compatible with non-latest libtool versions?

I have tested this with libtool 2.4.2 and 2.4.6 versions, ipset builds fine with both.

The only downside is that -ldl is now passed twice with older libtool versions, but this should not be a problem.

The patch is applied, thank you.

Best regards,
Jozsef
--
E-mail : [email protected]
PGP key: http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address: Wigner Research Centre for Physics, Hungarian Academy of Sciences

         H-1525 Budapest 114, POB. 49, Hungary