Why does Juliaup install the musl version on Linux?

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.

3 Likes