From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 12 17:21:01 2022 Received: (at 54335) by debbugs.gnu.org; 12 Mar 2022 22:21:01 +0000 Received: from localhost ([127.0.0.1]:41033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTA6e-0006wT-W1 for submit@debbugs.gnu.org; Sat, 12 Mar 2022 17:21:01 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:48630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTA6c-0006wK-U2 for 54335@debbugs.gnu.org; Sat, 12 Mar 2022 17:20:59 -0500 Received: from [172.20.10.5] ([188.189.206.172]) by michel.telenet-ops.be with bizsmtp id 5aLw270083jiMiL06aLwoe; Sat, 12 Mar 2022 23:20:57 +0100 Message-ID: Subject: Re: [bug#54335] [PATCH 14/14] gnu: Add nebula. From: Maxime Devos To: Dominic Martinez Date: Sat, 12 Mar 2022 23:20:56 +0100 In-Reply-To: <8735joryt9.fsf@dominicm.dev> References: <20220311031849.12681-1-dom@dominicm.dev> <20220311034741.14377-1-dom@dominicm.dev> <20220311034741.14377-5-dom@dominicm.dev> <676ab07b73ee6c939bf1096eb8c251cedbce7220.camel@telenet.be> <8735joryt9.fsf@dominicm.dev> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-iBiXT2dya2M3jFs05wJ1" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1647123657; bh=ldhgvFHVWhh3IBZY/5R8rRk9aHbx/+xZiA/C7fRDYVU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=c3RwHwqb76/Zg5MjdqSgRLXK7+TrojzUMgw8IN+xP8sfskF5K+/TF5WlYF+REngyO ly92oU5/42pgqkSnBTLLCmfy85DkiuDs9xNy4btgDMa6WXEmWYxbGvbDT5NjX02rlw fsDeq19dcKl09Oh9pdqnmFc98B0NqlE1hFYzluvt0XfWdJdwz7PMUI3TNTN/eKOf8r SOQcdDQaJLzRPE1gC86Gq2eGb3ireeW5kCoe8sH+TYvgxg6FCKlt+GOCxf8mv9LEji gcKo52PfA94UAfKKqXIiTvWmKC5C46iP9jvtmciVmxbUoBvpwp1abbx/tZ4s1MZyTA 4DtULJeqe3Jmg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54335 Cc: 54335@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-iBiXT2dya2M3jFs05wJ1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dominic Martinez schreef op vr 11-03-2022 om 15:53 [-0500]: > Maxime Devos writes: >=20 > > I doubt that all of these are compile-time tools.=C2=A0 At least most= =20 > > of > > them are probably inputs.=C2=A0 (The distinction is important for=20 > > cross- > > compilation.) >=20 > I think I'm confused on how to approach this because Go produces=20 > statically linked binaries. A lot of other Go packages also seem=20 > to use native-inputs. How does this interact with=20 > cross-compilation? All the inputs are used as source libraries=20 > here so I'm not sure how to tell if a runtime input is needed. Static linking is not relevant to inputs/native-inputs -- Guix inputs don't have a build-time/runtime distinction (*), instead they have a the-architecture-it-is-being-built-on/the-architecture-it-is-built-for distinction. 'inputs' =3D compiled for --target, 'native-inputs' =3D compiled for --system. (*) ignoring complications introduced by propagation. More concretely, consider the following case: * a program A depends on the Go library B * the Go library B depends on the C library libfoo (using whatever is Go's equivalent of 'dlopen') * to avoid things like LD_LIBRARY_PATH, the package definition in Guix replaces 'libfoo.so' by '/gnu/store/.../libfoo.so'. * the program A is being cross-compiled. To make sure that the cross-compiled A ends up using the libfoo.so compiled for --target instead of --system, B has to be in 'inputs' instead of 'native-inputs'. This also holds when no .so libraries are used, e.g. if B invokes some kind of binary with Go's equivalent of 'posix_spawn' and Guix hardcodes the binary location instead of relying on $PATH. I haven't tried this for Go packages in particular, but this is how things work for, say, C and Guile packages. Greetings, Maxime. --=-iBiXT2dya2M3jFs05wJ1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYi0cyBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7t6gAQC5+RJwO0ziFVCUuYQkmYCb5k2W ThrogTm0tODSWgeVfAEAwvk8X4zv9WnrcEXlndq6zd4RvYDzz668O3kpoCVP3Qc= =DF5/ -----END PGP SIGNATURE----- --=-iBiXT2dya2M3jFs05wJ1--