Hi,
I'm not sure whether my problem relates to libotr
, ffi
, or ffi-otr
, so I figured you might at least direct me to the right place.
With this Gemfile
gem "ffi", "1.0.11"
gem "ffi-otr", :git => "git://github.com/sophsec/ffi-otr.git", :branch => "master"
and this code
require 'ffi/otr'
user_state = FFI::OTR.otrl_userstate_create
FFI::OTR.otrl_privkey_generate user_state, 'private_key.txt', 'myaccount', 'myprotocol'
I get the following error (using bundle exec ruby otr.rb
)
dyld: lazy symbol binding failed: Symbol not found: _otrl_privkey_generate_FILEp
Referenced from: /usr/local/lib/libotr.dylib
Expected in: flat namespace
dyld: Symbol not found: _otrl_privkey_generate_FILEp
Referenced from: /usr/local/lib/libotr.dylib
Expected in: flat namespace
(the file private_key.txt
is actually even created, but it's empty)
First, I installed libotr via homebrew and fiddled with LD_LIBRARY_PATH
to get some output at all, but even when I used ./configure && make && install
in libotr, I get the linking error above.
Is there some way to get around this? As a matter of fact, I'm wandering what you use the Ruby-libotr-binding for yourself :)
I appreciate any hints.
My configuration:
libotr-3.2.0
Darwin Kernel Version 11.2.0: [...]; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0] (using rbenv)