Missing macOS libiconv.dylib Breaks ghc Bootstrap
Joshua Root
jmr at macports.org
Sun Aug 28 19:30:42 UTC 2022
On 2022-8-29 05:01 , Steven Smith wrote:
> Thanks.
>
>> you probably want to be using the libiconv port anyway?
>
> Unfortunately, that won’t work without some hackery. Note the different
> symbol names in MacPorts:
>
>> nm -gC
>> /opt/local/var/macports/build/_opt_local_ports_lang_ghc/ghc/work/bootstrap/opt/local//lib/ghc-9.4.2/lib/x86_64-osx-ghc-9.4.2/base-4.17.0.0/libHSbase-4.17.0.0.a /opt/local/lib/libiconv.dylib | grep iconv_open
>> 0000000000000000 T _hs_iconv_open
>> U _iconv_open
>> U _hs_iconv_open
>> 0000000000003e02 T _libiconv_open
>> 0000000000005375 T _libiconv_open_into
>
> Is there a way to hack this out to transform _iconv_open to
> _libiconv_open in the .a file?
If you use the correct header that goes with the library, it will be
transformed in the source via macros. If the place these references come
from isn't using C headers, I guess they have to be edited some other
way. (You could also theoretically make a shim lib, but that's getting a
bit overcomplicated for the problem at hand…)
- Josh
More information about the macports-dev
mailing list