pkgsrc-Bugs archive

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

Re: pkg/58506: lang/rust-1.79 build fails due to APIs removed in curl-8.8



The following reply was made to PR pkg/58506; it has been noted by GNATS.

From: Phil Krylov <phil+netbsd%krylov.eu@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Tobias Nygren <tnn%NetBSD.org@localhost>
Subject: Re: pkg/58506: lang/rust-1.79 build fails due to APIs removed in
 curl-8.8
Date: Tue, 30 Jul 2024 19:36:28 +0200

 On 2024-07-29 23:00, Tobias Nygren wrote:
 >  Is your curl package built with curl's libssh2 option enabled?
 >  It's a non-default option. If so, that would explain the problem.
 >  rust will need to do the pre-configure trick to unbuildlink only the
 >  libssh2 headers and possibly .pc file.
 
 So, I have first tried this:
 
 
 diff -p -u -r1.312 Makefile
 --- lang/rust/Makefile	15 Jul 2024 03:32:23 -0000	1.312
 +++ lang/rust/Makefile	30 Jul 2024 14:01:52 -0000
 @@ -67,7 +67,7 @@ MAKE_ENV+=		CARGO_BUILD_JOBS=${_MAKE_JOB
 
   # Rust builds some bundled components with strict version requirements, 
 ensure
   # that any conflicting packages pulled in via dependencies are not 
 buildlinked.
 -BUILDLINK_FILES_CMD.libssh2=	${TRUE}
 +#BUILDLINK_FILES_CMD.libssh2=	${TRUE}
   BUILDLINK_FILES_CMD.xz=		${TRUE}
   MAKE_ENV+=			LZMA_API_STATIC=1
 
 @@ -82,6 +82,9 @@ MAKE_ENV.SunOS+=	AR=gar
   # Annoyingly, this makes the powerpc build succeed...
   #MAKE_ENV+=		RUSTC_LOG=rustc_metadata
 
 +pre-configure:
 +	${RM} -rf ${BUILDLINK_DIR}/include/libssh2* 
 ${BUILDLINK_DIR}/lib/libssh2*
 +
   UNLIMIT_RESOURCES+=	cputime stacksize datasize virtualsize
 
   TEST_TARGET=	check
 
 
 It seemingly did the trick, but kept -lssh2 in libcurl.pc. It is not 
 immediately evident if it works properly. So I have made another 
 version, which I consider much more robust although a bit wordy:
 
 
 Index: lang/rust/Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/lang/rust/Makefile,v
 retrieving revision 1.312
 diff -p -u -r1.312 Makefile
 --- lang/rust/Makefile	15 Jul 2024 03:32:23 -0000	1.312
 +++ lang/rust/Makefile	30 Jul 2024 14:54:51 -0000
 @@ -67,6 +67,7 @@ MAKE_ENV+=		CARGO_BUILD_JOBS=${_MAKE_JOB
 
   # Rust builds some bundled components with strict version requirements, 
 ensure
   # that any conflicting packages pulled in via dependencies are not 
 buildlinked.
 +# See also pre-configure below.
   BUILDLINK_FILES_CMD.libssh2=	${TRUE}
   BUILDLINK_FILES_CMD.xz=		${TRUE}
   MAKE_ENV+=			LZMA_API_STATIC=1
 @@ -476,6 +477,16 @@ post-extract:
   	${LN} -s gcc-wrap ar-wrap
   .endif
 
 +# Don't contaminate the build with curl's optional libssh2 dependency
 +pre-configure:
 +	cd ${BUILDLINK_DIR}/lib/pkgconfig && \
 +	if grep -q libssh2 libcurl.pc; then \
 +		${SED}	-e '/^Requires.private:/s/,libssh2\>//' \
 +			-e '/^Libs.private:/ -lssh2\>//g' \
 +			< libcurl.pc > libcurl.pc.new && \
 +		${MV} -f libcurl.pc.new libcurl.pc; \
 +	fi
 +
   .if ${OPSYS} == "FreeBSD"
   MAKE_ENV+=		OPENSSL_DIR=${SSLBASE}
   .endif
 
 
 -- Ph.
 


Home | Main Index | Thread Index | Old Index