Skip to content

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

Closed

Description

@PatrickDuncan

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

Activity

  1. nlohmann commented on Oct 14, 2017

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

  2. nlohmann commented on Oct 18, 2017

    @nlohmann
    Owner

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

  3. nlohmann commented on Oct 21, 2017

    @nlohmann
    Owner

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

  4. liraneli commented on Oct 31, 2017

    @liraneli

    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
    
  5. nlohmann commented on Oct 31, 2017

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: please discussplease discuss the issue or vote for your favorite option

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions