Skip to content

Encounter ‘Failed to build gem native extension ‘error while installing grit_ext gem on Ubuntu trusty (14.04) ppc64le machine  #2

Open
@MaheshWaidande

Description

@MaheshWaidande

I tried to install grit_ext gem on Ubuntu trusty (14.04) which is running on top of ppc64le hardware, while installing it (grit_ext gem) I encounter with ‘Failed to build gem native extension ‘error.

I investigate more this error and find out that grit_ext gem has dependency on ‘charlock_holmes’ gem version 0.6.9 which is not compatible with ppc64le and throws an ‘Failed to build gem native extension’ error when grit_ext.gemspec file tried to deploy it on Ubuntu trusty ppc64le machine.

I have done some experiment with charlock_holmes gem and found that all the versions above 0.7.0 are compatible with ppc64le and I am able to install them successfully on my Ubuntu machine.
For porting grit_ext gem on Ubuntu ppc64le or gem to be work on ppc64le, we need to modify version of charlock_holmes gem to 0.7.0 and above in grit_ext.gemspec spec file.

I download source of grit_ext gem and I modify version of charlock_holmes gem to 0.7.0 in grit_ext.gemspec file, create gem out of it and install it successfully on my Ubuntu machine.

ubuntu@test:~/grit_ext$ git diff
diff --git a/grit_ext.gemspec b/grit_ext.gemspec
index a0199dd..0e6b8c3 100644
--- a/grit_ext.gemspec
+++ b/grit_ext.gemspec
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.version = GritExt.version

  • gem.add_dependency("charlock_holmes", "~> 0.6.9")
  • gem.add_dependency("charlock_holmes", "~> 0.7.0")

gem.add_development_dependency("rspec", "> 2.11")
gem.add_development_dependency("grit", "
> 2.5")
ubuntu@test:~/grit_ext$

For gem to work on ppc64le architecture we need to modify version of charlock_holmes to 0.7.0 and above in grit_ext.gemspec file.

Below I have listed machine and architecture details for more clarity /information.
ubuntu@test:/grit_ext$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
ubuntu@test:
/grit_ext$

ubuntu@test:/grit_ext$ uname -a
Linux test-local-machine-2 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:13 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
ubuntu@test:
/grit_ext$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions