[tlbuild] Support for musl

Henri henrimenke at gmail.com
Tue Jan 23 04:37:50 CET 2018


On Tue, 2018-01-23 at 10:39 +0900, Norbert Preining wrote:
> > 
> > The error is from the build of icu which requires xlocale.h which is not included in Alpine
> > Linux
> > because it is only part of the glibc version of libstdc++.  Alpine gets around this by monkey
> Ok, that makes it more complicated to be adapted. Probably one needs to
> work with upstream ICU, poppler, ... to make these libs compile with
> musl in addition to glibc.
> 
> Patching all the libs for musl does not sound like something we want to
> do in TeX Live.

Well, TeX live already pulls in specific versions of the libraries instead of always using upstream,
so I guess it wouldn't be too bad.  And that is what Debian is doing as well, right?  Using upstream
and applying Debian-specific patches to make stuff compile.

> 
> I guess there will be many more problems when it comes to c++?

stdlibc++ can be built against musl but "the headers are incompatible" (whatever that means).  So
yes, one has to expect problems with C++.
https://www.musl-libc.org/faq.html

> 
> > 
> > That is basically what I propose and what some other toolchains already do, most notably the
> > Rust
> Well, but it *is* a pain and owuld need considerable changes in our
> infrastructure, not to speak of explanations to the users ...

Indeed.  I'm am not requesting that you rewrite all infrastructure right now!  But it is certainly
something to keep in mind for the future, especially if more Linux distros are picking up musl.  It
is already in Debian (and others) so it's just a matter of time until they ship musl-based releases.

For now I guess it is totally sufficient to have the custom-bin option (once I manage to create
binaries).  Since musl is still kind of esoteric, I would guess that only non-idiot people use it
and are aware of the consequences, so they should be able to use the custom-bin options without a
struggle.

> > 
> > This could of course be minimised as most users do not need the full scheme.  It is really easy
> > to
> And how to you select what parts to drop and what parts to include?

I'd just build Docker images for the different selections of `scheme` (minus the doc and src trees,
you can't look at docs in the container anyway).

> 
> > 
> > provide images with more minimal schemes as well.  That is where Alpine Linux comes in.  The
> > base
> > image has only 5.5 MB and if it only bundles tl-infra it should be perfect for people who want
> > to
> > install packages by hand on top of a minimal container for their continuous integration.
> Providing docker images based on debian plus the always last version of
> texlive-infra only installed sounds like a good idea - although I don't
> think many people will use them.

I wouldn't say so.  The LaTeX3 team for instance uses Travis CI on GitHub for continuous integration
with their custom setup script for tl-infra.  It is described in detail in
https://www.tug.org/TUGboat/tb36-3/tb114wright.pdf
But this is quite cumbersome.  It would be easier if they just had to `tlmgr install ...`
I think I'll write a TUGboat about the Docker solutions once I have all the containers set up.

> 
> Best
> 
> Norbert
> 
> --
> PREINING Norbert                               http://www.preining.info
> Accelia Inc.     +    JAIST     +    TeX Live     +    Debian Developer
> GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13


More information about the tlbuild mailing list