Closed nekketsuuu closed 4 years ago
How about just making SATySFi $PREFIX
-friendly? (At least setup_root_dirs
will need some changes.) Maybe I am missing the point, though...
PATH
-like environment variable would be helpful anyway.
Survey: TeX uses multiple TEXMF
.
References (in Japanese):
@omasanori What do you think about the method to remember $PREFIX
?
I am unsure but embedding $PREFIX into the source code in compile-time or using relative path would work, I guess.
we shouldn't copy libraries under /usr/local/share
agree. We cannot assume every user has access to /usr/local
Yes, root_dirs is now hard-coded and is not configurable. I was aware, when I wrote that patch, that that may cause some problems, but could not find a neat way to tell opam to modify the source code and embed installation directory strings (e.g. /usr/local or ~/.opam/4.06.0/). (Is there?)
One possible workaround is to get opam installation directory at run time and append it to satysfi_root_dirs
with less priority than ~/.satysfi. Thoughts?
@nyuichi Thanks for your comment! I almost agree with you. I also thought of getting the OPAM prefix at run time by running opam config var prefix
, however I noticed that the same problem will occur if other $PREFIX
is set at compile time. So I'm seeking more general solution.
I can make a large clean up in https://github.com/gfngfn/SATySFi/issues/21 to address many issues including this one later when I have time. But before this I'd like to have font dependency issue resolved
@nekketsuuu
Right. That's not a fix but just a workaround, though I think it should work fine for most users. Meanwhile, I await @objmagic's fix, leaving this issue as it is.
@objmagic, please consider free alternatives I listed too if you work on the font issue. IMHO, using Latin Modern and/or TeX Gyre for Latin scripts and IPAex for Japanese scripts is a lightweight solution.
(Note that Latin Modern and some of TeX Gyre fonts already have corresponding OpenType Math fonts, so they will get harmonized results without much investigation after we get configurable math font feature.)
@objmagic additional note for the font issue https://twitter.com/bd_gfngfn/status/964779203869556737
Thanks. We can wait @gfngfn to fix font issue #13 #17 (since I don't know much about font) and I can fix build issue later (#21, #40)
@objmagic
Are you still working on this? If you don't have time, I can write a patch instead.
Has the problem solved?
Not yet. We still need to execute cp -R "$(opam config var prefix)/share/satysfi" "${HOME}/.satysfi"
as a workaround after installation. https://github.com/gfngfn/SATySFi/pull/109 addresses this, but it has not been reviewed yet.
@gfngfn How's #109 going? I think it's great to resolve this issue for easy installation of SATySFi.
FYI, for workaround, I made a tool https://github.com/na4zagin3/satyrographos which copies the directories under $(opam config var prefix)/share/satysfi/*
to $HOME/.satysfi/dist
with merging.
@nekketsuuu do you mind to close this PR as the lib-satysfi is not installed under the OPAM registory now?
@na4zagin3 Which commits or pull requests do you think of as that change?
@nekketsuuu https://github.com/gfngfn/SATySFi/commit/3c1bd3c652c60dcde6eb8f1ed619c4fd981ca81f must be it.
If https://github.com/gfngfn/SATySFi/pull/149 is merged, the dist library will be installed into OPAM registry again, fyi.
Ah, I remember that. Personally I feel that does not resolve the core of this problem best, but this issue is fixed as you said.
I'm closing this issue, but feel free to reopen this or report an related issue if needed.
Ah, I missed this PR actually includes a proposal to use environment variables.. I'd update the title and the description..
Problem
It seems that
opam install satysfi
doesn't copylib-satysfi
to an appropriate place.Reason
This problem is related to a breaking change requested by #34. This PR changes the default location of the library to
/usr/local/share/satysfi
, but OPAM copies it under$HOME/.opam/4.06.0/share/satysfi
becausePREFIX=%prefix%
while runningopam install satysfi
.And, we shouldn't copy libraries under
/usr/local/share
whileopam install
, because the OPAM manual says:In fact, copying to
/usr/local/share
requiressudo
on Ubuntu.Proposal
This problem will occur if non-default
$PREFIX
is set.How about making a config file which has all library path? I'll make a PR of this.No, this proposal is the same as using
~/.satysfi
. This causes a problem for Homebrew. Some other solution is needed (for example, using an environment variable like$LD_LIBRARY_PATH
?).Workaround
To newcomers: you can fix this issue temporarily by
cp -R "$(opam config var prefix)/share/satysfi" "${HOME}/.satysfi"
.Environment