gjtorikian / mathematical

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

Build fails in macOS Ventura #119

Closed nathan-contino closed 8 months ago

nathan-contino commented 11 months ago

Thanks to changes in the C23 spec, a dependency of this repo (mtex2MML) fails to build during gem installation. I've raised an issue on the mtex2MML repo to fix this build failure, but for now, it seems to be impossible to install any version of this package on macOS Ventura without resorting to manually building and installing dependencies.

Raising this issue for visibility (so others don't waste the same number of hours that I wasted debugging this), since the underlying issue stems from a dependency.

nathan-contino commented 11 months ago

For anyone else struggling with this issue, here's what you can do to work around it until a release:

  1. Clone the mtex2MML repository.
  2. Follow the build steps defined in the README to create a local, runnable binary.
  3. Follow the install steps defined in the README to install that binary at a system level.
  4. When you install mathematical, set the following environment variables to use the system-level version of mtex2MML and lasem instead of fetching them from the net: MATHEMATICAL_USE_SYSTEM_LASEM=1 MATHEMATICAL_USE_SYSTEM_MTEX2MML=1

Once you have this library installed on your system, use the following command to install packages that depend on mtex2MML using the system version via bundle:

MATHEMATICAL_USE_SYSTEM_LASEM=1 MATHEMATICAL_USE_SYSTEM_MTEX2MML=1 bundle install

And use this command to install mathematical with gem (note the manual 1.6.14 version specification, required thanks to a yanked 1.6.15 and 1.6.16):

MATHEMATICAL_USE_SYSTEM_LASEM=1 MATHEMATICAL_USE_SYSTEM_MTEX2MML=1 gem install mathematical:1.6.14
yonkeltron commented 10 months ago

Can confirm this issue is also present on macOS Sonoma:

$ uname -a
Darwin n3-8-160.dhcp.drexel.edu 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:57 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8112 arm64

$ ruby --version
ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin22]

Is there any other info I can provide?