undefined symbol: rb_nmatrix_dense_create
Hi Prasun,
Validating locally installed RbCuda gem with rake pry as documented gives rbcuda.so: undefined symbol: rb_nmatrix_dense_create.
rake --trace pry
** Invoke pry (first_time)
** Execute pry
pry -r './lib/rbcuda.rb'
Traceback (most recent call last):
11: from /usr/local/bin/pry:23:in `<main>'
10: from /usr/local/bin/pry:23:in `load'
9: from /var/lib/gems/2.5.0/gems/pry-0.11.3/bin/pry:11:in `<top (required)>'
8: from /var/lib/gems/2.5.0/gems/pry-0.11.3/lib/pry/cli.rb:84:in `parse_options'
7: from /var/lib/gems/2.5.0/gems/pry-0.11.3/lib/pry/pry_class.rb:148:in `final_session_setup'
6: from /var/lib/gems/2.5.0/gems/pry-0.11.3/lib/pry/pry_class.rb:105:in `load_requires'
5: from /var/lib/gems/2.5.0/gems/pry-0.11.3/lib/pry/pry_class.rb:105:in `each'
4: from /var/lib/gems/2.5.0/gems/pry-0.11.3/lib/pry/pry_class.rb:106:in `block in load_requires'
3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
2: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
1: from /home/aheumaier/Codebox/rbcuda/lib/rbcuda.rb:2:in `<top (required)>'
/home/aheumaier/Codebox/rbcuda/lib/rbcuda.rb:2:in `require_relative': /home/aheumaier/Codebox/rbcuda/lib/rbcuda.so: undefined symbol: rb_nmatrix_dense_create - /home/aheumaier/Codebox/rbcuda/lib/rbcuda.so (LoadError)
rake aborted!
Command failed with status (1): [pry -r './lib/rbcuda.rb'...]
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/file_utils.rb:67:in `block in create_shell_runner'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/file_utils.rb:57:in `sh'
/home/aheumaier/Codebox/rbcuda/Rakefile:35:in `run'
/home/aheumaier/Codebox/rbcuda/Rakefile:31:in `block in <top (required)>'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `each'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:182:in `invoke'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:160:in `invoke_task'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in top_level'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_threads'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:83:in `block in run'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/var/lib/gems/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/var/lib/gems/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => pry
Feel free to reach out for more information as needed . Happy to help !
Andreas
Did you run bundle install ?
I think nmatrix gem is missing.
bundle show
Gems included by the bundle:
* backports (3.11.3)
* bundler (1.16.2)
* coderay (1.1.2)
* method_source (0.9.0)
* minitest (5.11.3)
* narray (0.6.1.2)
* nmatrix (0.2.4)
* packable (1.3.9)
* pry (0.11.3)
* rake (10.5.0)
* rake-compiler (0.9.9)
* rbcuda (0.1.0)
* rdoc (4.3.0)
rather changes with 0.2.4 ? ( spec.add_development_dependency 'nmatrix', '~> 0.2.1')
Debuggin the extconf.rb on build with -Wl --no-undefined got me :
(...)
checking for nmatrix.h... no
Cannot locate NMatrix header files : nmatrix.h
(...)
abort "Cannot locate NMatrix header files : nmatrix.h" unless find_header("nmatrix.h") breakes the build while nmatrix_header_dir is set to "/var/lib/gems/2.5.0/gems/nmatrix-0.2.4/lib/nmatrix.h" and exist