Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Installing appium_lib with Ruby v2.4.2 Due to JSON #781

Closed
PatrickDuncan opened this issue Oct 13, 2017 · 5 comments
Closed

Error Installing appium_lib with Ruby v2.4.2 Due to JSON #781

PatrickDuncan opened this issue Oct 13, 2017 · 5 comments
Labels
state: please discuss please discuss the issue or vote for your favorite option

Comments

@PatrickDuncan
Copy link

Hello we're trying to install appium_lib v9.6.1 (bundle install) with Ruby v2.4.2-2 and we're getting an error with json v2.1.0 (and 1.8.7):

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171006-3700-aias1v.rb extconf.rb
creating Makefile

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR="
generating generator-x64-mingw32.def
compiling generator.c
Makefile:241: recipe for target 'generator.o' failed
process_begin: CreateProcess(NULL, x86_64-w64-mingw32-gcc -I.
-IC:/Ruby24-x64/include/ruby-2.4.0/x64-mingw32
-I/C/Ruby24-x64/include/ruby-2.4.0/ruby/backward
-I/C/Ruby24-x64/include/ruby-2.4.0 -I. -DJSON_GENERATOR -D_FORTIFY_SOURCE=2
-D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501
-D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=generic
-O2 -pipe -o generator.o -c generator.c, ...) failed.
make (e=2): The system cannot find the file specified.

make: *** [generator.o] Error 2

make failed, exit code 2

Gem files will remain installed in
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0 for inspection.
Results logged to
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out

An error occurred while installing json (2.1.0), and Bundler cannot continue.
Make sure that `gem install json -v '2.1.0'` succeeds before bundling.

In Gemfile:
  appium_lib was resolved to 9.6.1, which depends on
    json

We've followed rubygems/bundler#4462 to no avail.

Right now we're using Ruby 2.3.3 and everything is running smoothly. I created rubygems/bundler#6083 before this ticket

@nlohmann
Copy link
Owner

I am not sure what this has to do with the library itself, meaning the code. This seems to an issue in the build script, which I have no knowledge about.

@nlohmann nlohmann added the state: please discuss please discuss the issue or vote for your favorite option label Oct 16, 2017
@nlohmann
Copy link
Owner

@PatrickDuncan I need more information on how this is a library issue.

@nlohmann
Copy link
Owner

💤 I closed this issue due to inactivity. Please feel free to add a comment and I shall reopen it.

@liraneli
Copy link

i'm getting the issue trying to do bundle install on my project:

$ bundle install
Fetching gem metadata from https://rubygems.org/.............
Using i18n 0.7.0
Fetching json 1.8.3
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171031-20388-lft7cv.rb extconf.rb
creating Makefile

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
generating generator-x64-mingw32.def
compiling generator.c
process_begin: CreateProcess(NULL, x86_64-w64-mingw32-gcc -I.
-IC:/Ruby24-x64/include/ruby-2.4.0/x64-mingw32
-I/C/Ruby24-x64/include/ruby-2.4.0/ruby/backward
-I/C/Ruby24-x64/include/ruby-2.4.0 -I. -DJSON_GENERATOR -D_FORTIFY_SOURCE=2
-D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501
-D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=generic
-O2 -pipe -o generator.o -c generator.c, ...) failed.
make (e=2): The system cannot find the file specified.

make: *** [generator.o] Error 2

make failed, exit code 2

Gem files will remain installed in
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.3 for inspection.
Results logged to
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-1.8.3/gem_make.out

An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.

In Gemfile:
  middleman was resolved to 4.1.10, which depends on
    middleman-core was resolved to 4.1.10, which depends on
      padrino-helpers was resolved to 0.13.3.1, which depends on
        padrino-support was resolved to 0.13.3.1, which depends on
          activesupport was resolved to 4.2.7.1, which depends on
            json

@nlohmann
Copy link
Owner

@liraneli From the error message I cannot see how this is a library issue. Please contact the maintainer of the Ruby package "json 1.8.3".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: please discuss please discuss the issue or vote for your favorite option
Projects
None yet
Development

No branches or pull requests

3 participants