Can't install thrift gem on OS X El Capitan

前端 未结 3 2010
一整个雨季
一整个雨季 2020-12-14 17:39

Trying to install thift gem after OSX El Capitan upgrade:

    $ gem install thrift
    Building native extensions.  This could take a while...
    ERROR:  Er         


        
相关标签:
3条回答
  • 2020-12-14 18:20

    Try this

    gem install thrift -v '0.9.0' -- --with-cppflags='-D_FORTIFY_SOURCE=0'
    
    0 讨论(0)
  • 2020-12-14 18:29

    You need to escape double quotes.

    $ bundle config build.thrift "--with-cppflags=\"-D_FORTIFY_SOURCE=0 -Wno-shift-negative-value\""

    $ cat ~/.bundle/config

    BUNDLE_BUILD__THRIFT: --with-cppflags="-D_FORTIFY_SOURCE=0 -Wno-shift-negative-value"

    0 讨论(0)
  • 2020-12-14 18:40

    I have a solution for you! Hopefully.

    Had this same problem the other day.

    The problem is in the clang compiler that El Capitan comes bundled with. I'm sure it screws up other issues but this is one point that I had a lot of issues with.

    Try running the following command and let me know how it goes!

    gem install thrift -- --with-cppflags=\"-D_FORTIFY_SOURCE=0 -Wno-shift-negative-value\"
    
    0 讨论(0)
提交回复
热议问题