Project

General

Profile

Actions

Bug #4329

closed

-liconv fails to link

Added by Martin Bednar about 8 years ago. Updated about 8 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
Configuration
Target version:
-
Start date:
2017-04-22
Due date:
% Done:

0%

Estimated time:
Found in version:
4.2.1
Affected Versions:

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 '
Actions

Also available in: Atom PDF