From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 471C115817D for ; Sat, 15 Jun 2024 21:56:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 540812BC01D; Sat, 15 Jun 2024 21:56:06 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A8902BC013 for ; Sat, 15 Jun 2024 21:56:06 +0000 (UTC) Date: Sat, 15 Jun 2024 17:56:02 -0400 From: Ionen Wolkens To: gentoo-dev@lists.gentoo.org Cc: James Le Cuirot Subject: Re: [gentoo-dev] [PATCH] cargo.eclass: Add cargo_target_dir helper function Message-ID: Mail-Followup-To: gentoo-dev@lists.gentoo.org, James Le Cuirot References: <20240613150530.24679-1-chewi@gentoo.org> <3596ff34-6a36-41e3-944d-ea11c1bfe737@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZekV9Hd92IcJp9Xs" Content-Disposition: inline In-Reply-To: <3596ff34-6a36-41e3-944d-ea11c1bfe737@gentoo.org> X-Archives-Salt: b23a3870-9729-498d-b004-1bd925eaee7c X-Archives-Hash: c62f5ca87d3803935ce2033e0f9137f8 --ZekV9Hd92IcJp9Xs Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 15, 2024 at 08:14:34PM +0200, Florian Schmaus wrote: > On 13/06/2024 17.03, James Le Cuirot wrote: > > Several Cargo-based ebuilds cannot use cargo_src_install for various > > reasons and manually install binaries from within the target directory > > instead. It is common to see `target/$(usex debug debug release)`, but > > this lacks the target ABI when cross-compiling, so provide a helper > > function. >=20 > Glad that someone is working on better cross-compilation support for=20 > rust. :) >=20 > That said, many rust ebuilds generate shell completions by invoking the= =20 > just compiled binary in src_install(). This does not work out of the box= =20 > when cross-compiling. >=20 > Is there anything we can or should do about it (besides binfmt_misc)?=20 > For example, asking the according projects to implement a mechanism to=20 > extract the completions files from the binary without running it, or=20 > have the build system generate the completion files as result of the buil= d? All I can think of without changing entirely how they're generated is: 1. (worst) either make a 2nd build using CBUILD (yeah no), or BDEPEND on same-version self with a USE only when cross compiling 2. (lazy) skip completions w/ ewarn if tc-is-cross-compiler, just so it at least won't break cross over completion files that the user may not even care much about 3. generate them yourself with each releases and ship in a tarball, works out for users but extra burden for maintainer over little 4. ask upstream to provide proper release tarballs if not already and include pre-generated completions/docs/etc... so it's otherwise only a problem with arbitrary git checkouts (3+4 may possibly be more complicated if cargo features / USE change cli options and thus completion files) For one of my ebuilds I went with better-than-nothing #2. --=20 ionen --ZekV9Hd92IcJp9Xs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmZuDfIACgkQskQGsLCs QzTc9Qf9FitG4Vsi+I57anG6f2ySvqk5kmjDg9Z/1VqE0GPaBw7/nbrnftPtbwbw 5YlTM4SVxKB4+x7SnK1j4mEuG/+P1/RboFX5t4cqLkJ8g5UfcQqTTwyJD28/Bdbh pKiYlo8gcX0YF3PK0eXGpZ7BT1W+iIQZzKndXQq59sw+nIPGUsJdfzQT7DQINstp 8ky79qacjU/Qv08kKVBONuP7FH6TuhtcFUkPjcGJyM+5hlYBtG8KCaWjsCo9gHVo TjltDyKHv4TCYgXnLXWZyrUeKl4Z1nAngBWE7zTa2ciIMiV5fC/0aqZG0T99g/iX ZlsYVOBLwSYzEss+sSiFbaCxfz77VQ== =+Hwq -----END PGP SIGNATURE----- --ZekV9Hd92IcJp9Xs--