Closed Vouivre closed 3 years ago
Sounds like the prebuilt TinyTeX binary package (provided since Sept 2020) doesn't work for your OS. You may need to install TinyTeX from source:
wget -qO- "https://yihui.org/tinytex/install-unx.sh" | sh
Could you tell me more about your OS?
uname -a
Thank you! I was able to install it without problems. My system:
$ uname -a
Linux HOSTNAME 5.7.12 #7 SMP Wed Oct 21 07:21:26 UTC 2020 x86_64 GNU/Linux
My linux distribution is kisslinux which is based on musl
. Some other distributions are also based on musl
, but it's not the majority.
I let you close this issue, perhaps you will add a comment somewhere for such a case. It's possible that I missed it.
Great I can enjoy TinyTeX again!
This issue needs to be fixed, but I'm not familiar with kisslinux. In theory, I should exit here if I detect the OS is based on musl:
but I don't know how to obtain the info about musl
. It seems that it is not available in uname
.
I don't understand very will this exit condition. If I'm right, it exits if $OSNAME
is empty. Is that right ?
Perhaps there is a starting point here: https://stackoverflow.com/questions/58177815/how-to-actually-detect-musl-libc
On my system:
$ /lib/ld-musl-x86_64.so.1
musl libc (x86_64)
Version 1.2.2
Dynamic Program Loader
Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname [args]
By chance, I have a chrooted partition on my system: kisslinux with glibc
and not musl
. Perhaps this could help:
cat /usr/lib/libc.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /usr/lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /usr/lib/ld-linux-x86-64.so.2 ) )
In some distributions, perhaps you can have this information in uname -a
, honestly I don't know. It should be tested in voidlinux or alpine for example.
If you want to, I can ask the best way to know if musl
is used instead of glibc
, perhaps there is something better than /lib/ld-musl-x86_64.so.1
.
If I ask, what about opening an issue on github, so you could be involved in the discussion? The other possibility would be on reddit, but I don't know if you have an account. Github makes more sense for me.
EDIT: Ok, I get it. In the exit condition with $OSNAME
you want to know if it's a linux/unix system. Right ? But your intention is not to
differentiate a glibc
from a musl
based system.
Basically I want to make sure the x86_64-linux
binary that I built under Ubuntu won't be installed on other Linux platforms. Currently I'm only testing if uname
returns Linux
: https://github.com/yihui/tinytex/blob/18cc7c50bc52ae0b09baefe8257f68b1196245d6/tools/install-bin-unix.sh#L41
That test is not sufficient in your case.
The current platform can be queried via:
$ tlmgr print-platform
universal-darwin
All supported platforms are:
$ tlmgr platform list
Available platforms:
aarch64-linux
amd64-freebsd
amd64-netbsd
armhf-linux
i386-cygwin
i386-freebsd
i386-linux
i386-netbsd
i386-solaris
(i) universal-darwin
win32
x86_64-cygwin
x86_64-darwinlegacy
x86_64-linux
x86_64-linuxmusl
x86_64-solaris
Already installed platforms are marked with (i)
I'm wondering how I can make sure I won't install a TinyTeX binary that was built on one platform into another platform. This might be too much to ask you, though.
That's right, I had no idea there was so much platform. For sure I know almost all platform but until know in this issue I thought there was only musl
and glibc
. I'm not a dev, I do my best, but perhaps I can help you. After seaching I found some interesting information. From this thread, I know bash
set the variable $OSTYPE
. On my system I get:
$ echo $OSTYPE
linux-musl
My shell is zsh
, unfortunately on sh
this variable is empty. I find it pretty fun, found an issue from the creator of kiss linux. With:
bash -c "echo $OSTYPE"
you can get the information you want probably. On my system:
$ bash -c "echo $OSTYPE"
linux-musl
In this case, even if bash
is not the default shell, this command can be executed. Even if bash
is not the default shell in kiss linux, I think most of the users have it installed. In other distributions it's installed for all users. But I'm not sure it's the same for bsd for example.
Perhaps the best is here: there is a script which is executed with sh
: config.guess
On my system:
$ config.guess
x86_64-pc-linux-musl
It should be tested, but I expect it gives you exactly what you want to. You could test it on your system. It seems to be maintained, the last modifications was in 2021. In this case you only have to call it from your script.
Thanks! That's extremely helpful! I read the source code of the TeX Live installer for a while and discovered that it actually uses the config.guess
(the Perl subroutine platform()
defined in tlpkg/TeXLive/TLUtils.pm
).
Before I try the Oh actually from your config.guess
solution, I wonder what uname -o
returns on your platform (this command might be more portable than the env var OSTYPE
).uname -a
output, I guess uname -o
should return GNU/Linux
. I'll use OSTYPE
.
It should be fixed now (i.e., the original command wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh
should work now). Thanks for the report!
I have tested and it works. Thank you for the fix! :+1:
Hello, I have installed TinyTeX in the past and it worked without problems. I have a linux system. If I try to install it, I get:
I don't remember exactly when I installed Tinytex the last time, but I'm almost sure it was before septembre 2020. I have read in between you are providing some binaries. On my Linux system I have:
busybox ash
forsh
musl
and notglibc
Is the problem related with
busybox
ormusl
?If you need more information, just tell me which one. Thank you!