cardmagic / classifier

A general classifier module to allow Bayesian and LSI classifications.
Other
661 stars 122 forks source link

Getting mathn native extension error when installing on MacOS (Apple M1 Silicon) #35

Closed dpetruha closed 3 months ago

dpetruha commented 3 months ago

Hi! Not sure if you can help with this? I see you had some recent fixes/commits related to mathn. Thank you!

gem install classifier
Building native extensions. This could take a while...
ERROR:  Error installing classifier:
        ERROR: Failed to build gem native extension.

    current directory: /Users/dpetruha/.gem/ruby/3.1.2/gems/mathn-0.1.0/ext/mathn/complex
/Users/dpetruha/.rubies/ruby-3.1.2/bin/ruby extconf.rb
creating Makefile

current directory: /Users/dpetruha/.gem/ruby/3.1.2/gems/mathn-0.1.0/ext/mathn/complex
make DESTDIR\= sitearchdir\=./.gem.20240731-20135-dhnesj sitelibdir\=./.gem.20240731-20135-dhnesj clean

current directory: /Users/dpetruha/.gem/ruby/3.1.2/gems/mathn-0.1.0/ext/mathn/complex
make DESTDIR\= sitearchdir\=./.gem.20240731-20135-dhnesj sitelibdir\=./.gem.20240731-20135-dhnesj
compiling complex.c
linking shared-object mathn/complex.bundle
ld: warning: -multiply_defined is obsolete
Undefined symbols for architecture arm64:
  "_nucomp_canonicalization", referenced from:
      _Init_complex in complex.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [complex.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/dpetruha/.gem/ruby/3.1.2/gems/mathn-0.1.0 for inspection.
Results logged to /Users/dpetruha/.gem/ruby/3.1.2/extensions/arm64-darwin-21/3.1.0/mathn-0.1.0/gem_make.out
dpetruha commented 3 months ago

@cardmagic , do you think you can help with this?

cardmagic commented 3 months ago

Fixed in 1.4.0