[Home]

Summary:ASTERISK-17904: [patch] autoconf check for iconv does not work for GNU libiconv
Reporter:Rohan Lloyd (rohanl)Labels:
Date Opened:2011-05-22 05:49:56Date Closed:2011-05-23 11:21:03
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:1.8.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) iconv-check.patch
Description:autoconf check for iconv uses AST_EXT_LIB_CHECK to check that the linker can find the symbol iconv_open

However GNU libiconv contains:


/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
  encoding ‘tocode’. */
#ifndef LIBICONV_PLUG
#define iconv_open libiconv_open
#endif
extern iconv_t iconv_open (const char* tocode, const char* fromcode);

so the actual symbol in the library is libiconv_open, and the test fails.

****** ADDITIONAL INFORMATION ******

Problem discovered on Mac OS X, using MacPorts.

Google finds several instances of the same problem for various different programmes. eg:

http://lists.samba.org/archive/samba-technical/2003-February/027227.html
Comments:By: Digium Subversion (svnbot) 2011-05-23 11:19:34

Repository: asterisk
Revision: 320573

U   branches/1.8/configure
U   branches/1.8/configure.ac

------------------------------------------------------------------------
r320573 | tilghman | 2011-05-23 11:19:34 -0500 (Mon, 23 May 2011) | 7 lines

GNU libiconv uses symbol "libiconv_open" instead of "iconv_open".

(closes issue ASTERISK-17904)
Reported by: rohanl
Patches:
      iconv-check.patch uploaded by rohanl (license 1284)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=320573

By: Digium Subversion (svnbot) 2011-05-23 11:21:03

Repository: asterisk
Revision: 320579

_U  trunk/
U   trunk/configure
U   trunk/configure.ac

------------------------------------------------------------------------
r320579 | tilghman | 2011-05-23 11:21:03 -0500 (Mon, 23 May 2011) | 14 lines

Merged revisions 320573 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r320573 | tilghman | 2011-05-23 11:19:32 -0500 (Mon, 23 May 2011) | 7 lines
 
 GNU libiconv uses symbol "libiconv_open" instead of "iconv_open".
 
 (closes issue ASTERISK-17904)
  Reported by: rohanl
  Patches:
        iconv-check.patch uploaded by rohanl (license 1284)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=320579