[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

glibc independent packages


Yesterday, I tried to setup a multiarch system with amd64 and the
recently added architecture musl-linux-amd64 that uses the musl-libc
instead of the GNU glibc. After setting up a working toolchain, it
worked well building some packages for the musl-linux-amd64 port. One
big problem was, that most, if not all packages depend on glibc,
glibc-dev or libc-dev. I asked myself how this could be solved by not
introducing a mess in the package control files.

Because I am relatively new to the packaging topic, the provided
solutions mentioned in this mail, are probably not thought through. So
please comment constructively.

solution 1: Use tag like {misc:libc}, {misc:libc-dev}, {libc:Depends},
{libc:Dev-Depends}. This would have the advantage, that the debhelper
script can expand the tag and set the correct port specific values,
which are maintained in a central location.

On most architectures {misc:libc-dev} would expand to "libc6-dev |
libc-dev" and on a musl port to "musl-libc-dev".

solution 2: Write the depencies directly in the control file, but with
some wildcard magic.

Depends: libc6-dev [!*musl*] | libc-dev [!*musl*], musl-libc-dev [*musl*]

This solution is semi optimal, because it also "hardcodes" the
depencies. There is also a chance that someone tries to port debian to
other libc's like dietlibc, uclibc etc.

solution 3: Create metapackage libc-dev and let glibc-dev,
musl-libc-dev and possible others provide libc-dev.


For local development I created a script that replaces all glibc
depencies automatically, but in the longer therm this is not a


Reply to: