metanorma / ruby-libmspack

Ruby wrapper for libmspack. Library for compressing and decompressing Microsoft compression formats, CAB, CHM, HLP, LIT, KWAJ and SZDD.
The Unlicense
0 stars 0 forks source link

arm64 mac m1 support #5

Open CAMOBAP opened 2 months ago

CAMOBAP commented 2 months ago

Original issue: https://github.com/metanorma/metanorma-plugin-glossarist/issues/32#event-13600154301

Based on the log from GH Action run, it seems like arm64 m1 is not supported by the gem:

...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/runner/work/metanorma-plugin-glossarist/metanorma-plugin-glossarist/vendor/bundle/ruby/3.1.0/gems/libmspack-0.11.0/ext
/Users/runner/hostedtoolcache/Ruby/3.1.6/arm64/bin/ruby
-I/Users/runner/hostedtoolcache/Ruby/3.1.6/arm64/lib/ruby/3.1.0 -rrubygems
/Users/runner/work/metanorma-plugin-glossarist/metanorma-plugin-glossarist/vendor/bundle/ruby/3.1.0/gems/rake-12.3.3/exe/rake
RUBYARCHDIR\=/Users/runner/work/metanorma-plugin-glossarist/metanorma-plugin-glossarist/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-22/3.1.0-static/libmspack-0.11.0
RUBYLIBDIR\=/Users/runner/work/metanorma-plugin-glossarist/metanorma-plugin-glossarist/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-22/3.1.0-static/libmspack-0.11.0
rake aborted!
ArgumentError: wrong number of arguments (given 2, expected 1)
...

can we add prebuilt for mac m1?

Full log: https://github.com/metanorma/metanorma-plugin-glossarist/actions/runs/9714850307/job/27745719951#step:3:465

maxirmx commented 2 months ago

The bottom line is that I do not see and staightforward or simple solution. I can do research and try to propose some steps to improve stability of libmspack build/setup. It is a matter of priorities. @ronaldtse please advise