Comments (19)
Additional info, the content of Aptfile
:
libicu-dev
from charlock_holmes.
Here is the result when I use master branch of charlock_holmes from github:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/tmp/build_c80c1c65b90527246de4f9aa16bdb833/vendor/ruby-2.0.0/bin/ruby extconf.rb --with-icu-lib=/tmp/build_c80c1c65b90527246de4f9aa16bdb833/.apt/usr/lib/x86_64-linux-gnu --with-icu-include=/tmp/build_c80c1c65b90527246de4f9aa16bdb833/.apt/usr/include/x86_64-linux-gnu --with-cflags="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -fPIC"
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="
compiling converter.c
compiling encoding_detector.c
compiling ext.c
compiling transliterator.cpp
linking shared-object charlock_holmes/charlock_holmes.so
/usr/bin/ld: /tmp/build_c80c1c65b90527246de4f9aa16bdb833/.apt/usr/lib/x86_64-linux-gnu/libicui18n.a(smpdtfmt.ao): relocation R_X86_64_PC32 against symbol `_ZN6icu_5216SimpleDateFormat22isAfterNonNumericFieldERKNS_13UnicodeStringEi' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make: *** [charlock_holmes.so] Error 1
Gem files will remain installed in /tmp/build_c80c1c65b90527246de4f9aa16bdb833/vendor/bundle/ruby/2.0.0/bundler/gems/charlock_holmes-31307f781d76 for inspection.
Results logged to /tmp/build_c80c1c65b90527246de4f9aa16bdb833/vendor/bundle/ruby/2.0.0/bundler/gems/charlock_holmes-31307f781d76/ext/charlock_holmes/gem_make.out
Installing orm_adapter 0.5.0
Installing colored 1.2
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.
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Multipack app
from charlock_holmes.
I'm ended using https://github.com/webandtech/heroku-buildpack-ruby and the gem installed just fine.
I wonder what cause the above error. It's definitely the same heroku app, same gcc, same cflags. The only different is the library source, apt and tar.gz. In my other apps that deployed on December 2014, it also use the apt and all went just fine.
from charlock_holmes.
I'm running into the same issue, for what it's worth. Still haven't found a solution, but at least you're not the only one seeing it.
from charlock_holmes.
Hi @jayzes,
Previously I have problems with PATH. First time deploy will success, but next deploy will failed. This bugs have been fixed in the latest heroku-buildpack-apt. I'm ended up forking webandtech into my github and will try to kept it up to date with heroku buildpack release:
https://github.com/donnykurnia/heroku-buildpack-ruby
from charlock_holmes.
@donnykurnia which heroku-buildpack-apt are you using to fix it? doesn't look like the main repo has been touched in a few months.
from charlock_holmes.
for what it's worth, Ubuntu upgraded the libicu version in Trusty on 12/31 from 4.8 to 5.2 (https://launchpad.net/ubuntu/trusty/amd64/libicu-dev). Seems like that's the difference. I'm not sure if it's a problem with the underlying libicu version or the package.
from charlock_holmes.
I am having the same problem. My app worked on cedar but when I tried upgrading to cedar-14 it started to happen, can't build charlock_holmes native extension.
from charlock_holmes.
@hammady for what it's worth, pinning the 4.8 debs in my Aptfile did the trick for me on cedar-14. Just put these two lines in there:
http://launchpadlibrarian.net/155496722/libicu48_4.8.1.1-13%2Bnmu1ubuntu1_amd64.deb
http://launchpadlibrarian.net/155496724/libicu-dev_4.8.1.1-13%2Bnmu1ubuntu1_amd64.deb
from charlock_holmes.
I removed the gem totally and used icu4j inside a thrift server which is
already part of my app. Charlock is really too much pain and needs a lot of
hacks in buildpacks. I can post the Java wrapper code if anyone is
interested.
On Thu, Apr 30, 2015 at 4:35 PM Jay Zeschin [email protected]
wrote:
@hammady https://github.com/hammady for what it's worth, pinning the
4.8 debs in my Aptfile did the trick for me on cedar-14. Just put these two
lines in there:—
Reply to this email directly or view it on GitHub
#91 (comment)
.
from charlock_holmes.
are there any fix for this problem?
from charlock_holmes.
sudp apt-get install libicu-dev fixed my problem.
from charlock_holmes.
I followed the steps described here - https://github.com/brianmario/charlock_holmes/wiki/Installing-charlock-holmes-and-libicu-dev-on-heroku
The Aptfile package links mentioned don't work. It works when "ubuntu0.5" is changed to "ubuntu0.6", for example -
when
http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu48_4.8.1.1-3ubuntu0.5_amd64.deb is replaced with
http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu48_4.8.1.1-3ubuntu0.6_amd64.deb.
However on deploying to heroku, I get this error -
LoadError: libicuuc.so.48: cannot open shared object file: No such file or directory - /tmp/build_6c5bab6b6b98520124fe77ce277ed67d/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.7.3/lib/charlock_holmes/charlock_holmes.so
Would appreciate any help on this!
from charlock_holmes.
I kept an updated fork of heroku-buildpack-ruby with Icu4C installed from binaries https://s3.amazonaws.com/frederick-heroku-binaries/icu4c-52.1.0.tar.gz
You can use this build pack: https://github.com/donnykurnia/heroku-buildpack-ruby
I'll try to kept it updated with the new releases (last update is v140).
from charlock_holmes.
Not sure if this will work for anybody else, but I tried @ckdileep's suggestion and it worked for me.
from charlock_holmes.
I've tried all recommendations here with no luck, and https://github.com/brianmario/charlock_holmes/wiki/Installing-charlock-holmes-and-libicu-dev-on-heroku doesn't work either. Anyone else had success?
from charlock_holmes.
I'm getting this:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_a5d8d3d2179fba79edba9bb1a02ee3d2/vendor/ruby-2.2.4/bin/ruby -r
remote: ./siteconf20160922-174-gbufcm.rb extconf.rb /app/icu
remote: checking for main() in -licui18n... no
remote: checking for main() in -licui18n... no
remote:
remote:
remote: ***************************************************************************************
remote: *********** icu required (brew install icu4c or apt-get install libicu-dev)
remote: ***********
remote: ***************************************************************************************
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_a5d8d3d2179fba79edba9bb1a02ee3d2/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-icu-dir
remote: --without-icu-dir
remote: --with-icu-include
remote: --without-icu-include=${icu-dir}/include
remote: --with-icu-lib
remote: --without-icu-lib=${icu-dir}/lib
remote: --with-icui18nlib
remote: --without-icui18nlib
remote: --with-icui18nlib
remote: --without-icui18nlib
remote:
remote: extconf failed, exit code 1
from charlock_holmes.
@dankozlowski how about using my buildpack: https://github.com/donnykurnia/heroku-buildpack-ruby
I kept it up-to-date with heroku releases, current version is 146.
from charlock_holmes.
Hey folks FWIW I experienced this same issue. I was able to push to Heroku using the very latest 0.7.6 version of this gem by upgrading to the very latest Heroku stack, which is Cedar-16. You can accomplish this by adding/editing an app.json in the root of your app and specifying the stack there.
"stack": "heroku-16",
https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack
Hope this helps others.
from charlock_holmes.
Related Issues (20)
- undefined symbol: _ZTIN6icu_488ByteSinkE HOT 6
- Unable to install in CentOS 7.5 - undefined method "<<" for nil:NilClass (NoMethodError) HOT 2
- Question: Using CharlockHolmes in CSV.foreach HOT 2
- It would really nice if you add release notes to every version.
- Installation breaks on Mojave HOT 4
- Doesn't detect UTF-16 files without BOM.
- Install error on Windows 10 64x [ruby 2.3.1p112] [x64-mingw32]
- An error occurred while installing charlock_holmes (0.7.6), and Bundler cannot continue. Make sure that `gem install charlock_holmes -v '0.7.6' --source 'http://rubygems.org/'` succeeds before bundling. HOT 1
- Makefile:235: recipe for target 'transliterator.o' failed (Debian 8 (jessie))
- Makefile:235: recipe for target 'transliterator.o' failed (Debian 8 (jessie)) HOT 2
- macOS 10.14 make: *** [transliterator.o] Error HOT 7
- Can't install gem HOT 1
- Update to latest icu4c? HOT 1
- Installing charlock_holmes 0.7.6 on Oracle Linux fails HOT 1
- charlock_holmes no longer builds on CentOS v6 (g++ 4.4.7)
- Upgrade Docker Ruby image from stretch to buster fails with libicudata HOT 2
- macOS icu4c is too new HOT 2
- LoadError libicudata.64.dylib with 0.7.7 HOT 3
- Best practice for large files?
- Small Strings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from charlock_holmes.