Project

General

Profile

Bug #2191

iconv detection fails with glibc (linux)

Added by Ivan Kalvachev over 10 years ago. Updated over 10 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
Configuration
Target version:
-
Start date:
2014-07-27
Due date:
% Done:

0%

Estimated time:
Found in version:
git
Affected Versions:

Description

The configure script that detects iconv, explicitly links with "-liconv". However iconv functions are part of the standard gnu lib C and as such there is no separate libiconv.so . As result the detection fails with missing library.

Removing the -liconv from configure and Makefile allows me to use iconv functionality.

History

#1

Updated by Jaroslav Kysela over 10 years ago

File:

#include <iconv.h>
int test(void) {
iconv_t ic = iconv_open("ASCII", "ASCII");
return 0;
}
int main() {
test();
}

Test cmd:

$ gcc a.c -liconv
/usr/bin/ld: cannot find -liconv
collect2: error: ld returned 1 exit status

All is ok here with glibc.. Could you check why the -liconv does not fail in your gcc setup ?

#2

Updated by Ivan Kalvachev over 10 years ago

Jaroslav Kysela wrote:

All is ok here with glibc.. Could you check why the -liconv does not fail in your gcc setup ?

It does fail.
And this is quite visible in the configure output.

Since iconv functionality is new one, I assumed that this configure check test the presence of iconv functions. Not that it only checks if explicit iconv library is needed.

There are 3 possible cases:
1. iconv functions in libiconv
2. iconv functions in glibc
3. no iconv.

You seem to assume that iconv is always available and distinguish only between case 1 vs case 2.

In short, there is no bug, just slightly misleading configure output.

#3

Updated by Jaroslav Kysela over 10 years ago

  • Status changed from New to Invalid

IConv is mandatory. If you have a better way to detect -liconv requirement, please, show it in a patch.

Also available in: Atom PDF