Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install version 0.7.3 on Mac OS Sierra #117

Open
agargiulo opened this issue Aug 13, 2017 · 15 comments
Open

Unable to install version 0.7.3 on Mac OS Sierra #117

agargiulo opened this issue Aug 13, 2017 · 15 comments

Comments

@agargiulo
Copy link

Ruby 2.4.1
Mac OS Version 10.12.6

$> gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.6.11
  - RUBY VERSION: 2.4.1 (2017-03-22 patchlevel 111) [x86_64-darwin16]
  - INSTALLATION DIRECTORY: /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0
  - USER INSTALLATION DIRECTORY: /Users/agargiulo/.gem/ruby/2.4.0
  - RUBY EXECUTABLE: /Users/agargiulo/.rbenv/versions/2.4.1/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/agargiulo/.rbenv/versions/2.4.1/bin
  - SPEC CACHE DIRECTORY: /Users/agargiulo/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/agargiulo/.rbenv/versions/2.4.1/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-16
  - GEM PATHS:
     - /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0
     - /Users/agargiulo/.gem/ruby/2.4.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-document"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/agargiulo/.rbenv/versions/2.4.1/bin
     - /usr/local/Cellar/rbenv/1.1.1/libexec
     - /Users/agargiulo/.rbenv/shims
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /Applications/Wireshark.app/Contents/MacOS
     - /Users/agargiulo/bin
     - /Users/agargiulo/.rbenv/shims

Output from bundle install

Installing charlock_holmes 0.7.3 with native extensions                                                                                                                                           [103/1714]
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes
/Users/agargiulo/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20170813-46115-56zgwh.rb extconf.rb
checking for -licui18n... no
checking for -licui18n... no


***************************************************************************************
*********** icu required (brew install icu4c or apt-get install libicu-dev) ***********
***************************************************************************************
*** 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/agargiulo/.rbenv/versions/2.4.1/bin/$(RUBY_BASE_NAME)
        --with-icu-dir
        --without-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

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/charlock_holmes-0.7.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/charlock_holmes-0.7.3 for inspection.
Results logged to /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/charlock_holmes-0.7.3/gem_make.out

An error occurred while installing charlock_holmes (0.7.3), and Bundler cannot continue.

Contents of that mkmf.log file

have_library: checking for -licui18n... -------------------- no

"clang -o conftest -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin16 -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/agargiulo/.rbenv/versions/2.4.1/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -O3 -Wno-error=shorten-64-to-32  -pipe conftest.c  -L. -L/Users/agargiulo/.rbenv/versions/2.4.1/lib -L. -L/Users/agargiulo/.rbenv/versions/2.4.1/lib  -fstack-protector -L/usr/local/lib     -lruby-static -framework CoreFoundation  -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"clang -o conftest -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin16 -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/agargiulo/.rbenv/versions/2.4.1/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -O3 -Wno-error=shorten-64-to-32  -pipe conftest.c  -L. -L/Users/agargiulo/.rbenv/versions/2.4.1/lib -L. -L/Users/agargiulo/.rbenv/versions/2.4.1/lib  -fstack-protector -L/usr/local/lib     -lruby-static -framework CoreFoundation -licui18n  -lpthread -ldl -lobjc "
ld: library not found for -licui18n
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: 
14: int t(void) { ; return 0; }
/* end */

--------------------

have_library: checking for -licui18n... -------------------- no

"clang -o conftest -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin16 -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/agargiulo/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/agargiulo/.rbenv/versions/2.4.1/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -O3 -Wno-error=shorten-64-to-32  -pipe conftest.c  -L. -L/Users/agargiulo/.rbenv/versions/2.4.1/lib -L. -L/Users/agargiulo/.rbenv/versions/2.4.1/lib  -fstack-protector -L/usr/local/lib     -lruby-static -framework CoreFoundation -licui18n  -lpthread -ldl -lobjc "
ld: library not found for -licui18n
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: 
14: int t(void) { ; return 0; }
/* end */

--------------------
@agargiulo
Copy link
Author

I tried to brew install icu4c and that caused the build to fail differently

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes
/Users/agargiulo/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20170813-47276-1u8c70l.rb extconf.rb
checking for -licui18n... no
checking for -licui18n... yes
checking for unicode/ucnv.h... yes
checking for -lz... yes
checking for -licuuc... yes
checking for -licudata... yes
creating Makefile

current directory: /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes
make "DESTDIR=" clean

current directory: /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes
make "DESTDIR="
compiling converter.c
In file included from converter.c:2:
./common.h:23:14: warning: unused function 'charlock_new_str' [-Wunused-function]
static VALUE charlock_new_str(const char *str, size_t len)
             ^
./common.h:32:14: warning: unused function 'charlock_new_str2' [-Wunused-function]
static VALUE charlock_new_str2(const char *str)
             ^
2 warnings generated.
compiling encoding_detector.c
In file included from encoding_detector.c:2:
./common.h:14:14: warning: unused function 'charlock_new_enc_str' [-Wunused-function]
static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding)
             ^
1 warning generated.
compiling ext.c
In file included from ext.c:1:
./common.h:14:14: warning: unused function 'charlock_new_enc_str' [-Wunused-function]
static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding)
             ^
./common.h:23:14: warning: unused function 'charlock_new_str' [-Wunused-function]
static VALUE charlock_new_str(const char *str, size_t len)
             ^
./common.h:32:14: warning: unused function 'charlock_new_str2' [-Wunused-function]
static VALUE charlock_new_str2(const char *str)
             ^
3 warnings generated.
compiling transliterator.cpp
In file included from transliterator.cpp:5:
In file included from /usr/local/Cellar/icu4c/59.1/include/unicode/translit.h:25:
In file included from /usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:33:
/usr/local/Cellar/icu4c/59.1/include/unicode/char16ptr.h:90:19: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    Char16Ptr() = delete;
                  ^
/usr/local/Cellar/icu4c/59.1/include/unicode/char16ptr.h:198:24: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    ConstChar16Ptr() = delete;
                       ^
In file included from transliterator.cpp:5:
In file included from /usr/local/Cellar/icu4c/59.1/include/unicode/translit.h:25:
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3025:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text)) {}
      ^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3087:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text), length) {}
      ^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3180:7: error: delegating constructors are permitted only in C++11
      UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
      ^~~~~~~~~~~~~
transliterator.cpp:101:60: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
  trans = Transliterator::createInstance(UnicodeString(id, id_len), UTRANS_FORWARD, p_error, status);
                                         ~~~~~~~~~~~~~     ^~~~~~
transliterator.cpp:106:34: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
  u_txt = new UnicodeString(txt, txt_len);
              ~~~~~~~~~~~~~      ^~~~~~~
4 warnings and 3 errors generated.
make: *** [transliterator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/charlock_holmes-0.7.3 for inspection.
Results logged to /Users/agargiulo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/charlock_holmes-0.7.3/gem_make.out

An error occurred while installing charlock_holmes (0.7.3), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.7.3'` succeeds before bundling.

@colby-swandale
Copy link

fixed in #116

@agargiulo
Copy link
Author

I swear I looked at the issues/pulls, guess I missed that one. Thanks!

@matt-thomson
Copy link

matt-thomson commented Aug 17, 2017

I'm seeing this problem with version 0.7.5. If I run gem install charlock_holmes --version 0.7.5 then the gem installs fine; if I have a Gemfile with gem 'charlock_holmes', '~> 0.7.5' and run bundle then this fails - output below:

Fetching gem metadata from https://rubygems.org/.
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Installing charlock_holmes 0.7.5 with native extensions
Using bundler 1.14.6
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /private/tmp/test/.bundle/gems/charlock_holmes-0.7.5/ext/charlock_holmes
/Users/matt/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170817-3546-6s1frw.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
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /private/tmp/test/.bundle/extensions/x86_64-darwin-16/2.3.0-static/charlock_holmes-0.7.5/mkmf.log

current directory: /private/tmp/test/.bundle/gems/charlock_holmes-0.7.5/ext/charlock_holmes
make "DESTDIR=" clean

current directory: /private/tmp/test/.bundle/gems/charlock_holmes-0.7.5/ext/charlock_holmes
make "DESTDIR="
compiling converter.c
compiling encoding_detector.c
compiling ext.c
compiling transliterator.cpp
In file included from transliterator.cpp:5:
In file included from /usr/local/opt/icu4c/include/unicode/translit.h:25:
In file included from /usr/local/opt/icu4c/include/unicode/unistr.h:33:
/usr/local/opt/icu4c/include/unicode/char16ptr.h:90:19: warning: deleted function definitions are a C++11 extension
[-Wc++11-extensions]
    Char16Ptr() = delete;
                  ^
/usr/local/opt/icu4c/include/unicode/char16ptr.h:198:24: warning: deleted function definitions are a C++11 extension
[-Wc++11-extensions]
    ConstChar16Ptr() = delete;
                       ^
In file included from transliterator.cpp:5:
In file included from /usr/local/opt/icu4c/include/unicode/translit.h:25:
/usr/local/opt/icu4c/include/unicode/unistr.h:3025:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text)) {}
      ^~~~~~~~~~~~~
/usr/local/opt/icu4c/include/unicode/unistr.h:3087:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text), length) {}
      ^~~~~~~~~~~~~
/usr/local/opt/icu4c/include/unicode/unistr.h:3180:7: error: delegating constructors are permitted only in C++11
      UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
      ^~~~~~~~~~~~~
transliterator.cpp:101:60: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int32_t'
(aka 'int') [-Wshorten-64-to-32]
  trans = Transliterator::createInstance(UnicodeString(id, id_len), UTRANS_FORWARD, p_error, status);
                                         ~~~~~~~~~~~~~     ^~~~~~
transliterator.cpp:106:34: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int32_t'
(aka 'int') [-Wshorten-64-to-32]
  u_txt = new UnicodeString(txt, txt_len);
              ~~~~~~~~~~~~~      ^~~~~~~
4 warnings and 3 errors generated.
make: *** [transliterator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /private/tmp/test/.bundle/gems/charlock_holmes-0.7.5 for inspection.
Results logged to /private/tmp/test/.bundle/extensions/x86_64-darwin-16/2.3.0-static/charlock_holmes-0.7.5/gem_make.out

An error occurred while installing charlock_holmes (0.7.5), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.7.5'` succeeds before bundling.

Everything works fine on 0.7.4. Any idea what could be going wrong?

@wangluzhou
Copy link

@matt-thomson I have the same problem

@AndrewSouthpaw
Copy link

AndrewSouthpaw commented Sep 8, 2017

I had the same problem. 0.7.4 worked for me, but 0.7.3 and 0.7.5 did not. ¯\_(ツ)_/¯

@idanci
Copy link

idanci commented Sep 15, 2017

Got the same problem when trying to install 0.7.5 using ruby 2.4.1, Sierra 10.12.6, icu4c 59.1

In file included from transliterator.cpp:5:
In file included from /usr/local/Cellar/icu4c/59.1/include/unicode/translit.h:25:
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3025:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text)) {}
      ^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3087:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text), length) {}
      ^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/59.1/include/unicode/unistr.h:3180:7: error: delegating constructors are permitted only in C++11
      UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
      ^~~~~~~~~~~~~
transliterator.cpp:101:60: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
  trans = Transliterator::createInstance(UnicodeString(id, id_len), UTRANS_FORWARD, p_error, status);
                                         ~~~~~~~~~~~~~     ^~~~~~
transliterator.cpp:106:34: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
  u_txt = new UnicodeString(txt, txt_len);
              ~~~~~~~~~~~~~      ^~~~~~~
4 warnings and 3 errors generated.
make: *** [transliterator.o] Error 1

make failed, exit code 2

Installed successfully with

$ gem install charlock_holmes -- --with-cxxflags=-std=c++11

@davidcole
Copy link

☝️ This also worked for me with 0.7.3.

@dpedoneze
Copy link

dpedoneze commented Nov 21, 2017

This one and all the others above didn't work :(

gem install charlock_holmes -- --with-icu-dir=/usr/local/opt/icu4c --with-cxxflags=-std=c++11

brew: icu4c 59.1_1 is installed

I've tried 0.7.3, 0.7.4 and 0.7.5. Using macos 10.12.3

Building native extensions with: '--with-icu-dir=/usr/local/opt/icu4c --with-cxxflags=-std=c++11'
This could take a while...
ERROR:  Error installing charlock_holmes:
  ERROR: Failed to build gem native extension.

    /.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb --with-icu-dir=/usr/local/opt/icu4c --with-cxxflags=-std=c++11
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
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling converter.c
compiling encoding_detector.c
compiling ext.c
compiling transliterator.cpp
In file included from transliterator.cpp:5:
In file included from /usr/local/opt/icu4c/include/unicode/translit.h:25:
In file included from /usr/local/opt/icu4c/include/unicode/unistr.h:33:
/usr/local/opt/icu4c/include/unicode/char16ptr.h:90:19: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    Char16Ptr() = delete;
                  ^
/usr/local/opt/icu4c/include/unicode/char16ptr.h:198:24: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    ConstChar16Ptr() = delete;
                       ^
In file included from transliterator.cpp:5:
In file included from /usr/local/opt/icu4c/include/unicode/translit.h:25:
/usr/local/opt/icu4c/include/unicode/unistr.h:3025:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text)) {}
      ^~~~~~~~~~~~~
/usr/local/opt/icu4c/include/unicode/unistr.h:3087:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text), length) {}
      ^~~~~~~~~~~~~
/usr/local/opt/icu4c/include/unicode/unistr.h:3180:7: error: delegating constructors are permitted only in C++11
      UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
      ^~~~~~~~~~~~~
2 warnings and 3 errors generated.
make: *** [transliterator.o] Error 1

make failed, exit code 2
icu4c: stable 59.1 (bottled), HEAD [keg-only]
C/C++ and Java libraries for Unicode and globalization
http://site.icu-project.org/
/usr/local/Cellar/icu4c/59.1_1 (246 files, 65.3MB)
  Poured from bottle on 2017-11-13 at 12:02:07
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/icu4c.rb
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/icu4c/lib
    CPPFLAGS: -I/usr/local/opt/icu4c/include
For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/icu4c/lib/pkgconfig

😞

@dpedoneze
Copy link

dpedoneze commented Nov 27, 2017

Ok, I've found out the problem was with the icu4c 59.1 version. I've installed the 57.1 version and it's all good! So, if you're on Mac you'll just have to:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9b26ef0bad5f88dc5096a88483b38d8155d76c78/Formula/icu4c.rb

and it will install the 57.1 version (using an old homebrew formula)

and then you just have to:

bundle config build.charlock_holmes --with-icu-dir=/usr/local/opt/icu4c
bundle install

😄

@andreale
Copy link

Note that if your Gemfile or .gemspec requires 0.7.3 explicitly, you need to install the correct version. This worked for me:

gem install charlock_holmes -v 0.7.3 -- --with-cxxflags=-std=c++11

Make sure gem list charlock_holmes shows an installed version that matches what you have in Gemfile.lock

@DanielStevenLewis
Copy link

Is there a way to fix this issue by only modifying the gemfile and running bundle install? I'm trying to install the Quality gem, and seem to be blocked by this issue. I don't want to have to ask my coworkers to do something other than just running bundle install, as running additional commands could cause confusion and inconvenience.

@hectorperez
Copy link

I had to do this:

gem install charlock_holmes -v '0.7.3' -- --with-cppflags=-DU_USING_ICU_NAMESPACE=1 --with-cxxflags=-std=c++11

@cjwedev
Copy link

cjwedev commented Aug 12, 2019

Thanks @hectorperez

@virgil0116
Copy link

Ok, I've found out the problem was with the icu4c 59.1 version. I've installed the 57.1 version and it's all good! So, if you're on Mac you'll just have to:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9b26ef0bad5f88dc5096a88483b38d8155d76c78/Formula/icu4c.rb

and it will install the 57.1 version (using an old homebrew formula)

and then you just have to:

bundle config build.charlock_holmes --with-icu-dir=/usr/local/opt/icu4c
bundle install

😄

57.1 is not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests