Closed BastienDurel closed 7 years ago
Sure. Could you run spec of this library?
git clone --recursive https://github.com/akihikodaki/cld3-ruby.git
cd cld3-ruby
rake spec
Thanks,
Here is the end of the output :
linking shared-object libcld3.so
make: Leaving directory '/root/cld3-ruby/intermediate/ext/cld3'
cd intermediate && bundle exec rspec
An error occurred while loading ./spec/cld3_spec.rb.
Failure/Error: attach_function :delete_NNetLanguageIdentifier, [ :pointer ], :void
RuntimeError:
?_mL@x
# ./vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/lib/ffi/library.rb:277:in `attach'
# ./vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/lib/ffi/library.rb:277:in `attach_function'
# ./lib/cld3.rb:93:in `<module:Unstable>'
# ./lib/cld3.rb:84:in `<module:CLD3>'
# ./lib/cld3.rb:24:in `<top (required)>'
# ./spec/cld3_spec.rb:20:in `require'
# ./spec/cld3_spec.rb:20:in `<top (required)>'
No examples found.
Finished in 0.00053 seconds (files took 0.14057 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
rake aborted!
Command failed with status (1): [cd intermediate && bundle exec rspec...]
/root/cld3-ruby/Rakefile:105:in `block in <top (required)>'
Tasks: TOP => spec
(See full trace by running task with --trace)
... and the bundler output, if needed :
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Fetching ffi 1.9.18
Installing ffi 1.9.18 with native extensions
Fetching rspec-support 3.6.0
Installing rspec-support 3.6.0
Fetching diff-lcs 1.3
Installing diff-lcs 1.3
Using bundler 1.15.1
Using cld3 3.1.3 from source at `.`
Fetching rspec-core 3.6.0
Installing rspec-core 3.6.0
Fetching rspec-expectations 3.6.0
Installing rspec-expectations 3.6.0
Fetching rspec-mocks 3.6.0
Installing rspec-mocks 3.6.0
Fetching rspec 3.6.0
Installing rspec 3.6.0
Bundle complete! 2 Gemfile dependencies, 9 gems now installed.
Bundled gems are installed into ./vendor/bundle.
Let's take a look at the dynamic symbol table.
objdump -T /root/cld3-ruby/intermediate/cld3/libcld3.so
It should have the following entries. The number does not matter:
000000000001f3c0 g DF .text 000000000000003a Base delete_NNetLanguageIdentifier
000000000001f400 g DF .text 000000000000005e Base new_NNetLanguageIdentifier
000000000001f170 g DF .text 0000000000000241 Base NNetLanguageIdentifier_find_language
While searching for rake spec on ffi github, I saw a note about mprotect errors, and running rake spec
after paxctl -mc /usr/bin/ruby
works
I see. I'll close this issue.
It seems we pushed the button at the same time xD
^^
Hello.
I got an error while updating mastodon, and I don't know ruby well enough to debut it, but it seems it's cld3-related :
library seems to be compiled without error :
Can you help me debugging that ?