It looks like Juliaup now prefers the musl version for Linux: juliaup/deploy/shellscript/juliaup-init.sh at main · JuliaLang/juliaup · GitHub
and has done for a while (since 08ad054310bcaaa13d6364d41cdae9b31d391630).
This seems odd when the julialang downloads page states that the musl versions are Tier 2 and the glibc Tier1, and it states that “Most Linux users should use the glibc binaries unless you know that your system uses musl as its libc.” Download Julia
I might be misunderstanding something but it feels like Juliaup and the julialang downloads page are recommending different things?
Many thanks
Which Julia version are you talking about?
?
And which Linux distribution do you have installed?
Note that this wrapper installs juliaup
and not julia
.
1 Like
Ahhhhh! I think I may have overlooked that! So that install script installs an musl version of Juliaup - which then presumably installs a glibc (or musl) version of Julia?
This is with reference to Ubuntu 22.04
Yes! I am also not sure where this script is used, but this is just getting the juliaup
binary which then will get the right version of Julia
Note that the executable is fully statically compiled:
% curl -LfSs 'https://julialang-s3.julialang.org/juliaup/bin/juliainstaller-1.14.9-x86_64-unknown-linux-musl'; readelf -d juliainstaller-1.14.9-x86_64-unknown-linux-musl
Dynamic section at offset 0x531718 contains 22 entries:
Tag Type Name/Value
0x0000000000000010 (SYMBOLIC) 0x0
0x000000000000000c (INIT) 0x3b018
0x000000000000000d (FINI) 0x3dc376
0x0000000000000019 (INIT_ARRAY) 0x70d190
0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)
0x000000000000001a (FINI_ARRAY) 0x70d198
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x0000000000000004 (HASH) 0x1c8
0x000000006ffffef5 (GNU_HASH) 0x1d8
0x0000000000000005 (STRTAB) 0x210
0x0000000000000006 (SYMTAB) 0x1f8
0x000000000000000a (STRSZ) 1 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x7318b8
0x0000000000000007 (RELA) 0x218
0x0000000000000008 (RELASZ) 241152 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x0000000000000018 (BIND_NOW)
0x000000006ffffffb (FLAGS_1) Flags: NOW PIE
0x000000006ffffff9 (RELACOUNT) 10048
0x0000000000000000 (NULL) 0x0
Note the lack of any NEEDED
shared libraries. Statically linking is usually easier to do with musl than glibc because the former libc is much smaller than the latter, and so you can get relatively lightweight self-contained applications which can run on any Linux machine of the same architecture (x86_64 in this case), independently of the libc used on that system.
2 Likes
So most folks here had the right story already: only juliaup is using musl, and then will install the regular glibc version of julia.
If I remember this correctly, then the reason was this: Julia is compatible with a pretty old versions of glibc. Trying to compile a juliaup version that also works with similarly old versions of glibc turned out to be a bit tricky, so then we decided to just statically link musl so that the juliaup binaries don’t have any dependencies at all and be done with the problem ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
That is the first thing that gets executed when you run curl -fsSL https://install.julialang.org | sh
, i.e. that is what is hosted at https://install.julialang.org. Or rather: a slightly modified version, we replace some parts of the version of the file that is tracked on GitHub before it gets uploaded to the install.julialang.org location.