简体   繁体   中英

Why can't I bundle install json -v 1.8.3 and other gems for mac osx sierra?

I recently upgraded to ruby 2.2.5 and MAC OSX sierra. When I try to bundle install I get a number of errors with a variety of gems. Here are a few examples:

json gem

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

/Users/drubio/.rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20161012-33018-1t7a1pc.rb extconf.rb
 creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling debug_inspector.c
linking shared-object debug_inspector.bundle
ld: warning: directory not found for option '-L/Users/travis/.sm/pkg/active/lib'

make "DESTDIR=" install
make: /usr/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.time] Error 1

make install failed, exit code 2

Gem files will remain installed in /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/debug_inspector-0.0.2 for inspection.
Results logged to /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/extensions/x86_64-darwin-15/2.2.0-static/debug_inspector-0.0.2/gem_make.out

Here is the libv8 gem:

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

/Users/drubio/.rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20161012-33018-u9qwng.rb extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.12
Using compiler: /usr/bin/c++ (clang version 8.0.0)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o has no symbols
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
In file included from ../src/accessors.cc:28:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:32:
../src/objects.h:5252:44: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
  static const int kElementsKindMask = (-1 << kElementsKindShift) &
                                        ~~ ^
../src/objects.h:7386:36: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
      (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
2 errors generated.
make[1]: *** [/Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1
make: *** [x64.release] Error 2
/Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
    from /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/ext/libv8/location.rb:35:in `each'
    from /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/ext/libv8/location.rb:35:in `verify_installation!'
    from /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/ext/libv8/location.rb:26:in `install!'
    from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=x64 \
                  -S.x64  -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror=''
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/diy-fp.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/dtoa.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fast-dtoa.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fixed-dtoa.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/once.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparse-data.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser-api.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/scanner.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/strtod.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/token.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/unicode.o
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser_lib/src/utils.o
  LIBTOOL-STATIC /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/libpreparser_lib.a
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/preparser/preparser/preparser-process.o
  LINK(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/preparser
  CXX(target) /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o

extconf failed, exit code 1

Gem files will remain installed in /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/libv8-3.16.14.13 for inspection.
Results logged to /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/extensions/x86_64-darwin-15/2.2.0-static/libv8-3.16.14.13/gem_make.out

and here is a particularly long error/warning for the bluecloth gem:

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

    /Users/drubio/.rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20161012-33018-9auiyx.rb extconf.rb
checking for srand()... yes
checking for random()... yes
checking for bzero() in string.h,strings.h... yes
checking for strcasecmp()... yes
checking for strncasecmp()... yes
checking for mkdio.h... yes
checking for ruby/encoding.h... yes
creating extconf.h
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling bluecloth.c
compiling Csio.c
compiling css.c
compiling docheader.c
compiling emmatch.c
emmatch.c:113:20: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    case 2: if ( e = empair(f,first,last,match=2) )
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
emmatch.c:113:20: note: place parentheses around the assignment to silence this warning
    case 2: if ( e = empair(f,first,last,match=2) )
                   ^
                 (                               )
emmatch.c:113:20: note: use '==' to turn this assignment into an equality comparison
    case 2: if ( e = empair(f,first,last,match=2) )
                   ^
                   ==
1 warning generated.
compiling generate.c
generate.c:609:19: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    else if ( tag = pseudo(ref->link) ) {
              ~~~~^~~~~~~~~~~~~~~~~~~
generate.c:609:19: note: place parentheses around the assignment to silence this warning
    else if ( tag = pseudo(ref->link) ) {
                  ^
              (                      )
generate.c:609:19: note: use '==' to turn this assignment into an equality comparison
    else if ( tag = pseudo(ref->link) ) {
                  ^
                  ==
generate.c:703:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
                if ( ref = bsearch(&key, T(*f->footnotes), S(*f->footnotes),
                     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
generate.c:703:12: note: place parentheses around the assignment to silence this warning
                if ( ref = bsearch(&key, T(*f->footnotes), S(*f->footnotes),
                         ^
generate.c:703:12: note: use '==' to turn this assignment into an equality comparison
                if ( ref = bsearch(&key, T(*f->footnotes), S(*f->footnotes),
                         ^
                         ==
2 warnings generated.
compiling html5.c
compiling markdown.c
markdown.c:184:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( end = strstr(T(t->text), "-->") ) {
             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
markdown.c:184:11: note: place parentheses around the assignment to silence this warning
        if ( end = strstr(T(t->text), "-->") ) {
                 ^
             (                              )
markdown.c:184:11: note: use '==' to turn this assignment into an equality comparison
        if ( end = strstr(T(t->text), "-->") ) {
                 ^
                 ==
markdown.c:232:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
                if ( closing = (c == '/') ) c = flogetc(&f);
                     ~~~~~~~~^~~~~~~~~~~~
markdown.c:232:16: note: place parentheses around the assignment to silence this warning
                if ( closing = (c == '/') ) c = flogetc(&f);
                             ^
                     (                   )
markdown.c:232:16: note: use '==' to turn this assignment into an equality comparison
                if ( closing = (c == '/') ) c = flogetc(&f);
                             ^
                             ==
markdown.c:475:8: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( x=is_extra_dt(t->next, clip) )
             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
markdown.c:475:8: note: place parentheses around the assignment to silence this warning
        if ( x=is_extra_dt(t->next, clip) )
              ^
             (                           )
markdown.c:475:8: note: use '==' to turn this assignment into an equality comparison
        if ( x=is_extra_dt(t->next, clip) )
              ^
              ==
markdown.c:489:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if ( ret = is_discount_dt(t,clip) )
         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
markdown.c:489:14: note: place parentheses around the assignment to silence this warning
    if ( ret = is_discount_dt(t,clip) )
             ^
         (                           )
markdown.c:489:14: note: use '==' to turn this assignment into an equality comparison
    if ( ret = is_discount_dt(t,clip) )
             ^
             ==
markdown.c:763:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( p->ident = malloc(4+strlen(prefix)+S(q->text)) )
             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
markdown.c:763:16: note: place parentheses around the assignment to silence this warning
        if ( p->ident = malloc(4+strlen(prefix)+S(q->text)) )
                      ^
             (                                             )
markdown.c:763:16: note: use '==' to turn this assignment into an equality comparison
        if ( p->ident = malloc(4+strlen(prefix)+S(q->text)) )
                      ^
                      ==
markdown.c:928:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( para = (q != text) ) {
             ~~~~~^~~~~~~~~~~~~
markdown.c:928:12: note: place parentheses around the assignment to silence this warning
        if ( para = (q != text) ) {
                  ^
             (                 )
markdown.c:928:12: note: use '==' to turn this assignment into an equality comparison
        if ( para = (q != text) ) {
                  ^
                  ==
6 warnings generated.
compiling mkdio.c
mkdio.c:272:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if ( len = S(f.out) ) {
         ~~~~^~~~~~~~~~
mkdio.c:272:14: note: place parentheses around the assignment to silence this warning
    if ( len = S(f.out) ) {
             ^
         (             )
mkdio.c:272:14: note: use '==' to turn this assignment into an equality comparison
    if ( len = S(f.out) ) {
             ^
             ==
1 warning generated.
compiling resource.c
compiling setup.c
compiling tags.c
compiling version.c
compiling xml.c
xml.c:49:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( entity = mkd_xmlchar(c) )
             ~~~~~~~^~~~~~~~~~~~~~~~
xml.c:49:14: note: place parentheses around the assignment to silence this warning
        if ( entity = mkd_xmlchar(c) )
                    ^
             (                      )
xml.c:49:14: note: use '==' to turn this assignment into an equality comparison
        if ( entity = mkd_xmlchar(c) )
                    ^
                    ==
xml.c:72:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( entity = mkd_xmlchar(c) )
             ~~~~~~~^~~~~~~~~~~~~~~~
xml.c:72:14: note: place parentheses around the assignment to silence this warning
        if ( entity = mkd_xmlchar(c) )
                    ^
             (                      )
xml.c:72:14: note: use '==' to turn this assignment into an equality comparison
        if ( entity = mkd_xmlchar(c) )
                    ^
                    ==
2 warnings generated.
compiling xmlpage.c
xmlpage.c:33:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if ( title = mkd_doc_title(p) )
             ~~~~~~^~~~~~~~~~~~~~~~~~
xmlpage.c:33:13: note: place parentheses around the assignment to silence this warning
        if ( title = mkd_doc_title(p) )
                   ^
             (                       )
xmlpage.c:33:13: note: use '==' to turn this assignment into an equality comparison
        if ( title = mkd_doc_title(p) )
                   ^
                   ==
1 warning generated.
linking shared-object bluecloth_ext.bundle
ld: warning: directory not found for option '-L/Users/travis/.sm/pkg/active/lib'

make "DESTDIR=" install
make: /usr/local/bin/gmkdir: No such file or directory
make: *** [.RUBYARCHDIR.time] Error 1

make install failed, exit code 2

Gem files will remain installed in /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/gems/bluecloth-2.2.0 for inspection.
Results logged to /Users/drubio/.rvm/gems/ruby-2.2.5@ohloh-ui/extensions/x86_64-darwin-15/2.2.0-static/bluecloth-2.2.0/gem_make.out

I have more errors for a variety of gems like the ones above. I've tried to look into this on stack overflow and some issues and the only thing I found was to update/upgrade brew and to update my xcode version from 7.3 to 8.0. I've done both of these upgrades and the errors still persist. Now I'm at a loss as to what to do. Everything works fine with ruby versions lower than 2.2.5 but the problem happens when I try to cap deploy as the environment that I'm deploying to uses ruby 2.2.5. Does anyone have any ideas as to what could be wrong?

It seems the answer to my problem was to install the latest version of bundler.

Bundler

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM