-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Auto-detect ghostscript dynamic library (*.dylib) on macOS #66
Comments
Thanks for your suggestion and feedback. I'll gladly add further OS-specific checks to improve dvisvgm's functionality on macOS. Implementing the lookup of |
I've submitted pull request #67. It keeps the There were several alternatives I considered:
Personally, I think approach no.2 is a good trade-off, and I'm happy to update the PR to use this method. But I've submitted the most compatible approach for now. Let me know what you think. |
Great. Thanks for providing a working patch. I agree that keep looking for I adapted your patch a little bit because I'd rather avoid using additional scope blocks (just a personal preference). In order to keep the function short, I slightly adapted the |
I merged your pull request and adapted the code that looks up the Ghostscript library a little bit. Thanks again for your work on this! |
Hello there, |
Toby's patch has been merged into the sources but I haven't published a subsequent release yet due to lack of time and the need for some bugfixes still in the works. If you're familiar with compiling the sources on your own, you can build a binary that contains the latest additions. |
Thank you for your reply. Another question though: from the 'INSTALL' guidelines file I understood that if not specified, the executable of dvisvgm would be created in /usr/local/bin/ |
Hi Nathan, The installation path can be changed with the |
Thanks again Martin, after a little more search, I found this post https://tobywf.com/2017/04/build-dvisvgm-kpathsea-on-macos/ by toby where he provides a script for building dvisvgm and kpathsea on MacOS. |
Sure, feel free to use this ticket for further conversation on the topic, or open a new one. |
@natgrein There's simple hack that I mentioned in the first comment:
Now Apologies for not reacting sooner, but I don't get notifications for old threads. In future, feel free to use |
|
As far as I know that's correct. However, Richard Koch wrote me a couple of months ago that he's going to add |
I'm running dvisvgm (TeX Live) 1.15.1, which comes with MacTeX 2016 on macOS Sierra 10.12.4. The binary isn't linked to ghostscript, and a common way to install it is via the popular Homebrew package manager (
brew install ghostscript
). This creates/usr/local/lib/libgs.9.dylib
, which works fine when passed todvisvgm --libgs
orLIBGS
, but isn't autodetected. A quick, permanent workaround is to symlink/usr/local/lib/libgs.9.dylib
to/usr/local/lib/libgs.so.9
.To make it automatic, the ghostscript loader in
get_libgs()
could also look forlibgs.<i>.dylib
files on macOS only. I've held off on submitting a patch because you have no other macOS specific defines in the codebase so I don't know how to approach it. Maybe Richard Koch has some advice?Alternatively, Homebrew could also produce a
*.so
symlink when ghostscript is installed. But that might have effects on other software, so I don't think it's a good idea - especially considering that multiple easy work-arounds exist.Thanks for all the good work on
dvisvgm
, the clean codebase was truly a joy to browse!The text was updated successfully, but these errors were encountered: