X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Message-ID: <1714.192.168.6.58.1296130611.squirrel@simlinux> Date: Thu, 27 Jan 2011 13:16:51 +0100 (CET) Subject: Re: Bug in libiconv? From: simrw AT sim-basis DOT de To: cygwin AT cygwin DOT com User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SIMBasis-MailScanner-Information: Please contact the ISP for more information X-SIMBasis-MailScanner: Found to be clean X-SIMBasis-MailScanner-SpamCheck: not spam, SpamAssassin (score=-5.892, required 5, autolearn=not spam, ALL_TRUSTED -3.30, BAYES_00 -2.60, NO_REAL_NAME 0.01) X-SIMBasis-MailScanner-From: simrw AT sim-basis DOT de X-MAIL-FROM: X-SF-Loop: 1 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > 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 > linux-vdso.so.1 => (0x00007fff51928000) > libiconv.so.2 => /home/me/libiconv/_inst/lib/libiconv.so.2 > (0x00007f0b7d7dd000) > libc.so.6 => /lib64/libc.so.6 (0x0000003d5b400000) > /lib64/ld-linux-x86-64.so.2 (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. eg. 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 Roger -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple