Skip to content

Instantly share code, notes, and snippets.

@yaauie
Last active October 1, 2015 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaauie/1f483612016442aedbd1 to your computer and use it in GitHub Desktop.
Save yaauie/1f483612016442aedbd1 to your computer and use it in GitHub Desktop.
(cd $(bundle show yajl-ruby)/ext/yajl; sed -i '.bak' 's/inline void/static void/g' yajl_ext.h yajl_ext.c; make clean all)

Your YAJL installed correctly, but when you try to use it, you get the following panic:

dyld: lazy symbol binding failed: Symbol not found: _yajl_set_static_value
  Referenced from: ~/.rvm/gems/ruby-1.9.3-p0/gems/yajl-ruby-1.0.0/lib/yajl/yajl.bundle
  Expected in: flat namespace
 
dyld: Symbol not found: _yajl_set_static_value
  Referenced from: ~/.rvm/gems/ruby-1.9.3-p0/gems/yajl-ruby-1.0.0/lib/yajl/yajl.bundle
  Expected in: flat namespace
 
Trace/BPT trap: 5

The attached script will find your installed YAJL library, modify it in place (backing up originals, of course), and re-build your YAJL to work with CLANG.

Credit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment