pkgsrc-Changes archive

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

Re: CVS commit: pkgsrc/lang/rust



On Thu, 2026-01-22 at 15:38 +0900, Ryo ONODERA wrote:
> Hi,
> 
> "David H. Gutteridge" <david%gutteridge.ca@localhost> writes:
> 
> > > Module Name:    pkgsrc
> > > Committed By:   ryoon
> > > Date:           Sun Jan 18 00:42:57 UTC 2026
> > > 
> > > Modified Files:
> > >         pkgsrc/lang/rust: options.mk
> > > 
> > > Log Message:
> > > lang/rust: Fix build under NetBSD 9
> > > 
> > > 
> > > To generate a diff of this commit:
> > > cvs rdiff -u -r1.50 -r1.51 pkgsrc/lang/rust/options.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/options.mk
> > > diff -u pkgsrc/lang/rust/options.mk:1.50
> > > pkgsrc/lang/rust/options.mk:1.51
> > > --- pkgsrc/lang/rust/options.mk:1.50    Tue Jan 13 20:48:23 2026
> > > +++ pkgsrc/lang/rust/options.mk Sun Jan 18 00:42:57 2026
> > > @@ -1,4 +1,4 @@
> > > -# $NetBSD: options.mk,v 1.50 2026/01/13 20:48:23 wiz Exp $
> > > +# $NetBSD: options.mk,v 1.51 2026/01/18 00:42:57 ryoon Exp $
> > >  
> > >  PKG_OPTIONS_VAR=       PKG_OPTIONS.rust
> > >  PKG_SUPPORTED_OPTIONS+=        rust-cargo-static rust-docs
> > > @@ -87,6 +87,10 @@ CONFIGURE_ARGS+=     --enable-cargo-native-s
> > >  BUILDLINK_API_DEPENDS.nghttp2+= nghttp2>=1.41.0
> > >  BUILDLINK_API_DEPENDS.curl+=   curl>=7.67.0
> > >  .include "../../www/curl/buildlink3.mk"
> > > +BUILDLINK_API_DEPENDS.openssl= openssl>=3
> > > +RUSTFLAGS+=     -C link-arg=-L${BUILDLINK_PREFIX.openssl}/lib
> > > +RUSTFLAGS+=     -C link-
> > > arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib
> > > +MAKE_ENV+=     RUSTFLAGS=${RUSTFLAGS:Q}
> > >  .include "../../security/openssl/buildlink3.mk"
> > >  .endif
> > > 
> > 
> > Hi,
> > 
> > I've fixed this differently (more generally) in www/curl itself. I
> > don't
> > think this fragment is needed anymore in rust and would like to
> > remove
> > it. I've tested builds of Rust 1.91.1 on NetBSD 9.4_STABLE both in a
> > sandboxed pbulk environment and just with "make package", and both
> > (now)
> > succeeded without this. Please let me know if you have any concerns.
> 
> I confiormed BUILDLINK_API_DEPENDS.openssl is included
> in www/curl/buildlink3.mk.
> I believe that removing BUILDLINK_API_DEPENDS.openssl from
> lang/rust/Makefile safely.
> Please remove it.
> 
> In my case, options.mk has additional RUSTFLAGS to link the correct
> libraries
> from pkgsrc OpenSSL.
> If your www/curl change ensures the effect of RUSTFLAGS too.
> Is there any evidence and explanation for successful build under
> NetBSD/i386 9?

I didn't test with i386, only with amd64 on 9. I don't follow offhand
why one arch would differ from another in this respect, or why these
flags wouldn't have already been required for other platforms that use
pkgsrc's version of OpenSSL already (e.g., I believe SmartOS ships
with base OpenSSL but pkgsrc's is preferred in jperkin@'s builds).
(Having looked a bit at the Rust build system in the past, I confess
I found it difficult to follow.) If it's necessary (and contextual),
we should add a comment explaining why, as rust is already
overcomplicated.

I haven't removed BUILDLINK_API_DEPENDS.openssl yet, as I don't want
to trigger unnecessary rebuilds of rust, if further changes here could
still happen. I don't have a viable i386 build environment myself, at
the moment.

Regards,

Dave



Home | Main Index | Thread Index | Old Index