Open apospielov opened 1 year ago
I think you need to run gem pristine charlock_holmes
. I suspect icu4c
was upgraded by Homebrew. https://github.com/brianmario/charlock_holmes/pull/164 attempts to avoid this problem by statically linking the libraries.
FYI, I published static_holmes
with #164. You need to pass --enable-static
in one of two ways:
gem install static_holmes -- --enable-static
Alternatively, add this to your Gemfile
:
source 'https://rubygems.org'
gem 'static_holmes', '~> 0.7.11', require: 'charlock_holmes'
bundle config build.static_holmes "--enable-static"
bundle install
This only works with macOS out-of-the-box because most distributions (at least Ubuntu and Debian) don't ship with a static library compiled with -fPIC
.
gem pristine charlock_holmes
ain't working on 22.04 0 as of now no idea how to make it work
@mensfeld What happens if you uninstall and install again?
gem uninstall charlock_holmes
gem install charlock_holmes
@stanhu same. I basically had to compile icu myself and move it to a proper location to make it work.
@mensfeld What errors are you seeing?
@stanhu I no longer see any because I compiled icu and moved it where charlock expected it but when I had it, I pretty much had the same complaint as the first person here (just for libicudata.so.73):
Uncaught exception: libicudata.so.73: cannot open shared object file: No such file or directory
My ubuntu 22.04 by default has icu up to 66. No idea how and why it wanted 73. Ubuntu 22.04 by default ain't shipped with such fresh one.
Strange. It sounds like charlock_holmes
found libicudata.so.73
somewhere in your system at some point, and now it's gone.
@stanhu yeah I know. But I looked into the sources and apt references and I was not able to find any. I literally scanned my whole system for the so icu files. Nothing of that version. Reinstall, rebuild wasn't helping. What helped was me compiling the icu 73. Since I have a fix and it seems to be my machine specific oh well :shrug:
FYI I have a second machine with ubuntu 20.04 (not 22.04) and there is no issue there.
@mensfeld I wonder if you had a .pc
lying around that referenced version 73.
What does pkg-config --cflags --libs-only-l icu-i18n
return?
pkg-config --cflags --libs-only-l icu-i18n
-I/home/mencio/.miniconda3/include -licui18n -licuuc -licudata
Oh, what about pkg-config --libs-only-L icu-i18n
?
I wonder if this suggests you have a copy of ICU inside /home/mencio/.miniconda3
. Perhaps some Python wheel installed a copy?
Hey @stanhu I'll check this for you tomorrow on this PC where it happened but this is possible. Since I installed icu 73 and problem went away it's hard for me to debug this further :(
pkg-config --libs-only-L icu-i18n
-L/home/user/.miniconda3/lib
yeah, but this dir does not exist 0_o
@mensfeld I think that means you still have a icu-i18n.pc
in your system pointing to that path. Can you try running with the --debug
flag?
pkg-config --libs-only-L icu-i18n --debug
Trying to run my project on ubuntu 22. ruby 3.1.2 getting this:
the file /home/andrey/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes/charlock_holmes.so is present there.
How to fix?