[Top][All Lists]

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

[Bug-tar] tar and static linking

From: Christian Weisgerber
Subject: [Bug-tar] tar and static linking
Date: Mon, 7 Oct 2013 19:34:40 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

So you are on a system that has gettext in an extra libintl (and
possibly libiconv, too).  You want to link tar statically, say for
recovery purposes, but you don't want to drop NLS support.  How do
you do this?

(1) You configure with LDFLAGS=-static.  You expect this to do the

(2) The configure script doesn't simply check for generic -lintl -liconv,
but insists on something very specific, e.g.:

checking how to link with libintl... /usr/local/lib/libintl.so 
/usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib

Result: You end up with  -static /usr/local/lib/libintl.so [...].

This doesn't work.
On FreeBSD 9, ld produces an error; configure already concludes
that linking with libintl just doesn't work and disables NLS.
(On OpenBSD, linking succeeds but you get a dynamic executable.)

I guess this isn't so much a tar problem as a gettext/libiconv/gnulib

Christian "naddy" Weisgerber                          address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]