This project is closed and read-only.
Bug #4329 closed
Added by Martin Bednar over 9 years ago.
Updated over 9 years ago.
Description
Under linux, iconv is part of libc, and adding -liconv to LDFLAGS makes linking fail.
Under Gentoo, I hackishly patched the build to make the iconv configure test pass: --- a/Makefile ++ b/Makefile@ -59,9 +59,6 @ else LDFLAGS += ldl -lpthread -lm endif LDFLAGS += -pie -Wl,-z,now -ifeq ($(CONFIG_LIBICONV),yes) -LDFLAGS += -liconv -endif ifeq ($(PLATFORM), darwin) LDFLAGS += -framework CoreServices else diff --git a/configure b/configure index 3a266ed..bc4cf8e 100755 -- a/configure ++ b/configure@ -259,7 +259,7 @ int test(void) iconv_t ic = iconv_open("ASCII", "ASCII"); return 0; } -' -liconv +'
if enabled_or_auto dvben50221; then check_cc_snippet libdvben50221 '
patch with pre tags :
--- a/Makefile
+++ b/Makefile
@@ -59,9 +59,6 @@ else
LDFLAGS += -ldl -lpthread -lm
endif
LDFLAGS += -pie -Wl,-z,now
-ifeq ($(CONFIG_LIBICONV),yes)
-LDFLAGS += -liconv
-endif
ifeq ($(PLATFORM), darwin)
LDFLAGS += -framework CoreServices
else
diff --git a/configure b/configure
index 3a266ed..bc4cf8e 100755
--- a/configure
+++ b/configure
@@ -259,7 +259,7 @@ int test(void)
iconv_t ic = iconv_open("ASCII", "ASCII");
return 0;
}
-' -liconv
+'
if enabled_or_auto dvben50221; then
check_cc_snippet libdvben50221 '
This is a wrong fix. The 'configure' script should detect the iconv library:
check_cc_snippet libiconv '
#include <iconv.h>
int test(void)
{
iconv_t ic = iconv_open("ASCII", "ASCII");
return 0;
}
' -liconv
Could you check why check_cc_snippet does not fail in your system?
This is a right configure output for libc based systems:
checking for cc libiconv ... fail
So even though the libiconv test fails (mine is a glibc system), iconv is used ( or something else for format conversions)? Sorry to be nitpicking, I just want to package it right...
yes, iconv is mandatory for tvh.. see src/intlconv.c
Status changed from New to Invalid
Jaroslav Kysela wrote:
yes, iconv is mandatory for tvh.. see src/intlconv.c
What is idea of function duplication of libraries?
Better to change result message in configure .
The configuration output is correct libiconv means external iconv library, the build-in iconv in libc is a different thing.
Also available in: PDF
Atom