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: Frank Loeffler
Subject: Re: [Info-mtools] Undefined libiconv symbols
Date: Mon, 9 Nov 2020 14:21:05 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Nov 09, 2020 at 07:07:03AM -0600, Ryan Schmidt wrote:
Hi, here's another problem when building mtools 4.0.25 (but also earlier 
versions) on macOS:


Undefined symbols for architecture x86_64:
 "_libiconv", referenced from:
     _getWcharCp in charsetConv.o
     _dos_to_wchar in charsetConv.o
     _safe_iconv in charsetConv.o
 "_libiconv_close", referenced from:
     _cp_open in charsetConv.o
     _getWcharCp in charsetConv.o
     _cp_close in charsetConv.o
 "_libiconv_open", referenced from:
     _cp_open in charsetConv.o
     _getWcharCp in charsetConv.o
     _wchar_to_native in charsetConv.o


If I add -Wl,-liconv to LDFLAGS when I run ./configure, that fixes it, but it 
would be nice if the build system would add that linker flag automatically. 
Presumably it works without this flag on some systems -- maybe iconv functions 
are in the standard C library on some non-Mac systems? -- so maybe you want to 
add a configure test to see if linking with libiconv is needed.


Hi,

Could it be that you have multiple versions of iconv installed and you use the headers of one version but then the library of the other?

(also see https://stackoverflow.com/questions/57734434/libiconv-or-iconv-undefined-symbol-on-mac-osx)

Frank

Attachment: signature.asc
Description: PGP signature


reply via email to

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