info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-mtools] Undefined libiconv symbols


From: Ryan Schmidt
Subject: Re: [Info-mtools] Undefined libiconv symbols
Date: Tue, 10 Nov 2020 10:55:31 -0600


On Nov 10, 2020, at 08:31, Pali Rohár wrote:

> On Tuesday 10 November 2020 08:19:02 Ryan Schmidt wrote:
>> On Nov 10, 2020, at 08:13, Pali Rohár wrote:
>> 
>>> On Tuesday 10 November 2020 08:09:33 Ryan Schmidt wrote:
>>>> On Nov 10, 2020, at 07:55, Pali Rohár wrote:
>>>> 
>>>>> On Tuesday 10 November 2020 07:49:28 Ryan Schmidt wrote:
>>>>>> On Nov 9, 2020, at 07:21, Frank Loeffler wrote:
>>>>>> 
>>>>>>> Could it be that you have multiple versions of iconv installed
>>>>>> 
>>>>>> I have the macOS version of libiconv installed of course, and also the 
>>>>>> MacPorts version which is the one that I am intending to use.
>>>>>> 
>>>>>> 
>>>>>>> and you use the headers of one version but then the library of the 
>>>>>>> other?
>>>>>> 
>>>>>> I am aware of that type of problem -- I am the MacPorts maintainer of 
>>>>>> libiconv -- but that's not what's happening here. If it were, adding 
>>>>>> -liconv would not fix it.
>>>>> 
>>>>> This really looks like a problem that autoconf/automake have not used
>>>>> correct compile/link flags. As I said AM_ICONV should be used. Add it
>>>>> into configure.in into "dnl Checks for libraries." section and re-run
>>>>> all auto* tools.
>>>> 
>>>> I agree there should be a standard way to handle this but I am not an 
>>>> expert at modifying autotools files. I tried adding "AM_ICONV" on a line 
>>>> by itself after the "dnl Checks for libraries" comment, and then running 
>>>> autoreconf produces this error:
>>>> 
>>>> configure.in:87: error: possibly undefined macro: AM_ICONV
>>>>     If this token and others are legitimate, please use m4_pattern_allow.
>>>>     See the Autoconf documentation.
>>> 
>>> Check that you have installed gettext package. Part of it is aclocal's
>>> iconv.m4 macro file which contains definition of AM_ICONV macro.
>> 
>> Yes, gettext and its iconv.m4 are installed.
> 
> Ah :-( Then aclocal is not able to find them and it is needed to be
> debugged... If you do not know or do not want, take some working Linux
> box, re-run autoreconf on it and copy generated project to your target
> box.
> 
> For debugging: reconf is first calling aclocal which scans configure.in
> file, checks which macros are used, search for them in aclocal directory
> and then generate file aclocal.m4, where should be copy of every needed
> macro from original system files. So it should copy AM_ICONV from
> iconv.m4 into aclocal.m4. Then reconf calls autoconf to generate
> configure file from configure.in+aclocal.m4 (and possible other files in
> current directory). And after reconf calls automake to generate Maekfile
> file from Makefile.in files.
> 
> You may try to call these tools manually (instead of autoreconf) and
> possibly call them with verbose, force and other arguments, maybe also
> with specifying directory where is your iconv.m4...

I'm going to leave it to the developers to fix, since I already have a suitable 
workaround of manually adding -liconv to LDFLAGS.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]