Unable to install 0.7.4 on Sierra (Ruby 2.1.0p0)
Hi guys,
I'm having some issues installing the latest version (0.7.4), see below:
$ gem install charlock_holmes -- --with-icu-dir=/usr/local/opt/icu4c
Building native extensions with: '--with-icu-dir=/usr/local/opt/icu4c'
This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
/Users/rafael/.rvm/rubies/ruby-2.1.0/bin/ruby -r ./siteconf20170814-74326-cu30wt.rb extconf.rb --with-icu-dir=/usr/local/opt/icu4c
checking for main() in -licui18n... yes
checking for main() in -licui18n... yes
checking for unicode/ucnv.h... yes
checking for main() in -lz... yes
checking for main() in -licuuc... yes
checking for main() in -licudata... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/rafael/.rvm/rubies/ruby-2.1.0/bin/ruby
--with-icu-dir
--with-icu-include
--without-icu-include=${icu-dir}/include
--with-icu-lib
--without-icu-lib=${icu-dir}/lib
--with-icui18nlib
--without-icui18nlib
--with-icui18nlib
--without-icui18nlib
--with-zlib
--without-zlib
--with-icuuclib
--without-icuuclib
--with-icudatalib
--without-icudatalib
extconf.rb:53:in `<main>': undefined method `<<' for nil:NilClass (NoMethodError)
extconf failed, exit code 1
I'm having the same issue with standard install (without specifying icu4c on the command).
My icu4c version: stable 59.1
It looks it might be a compiler issue, I'm going to continue checking, but any ideas would be more than welcome :)
Thanks!
I just pushed up 0.7.5 - would you mind giving that a try?
Also fwiw the $CXXFLAGS variable should always be initialized as a string in RbConfig so I'm unsure why it would be nil on your system...
Thanks @brianmario for the quick reply!
I've tried but the issue still persists on Ruby 2.1.0. I'll check the unset $CXXFLAGS and I'll keep you posted ;)
Strangely, 0.7.4 did work for me, but 0.7.5 did not @brianmario . I'm using Ruby 2.4.1.