Giter Site home page Giter Site logo

Comments (19)

donnykurnia avatar donnykurnia commented on August 23, 2024

Additional info, the content of Aptfile:

libicu-dev

from charlock_holmes.

donnykurnia avatar donnykurnia commented on August 23, 2024

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.

donnykurnia avatar donnykurnia commented on August 23, 2024

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.

jayzes avatar jayzes commented on August 23, 2024

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.

donnykurnia avatar donnykurnia commented on August 23, 2024

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.

jayzes avatar jayzes commented on August 23, 2024

@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.

jayzes avatar jayzes commented on August 23, 2024

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.

hammady avatar hammady commented on August 23, 2024

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.

jayzes avatar jayzes commented on August 23, 2024

@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.

hammady avatar hammady commented on August 23, 2024

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:

http://launchpadlibrarian.net/155496722/libicu48_4.8.1.1-13%2Bnmu1ubuntu1_amd64.debhttp://launchpadlibrarian.net/155496724/libicu-dev_4.8.1.1-13%2Bnmu1ubuntu1_amd64.deb


Reply to this email directly or view it on GitHub
#91 (comment)
.

from charlock_holmes.

brodock avatar brodock commented on August 23, 2024

are there any fix for this problem?

from charlock_holmes.

msanchez01 avatar msanchez01 commented on August 23, 2024

sudp apt-get install libicu-dev fixed my problem.

from charlock_holmes.

ckdileep avatar ckdileep commented on August 23, 2024

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.

donnykurnia avatar donnykurnia commented on August 23, 2024

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.

holoiii avatar holoiii commented on August 23, 2024

Not sure if this will work for anybody else, but I tried @ckdileep's suggestion and it worked for me.

from charlock_holmes.

dankozlowski avatar dankozlowski commented on August 23, 2024

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.

dankozlowski avatar dankozlowski commented on August 23, 2024

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.

donnykurnia avatar donnykurnia commented on August 23, 2024

@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.

jcstringer avatar jcstringer commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.