Hi.
I am new to crystal lang. I want to build the latest version on macOS but have some problems.
$ cd crystal-0.28.0
$ make
...
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
CRYSTAL_CONFIG_PATH="/Volumes/U/Users/ici/work/crystal/crystal-0.28.0/src" CRYSTAL_CONFIG_BUILD_COMMIT="" ./bin/crystal build -D preview_overflow -D compiler_rt -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
...
ld: symbol(s) not found for architecture x86_64
In libiconv 1.15 iconv_open is a cpp macro to libiconv_open in iconv.h and, I guess, this is the reason of the above link error of crystal-0.28.0 on macOS with macports libiconv installed. (with llvm 6.0.1)
In crystal-0.28.0, iconv_open is invoked in src/iconv.cr in the following way.
iconv = LibC.iconv_open(to, from)
Is this guess right ? Let me know whether the macro defined in iconv.h is applied or how to apply the macro for building crystal on macOS.
Thanks in advance.