tech-pkg archive

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

Re: rust and rust-bin confusion



On Fri, May 09, 2025 at 04:45:54AM +0000, John Klos wrote:
> When moving my current www/firefox/work directory out of the way and trying
> to build it again, suddently it wants rust-bin even though rust is
> installed:

I think you updated pkgsrc in the meantime, and the default for earm
has changed.  If you want to keep using the src version, you need to
set RUST_TYPE to src in your /etc/mk.conf.
 Thomas
--- Begin Message ---
Module Name:	pkgsrc
Committed By:	gdt
Date:		Wed May  7 14:47:42 UTC 2025

Modified Files:
	pkgsrc/lang/rust: platform.mk

Log Message:
lang/rust: Default to RUST_TYPE=bin on earm

As discussed on tech-pkg@, rust does not build on earm, even if one
has much more memory than the typical 1GB.  For earm, default to
RUST_TYPE bin, so that straightforward use of pkgsrc leads to working
programs, at the expense of our goal of providing pkgsrc rather than
pkgbin.

Test NATIVE_MACHINE_PLATFORM, so that e.g. crossbuilding for earm from
x86_64 should still build from source.

Use ?=, so that people with an explicit RUST_TYPE=src will have that
honored (and then fail, but presumably that's what they want, or they
are trying to fix rust to build without such enormous memory use).

On NetBSD 9 RPI3, 'make package' in libimagequant correctly depends on
rust-bin.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/lang/rust/platform.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/rust/platform.mk
diff -u pkgsrc/lang/rust/platform.mk:1.31 pkgsrc/lang/rust/platform.mk:1.32
--- pkgsrc/lang/rust/platform.mk:1.31	Tue Apr  8 09:31:06 2025
+++ pkgsrc/lang/rust/platform.mk	Wed May  7 14:47:42 2025
@@ -1,4 +1,4 @@
-# $NetBSD: platform.mk,v 1.31 2025/04/08 09:31:06 wiz Exp $
+# $NetBSD: platform.mk,v 1.32 2025/05/07 14:47:42 gdt Exp $
 
 # This file encodes whether a given platform has support for rust.
 
@@ -16,9 +16,12 @@ RUST_PLATFORMS+=	${rust_os}-*-${rust_arc
 .  endfor
 .endfor
 
-.if ${MACHINE_PLATFORM:MNetBSD-*-earm*} && ${OPSYS_VERSION} < 100000
-RUST_DIR?=	../../lang/rust176
+# rust does not build in the VA space available on earm.
+# \todo Consider extension to other platforms.
+.if ${NATIVE_MACHINE_PLATFORM:M*-*-earm*}
+RUST_TYPE?=	bin
 .endif
+
 RUST_DIR?=	../../lang/rust
 
 .for rust_platform in ${RUST_PLATFORMS}


--- End Message ---


Home | Main Index | Thread Index | Old Index