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



Nathan Fisher <nfisher.sr%gmail.com@localhost> writes:

> This port needs to fetch a binary toolchain to bootstrap the compiler
> from source. It fails on Linux using Musl libc because after checking
> what the OS is and determining that it is Linux it automatically grabs
> the "gnu" version of the toolchain.
>
> .if ${MACHINE_PLATFORM:MLinux-*-aarch64} || make(distinfo) || make
> (makesum) || make(mdi)
> RUST_STAGE0_VER=    1.68.2
> RUST_ARCH:=        aarch64-unknown-linux-gnu
> ...etc
>
> I'm aware that there is no particularly good way to check for Musl at
> compile time, but it would be great if this port could at the very
> least have a way to override the assumption of Glibc, even if it's
> just manually using the package options framework. Probably better
> would be if there were a global flag that could go into
> /usr/pkg/etc/mk.conf as I assume there have to be other packages that
> would benefit by knowing that they are being compiled on a Musl
> system? I'd be happy to put some work into a fix if there was some
> concensus as to what the best way forward is.

My quick reaction is that in pkgsrc, we really deal with operating
systems and not kernels.  So "linux" despite what it technically means,
is really GNU/Linux, in that if you look at mk/platform/Linux.mk it will
assume GNU.

You are using musl+?/Linux which is a different operating system from
GNU/Linux, and it needs its own platform mk.   Then it needs a way to
identify it, perhaps by bootstrap-time switch.  And finally, packages
could have support for this platform.

I wouldn't want to push this into options; it doesn't fit.

Others may see it differently, and I might after thinking more, but
that's how I see it now.


Home | Main Index | Thread Index | Old Index