Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on installation related to convolver light M1 macbook air osx 12.5 #9

Open
yeahsmaggy opened this issue Dec 16, 2022 · 3 comments

Comments

@yeahsmaggy
Copy link

Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Using rake 13.0.6
Using bundler 2.3.26
Using chunky_png 1.3.15
Using afm 0.2.2
Using narray 0.6.1.2
Using hashery 2.1.2
Using matrix 0.4.2
Using ruby-rc4 0.1.5
Using Ascii85 1.1.0
Using ttfunk 1.7.0
Using slop 4.9.3
Using rtesseract 3.1.2
Using pdf-reader 2.11.0
Using oily_png 1.2.1
Installing convolver-light 0.3.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/convolver-light-0.3.3/ext/convolver

/Users/andrewwelch/.rvm/rubies/ruby-3.0.0/bin/ruby -I /Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r ./siteconf20221216-16273-c3dm96.rb extconf.rb
checking for narray.h... yes
checking for narray_config.h... yes
creating Makefile

current directory: /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/convolver-light-0.3.3/ext/convolver
make "DESTDIR=" clean

current directory: /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/convolver-light-0.3.3/ext/convolver
make "DESTDIR="
compiling convolve_raw.c
compiling convolver.c
compiling narray_shared.c
linking shared-object convolver/convolver.bundle
Undefined symbols for architecture arm64:
"_na_cast_object", referenced from:
_narray_convolve in convolver.o
_narray_fit_backwards in convolver.o
"_na_make_object", referenced from:
_narray_convolve in convolver.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [convolver.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/convolver-light-0.3.3 for inspection.
Results logged to /Users/andrewwelch/.rvm/gems/ruby-3.0.0/extensions/arm64-darwin-21/3.0.0/convolver-light-0.3.3/gem_make.out

/Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:90:in run' /Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:42:in block in make'
/Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:34:in each' /Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:34:in make'
/Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:64:in block in build' /Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tempfile.rb:317:in open'
/Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:28:in build' /Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:156:in build_extension'
/Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in block in build_extensions' /Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:187:in each'
/Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:187:in build_extensions' /Users/andrewwelch/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/installer.rb:821:in build_extensions'
/Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/rubygems_gem_installer.rb:72:in build_extensions' /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/rubygems_gem_installer.rb:28:in install'
/Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/source/rubygems.rb:207:in install' /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/installer/gem_installer.rb:54:in install'
/Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/installer/gem_installer.rb:16:in install_from_spec' /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/installer/parallel_installer.rb:186:in do_install'
/Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/installer/parallel_installer.rb:177:in block in worker_pool' /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/worker.rb:62:in apply_func'
/Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/worker.rb:57:in block in process_queue' /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/worker.rb:54:in loop'
/Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/worker.rb:54:in process_queue' /Users/andrewwelch/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.26/lib/bundler/worker.rb:91:in block (2 levels) in create_threads'

An error occurred while installing convolver-light (0.3.3), and Bundler cannot continue.

In Gemfile:
iguvium was resolved to 0.9.3, which depends on
convolver-light

@adworse
Copy link
Owner

adworse commented Dec 17, 2022

convolver-light, as its parent gem convolver, depends on https://rubygems.org/gems/narray
na_cast_object and na_make_object are defined in narray.h from this gem's native extension, which in turn is included in https://github.com/neilslater/convolver/blob/bd10ee56219aa79685e29dadec794db67e4deb27/ext/convolver/convolver.c#L4

This dependency is set in gemspec file, so it's highly improbable you would get to compilation w/o it being installed first. I see two options here; both are not a bug in convolver-light or iguvium:

  1. narray gem native extensions were not built,
  2. your Ruby paths are somehow messed up.

The former is quite easy to check:

irb
001 > require 'narray'
 => true 
002 > NArray.float(2,2).indgen!
 => NArray.float(2,2): 
[ [ 0.0, 1.0 ], 
  [ 2.0, 3.0 ] ] 
003 > 

Does it work like this for you?

@yeahsmaggy
Copy link
Author

yeahsmaggy commented Dec 19, 2022

Yes it does work
Screenshot 2022-12-19 at 08 54 21

How would the ruby paths be messed up? How should they be configured?

@adworse
Copy link
Owner

adworse commented Dec 20, 2022

@yeahsmaggy could you please try this: gem install convolver-light:0.3.3 -- --with-ldflags="-Wl,-undefined,dynamic_lookup"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants