Open donnykurnia opened 9 years ago
Additional info, the content of Aptfile
:
libicu-dev
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
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.
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.
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
@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.
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.
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.
@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
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 notifications@github.com 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 https://github.com/brianmario/charlock_holmes/issues/91#issuecomment-97791543 .
are there any fix for this problem?
sudp apt-get install libicu-dev fixed my problem.
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!
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).
Not sure if this will work for anybody else, but I tried @ckdileep's suggestion and it worked for me.
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?
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
@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.
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.
I followed http://tooky.co.uk/using-charklock_holmes-on-heroku/ with little modification for cedar-14 paths that use Ubuntu Trusty.
My last deploy on 2015/01/11 to heroku successed. Today I try to deploy the exact same code to another heroku apps, but failed.
Here is the error messages that I got:
I have try various combination, but still got the same errors.
.buildpacks
file:.heroku-bundle/config
file:In the previous app, I just use
BUNDLE_BUILD__CHARLOCK_HOLMES: --with-icu-lib=/app/.apt/usr/lib/x86_64-linux-gnu --with-icu-include=/app/.apt/usr/include/x86_64-linux-gnu
.I have try googling with various keywords, only to find references about gentoo and old version of charlock_holmes. I have check and only see that
heroku-buildpack-ruby
recently updated to v130, that's why I try to use v129, but it's show the same error.My Gemfile: