gjtorikian / mathematical

Convert mathematical equations to SVGs, PNGs, or MathML. A general wrapper to Lasem and mtex2MML.
https://gjtorikian.github.io/mathematical/
MIT License
164 stars 31 forks source link

C extensions and JRuby #62

Closed paulvickers closed 9 months ago

paulvickers commented 8 years ago

I was hoping to use asciidoctor-mathematical from a gradle build file, but Gradle won't accept it because the underlying mathematical package uses C extensions. Here's the error:

Building native extensions.  This could take a while...
ERROR:  Error installing /Users/paulvickers/.gradle/caches/modules-2/files-2.1/rubygems/mathematical/1.5.12/7f159dfab3ddd5414fc3bc236708380d89a69cd0/mathematical-1.5.12.gem:
    ERROR: Failed to build gem native extension.

    java -cp :/Users/paulvickers/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.0.5.0/a5f1d5e8945a08ac9da8f7f528c513c60445eaeb/jruby-complete-9.0.5.0.jar org.jruby.Main -r ./siteconf20160813-18168-8v57du.rb extconf.rb
NotImplementedError: C extensions are not supported

Can mathematical be updated to enable it to work with JRuby too?

gjtorikian commented 7 years ago

It doesn't look like JRuby supports C extensions at all: https://github.com/jruby/jruby/wiki/C-Extension-Alternatives

Is that right? If so, I'm afraid there's not a lot I can do. The underlying parser is written in C. I am not too familiar with JRuby, so I am not sure what my options are. 😓 Do you have any suggestions?