Tag Cloud
Concourse CI/CD devops prometheus kubernetes monitoring modbus kepware c-programming IoT golang telegram bot python cli urwid elasticsearch aws ecs apache spark scala AWS EMR hadoop webhooks ssl nginx digital-ocean emr apache pig datapipeline found.io elastic-cloud rails try capybara docker capistrano heka bigquery kafka protobuf vim iterm javascript emberjs git scripting dnsmasq bem frontend meteorjs meteorite heroku

Thrift Gem 0.8.0 with Mavericks 10.9

There seems to be some issue with building the thrift gem 0.8.0 on Mavericks. Taken from this discussion: Jira Issue

The issue is that in Mavericks, strlcpy is now defined as a macro if you install the SDK. This conflicts with the duplicate declaration of strlcpy as a function in strlcpy.h. The fix should be simple: don’t re-declare the strlcpy prototype in strlcpy.h. Just remove that line, since is guaranteed to have declared strlcpy declared already–this is tested for already in lib/rb/ext/extconf.rb via the call to have_func(“strlcpy”, “string.h”).

The Solution

As suggested as well from that thread, the issue seems to be pretty easily solvable by either of these two methods:

gem install thrift -v '0.8.0' -- --with-cppflags='-D_FORTIFY_SOURCE=0'

or

bundle config build.thrift --with-cppflags='-D_FORTIFY_SOURCE=0'

The only difference is that the first one will work one off and the second method should work for future builds just for thrift if you’re using bundler.

comments powered by Disqus