pkgsrc-Users archive

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

Re: Building lang/rust on Linux with Musl libc



Tobias Nygren <tnn%NetBSD.org@localhost> writes:

> Not a fan of encoding musl as a different platform if it implies
> $OPSYS diverges from `uname -s`. Worried it will cost more than it's
> worth outside of mk/.

Agreed that it might cause too much trouble.  Platform is in large about
which user-space tools are present.  So really the bug is bare Linux is
ever in uname -s, because Linux is not an operating system.

> While binary packages linked with musl libc are not portable to
> systems with glibc, this is a fact across all glibc Linux distros as
> well due to different libstdc++.so major numbers, builtin packages,
> systemd ABI unstability and so on. pkg_add should really refuse to work
> with binary packages from a foreign distro but it's beyond the scope of
> the rust problem we're discussing.

Ah, so now we see that "operating system" is even finer-grained than
"GNU/Linux".

> I would suggest to do a C preprocessor check during bootstrap in order
> to set something like _OPSYS_HAS_MUSL automatically in the generated
> mk.conf. Run-time preprocessor checks are generally a bad idea.

That, and nia's suggestion, seem good for this particular situation.

(Also, in general, if it's about building, then the upstream program
should check in configure and deal.)


Home | Main Index | Thread Index | Old Index