brianmario / charlock_holmes

Character encoding detection, brought to you by ICU
MIT License
1.03k stars 140 forks source link

macOS icu4c is too new #155

Closed lfuelling closed 4 years ago

lfuelling commented 4 years ago

Hi, I'm getting runtime errors on macOS because charlock_holmes is trying to load:

Additionally this can't be fixed by symlinking the expected files to the current ones because it can't find symbols then:

 Symbol not found: __ZN6icu_648ByteSink15GetAppendBufferEiiPciPi
   Referenced from: ~/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes/charlock_holmes.bundle
   Expected in: /usr/local/opt/icu4c/lib/libicuuc.64.dylib

It would be nice if charlock_holmes could be updated to latest icu4c.

lfuelling commented 4 years ago

I was able to "fix" the errors by reinstalling ruby and all gems. I'm not sure anymore if this was an issue with charlock_holmes.

hmnhf commented 4 years ago

I did the following to fix this:

# Removed charlock_holmes from Gemfile
bundle install
bundle clean
bundle config build.charlock_holmes --with-icu-dir=/usr/local/opt/icu4c 
bundle install