From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: rust (build system) deficits Date: Mon, 9 Mar 2020 13:17:48 +0200 Message-ID: <20200309111748.GJ1423@E5400> References: <4F4B169B-8A25-440C-8A29-DC39DC94814F@asu.edu> <192815e6-7d83-2ef2-1f68-4ae3e0cce04e@crazy-compilers.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="C7PTD44AewjTsiSV" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46939) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBGQS-000506-1J for guix-devel@gnu.org; Mon, 09 Mar 2020 07:18:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBGQO-00006H-SY for guix-devel@gnu.org; Mon, 09 Mar 2020 07:18:21 -0400 Received: from flashner.co.il ([178.62.234.194]:36660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jBGQO-00005Z-Ma for guix-devel@gnu.org; Mon, 09 Mar 2020 07:18:20 -0400 Content-Disposition: inline In-Reply-To: <192815e6-7d83-2ef2-1f68-4ae3e0cce04e@crazy-compilers.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: Guix-devel --C7PTD44AewjTsiSV Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 09, 2020 at 10:26:01AM +0100, Hartmut Goebel wrote: > Am 08.03.20 um 21:10 schrieb John Soo: > > Hmm. Can you elaborate more on =E2=80=9Cnot able to build non-trivial r= ust applications=E2=80=9D? >=20 > I'm working on packaging sequoia-openpgp.org. >=20 > This requires nettle-sys, a FFI to nettle. nettly-sys "optionally" > requires "nettle-src". I added a phase to "nettle-sys" to remove the > "optional" dependency. nettle-sys also requires bindgen. As I assume you saw, there is nothing "optional" when using the cargo-build-system. For nettle-sys and nettle-src I suggest looking at rust-openssl-sys-no-vendor.patch which I modified from Debian. It takes care of pretending openssl-sys also provides openssl-src. > A second dependancy is "sequoia-openpgp", which requires rhe lalrpop > parser generator for building. >=20 > Now when building `sequioa-sqv`, I need to add all these dependencies aga= in: >=20 > - nettle-src, since it is "optional" for nettle-sys - and the phase was > not executed. > - bindgen, since it is required to build nettle-sys > - lalrpop, since it is required for building sequoia-openpgp >=20 > > Patching a library Cargo.toml seems like an excellent job for source pa= tches or snippets. >=20 > Quite some packages change Cargo.toml in a phase, e.g. rust-openssl-0.7. > Thus I assumed, this is the way to go. That could probably move to a snippet, or even into the cargo-build-system. IIRC there are only 3 patterns like that which appear multiple times, and they're only relevant when building that actual crate, not when it's "just a dependency". --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --C7PTD44AewjTsiSV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl5mJdkACgkQQarn3Mo9 g1FxGg/8DN5b+fNd1UYG0L2ZlNT3q8HkJIfUyHj0A3VQ5dHDt8MwXN0PP7Gvo7M1 N7Fz2PKijeOKNHKmmuO2oYQYQZKBizkdMPZiBiks22EHTmPUUIHVM/3Z90kqHmUz r31d2ibxBhekDo8jpsZWLSpIUezXDNjsxy2bU8JzCJut63n24/0cxaOEKpL5KVwc eGjAhDUxJpU91Tnjhin39vDvNh+BlZ34clsBARY41ZF7EtUUrqd6qtTIzHqqVOGO WnO5R/z0HNo0tF8wm56MVYOb35kmsztFiRdTti4vQBXXY5GrEyyePtQM9JkaUE8r Q9jxwSjRYCxMwUwQjIax7pw5POxlilZrZ2px/FG6l/X9IFV1yVydPzv97jxGfHSO wAg8k5JUOuUHY63hUaAnNQOZIM+R+Xkmi0jdIQMxHGqrR7dPCzHYrto8KuyJR4wg S4jirVwrdJ8YDv6uAWMg/Oclk/TIfUY+6TvNITRnaY1rX7+fyKJU1+YTwxKqSzKf pCv+dbScg5GsFMLYSAeDMbLRhSOeb3tJ5ETQ0w6y2LFYmjkORlZV97t8SqHLVtjo SB/+JhlauMEYdH2GrEcMJSAv+eU8i2DGhZiZh4oLFmcslUA9sbeSu/hwRhNQta1t D1W67pHiRpWkwJLdTrab6zoH2yrLRCRGvgZAZh15sCr3qEb7m7E= =I8/S -----END PGP SIGNATURE----- --C7PTD44AewjTsiSV--