tech-pkg archive

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

Re: HEADS UP: pkgsrc-2025Q2 branch calendar



> +tech-pkg
> 
> OK, go ahead.
> 
>> Am 16.06.2025 um 21:25 schrieb Havard Eidnes <he%uninett.no@localhost>:
>> 
>> 
>>> 
>>> both work and leisure has eaten all my time lately, and I have
>>> therefore not yet committed rust 1.86.0 to main pkgsrc.
>>> 
>>> So I thought that I should re-fresh the permission to do so,
>>> hereby done.
>> 
>> Getting ready to actually do this.  Still OK go-ahead?
>> 
>> Regards,
>> 
>> - Håvard

Rust 1.86.0 fails to build on macOS (aka Darwin):


dyld[99799]: Library not loaded: @rpath/librustc_driver-68a89aef339ea306.dylib
  Referenced from: <4875FDC0-BEEA-38F9-83CB-F1DF3C2D82B1> /dist/work/lang/rust/work/rustc-1.86.0-src/build/aarch64-apple-darwin/stage1/bin/rustc
  Reason: tried: '/dist/pkg/lib/librustc_driver-68a89aef339ea306.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/dist/pkg/lib/librustc_driver-68a89aef339ea306.dylib' (no such file), '/dist/pkg/lib/librustc_driver-68a89aef339ea306.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/dist/pkg/lib/librustc_driver-68a89aef339ea306.dylib' (no such file)
Command "/dist/work/lang/rust/work/rustc-1.86.0-src/build/aarch64-apple-darwin/stage1/bin/rustc" "--target" "aarch64-apple-darwin" "--print=deployment-target" (failure_mode=Exit) has failed. Rerun with -v to see more details.


I tried


diff -u -r1.336 Makefile
--- Makefile 16 Jun 2025 21:11:58 -0000 1.336
+++ Makefile 17 Jun 2025 07:49:11 -0000
@@ -42,7 +42,6 @@
 CONFIGURE_ARGS+= --release-channel=stable
 CONFIGURE_ARGS+= --local-rust-root=${RUST_BOOTSTRAP_PATH}
 CONFIGURE_ARGS+= --enable-extended # Build and install cargo too.
-CONFIGURE_ARGS+= --enable-rpath
 CONFIGURE_ARGS+= --disable-codegen-tests
 CONFIGURE_ARGS+= --disable-compiler-docs
 CONFIGURE_ARGS+= --disable-llvm-static-stdcpp
@@ -51,6 +50,13 @@
 # Ref. issue #130708 & backport of pull-request 130110
 CONFIGURE_ARGS+= --set dist.vendor=false
  +.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "Darwin"
+CONFIGURE_ARGS+= --disable-rpath
+.else
+CONFIGURE_ARGS+= --enable-rpath
+.endif
+
 REPLACE_BASH+= library/portable-simd/subtree-sync.sh
   # Include (optional) settings to cross-build rust
@@ -68,6 +74,9 @@
 # which are built by our upstream and uses $ORIGIN/../lib in RPATH.
 MAKE_ENV+= LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
 PKGSRC_MAKE_ENV+= LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
+# For Darwin
+MAKE_ENV+= DYLD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
+PKGSRC_MAKE_ENV+= DYLD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
   # This should allow us to perform "offline" builds (so cargo doesn't fetch
 # dependencies during the build stage) but this isn't hooked up yet.


and then it stops on:


error[E0463]: can't find crate for `std`
  |
  = note: the `aarch64-apple-darwin` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-apple-darwin`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `thiserror-impl` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...


Has anyone got any further?

Kind regards,
Adam


Home | Main Index | Thread Index | Old Index