This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in libiconv?

> If that doesn't correct the issue...then I'd try to run your test case
> on linux, but *explicitly* using libiconv on that system, rather than
> (as is typically the case on linux) relying on the underlying glibc
> implementation of iconv functionality.
> Did this.  Here are the characteristics of the test case object and
> executable:
> $ ldd ./foo
> =>  (0x00007fff51928000)
> => /home/me/libiconv/_inst/lib/
> (0x00007f0b7d7dd000)
> => /lib64/ (0x0000003d5b400000)
>         /lib64/ (0x0000003d5b000000)
> $ nm foo.o | grep ' U '
>                  U __errno_location
>                  U exit
>                  U fprintf
>          >>      U iconv
>          >>      U iconv_close
>          >>      U iconv_open
>                  U printf
>                  U setlocale
>                  U stderr
>                  U strerror
>                  U strlen

IMHO, that is not correctly compiled. You are still using
the version in glibc.
libiconv only has "libiconv_open", "libiconv_close" and "libiconv".
Looks like there is missing include path.
gcc -I/home/me/libiconv/_inst/include -o foo foo.c
-L/home/me/libiconv/_inst/lib -liconv

iconv.h in libiconv has eg.
#define iconv_open libiconv_open

The "nm" should look like this -
                 U __errno_location
                 U exit
                 U fprintf
                 U libiconv
                 U libiconv_close
                 U libiconv_open
                 U printf
                 U setlocale
                 U stderr
                 U strerror


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]