* Is it necessary to download the native inputs while installing packages?
@ 2018-01-18 15:19 Fis Trivial
2018-01-18 17:36 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 14+ messages in thread
From: Fis Trivial @ 2018-01-18 15:19 UTC (permalink / raw)
To: guix-devel@gnu.org
The network connections to hydra is bad at day time from where I am, the
download speed is about 10kB/s, I can only work with guix at night.
And sometimes I use guix --fallback option(like texlive), guix will redirect to
the upstream download link. Chances are the upstream has even worse network
bandwidth, then I have to manually find a mirror of that particular upstream
and use `guix download`.
In the case of *texlive-texmf*, it serves mostly as a build dependence. To make
things even less convenient, most of the mirror site only store its ISO
package, not the tar ball used in guix package.
So, I gotta wonder, can we just download the normal inputs and propagated
inputs from hydra while installing packages? Would that break something like
the functional property of guix?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Is it necessary to download the native inputs while installing packages?
2018-01-18 15:19 Is it necessary to download the native inputs while installing packages? Fis Trivial
@ 2018-01-18 17:36 ` Tobias Geerinckx-Rice
2018-01-18 19:56 ` Leo Famulari
0 siblings, 1 reply; 14+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-18 17:36 UTC (permalink / raw)
To: ybbs.daans, guix-devel
Hullo,
There are quite a few unrelated points mixed together here. I'll try to
address all of them, but I'm not entirely sure what your main question
is. I hope to answer it by accident.
Fis Trivial wrote on 18/01/18 at 16:19:
> The network connections to hydra is bad at day time from where I am,
> the download speed is about 10kB/s, I can only work with guix at
> night. And sometimes I use guix --fallback option(like texlive), guix
> will redirect to the upstream download link.
I get your meaning, but ‘redirect’ isn't the right word to use here.
Redirection is something servers do, and that's not the case here.
When installing a package, Guix queries all known substitute servers for
a pre-built binary substitute. What ‘--fallback’ does is tell Guix to
not give up if all servers answer negatively (404), but to build the
package from source locally. For that it needs to download the source
from upstream servers, and of course the native inputs required to
perform the build. There's no way around that.
If any of the substitute servers *can* provide a binary, no
native-inputs will be downloaded at all.
Why are you adding ‘--fallback’?
> Chances are the upstream has even worse network bandwidth, then I
> have to manually find a mirror of that particular upstream and use
> `guix download`.
This is an unrelated but valid point. I've previously mused that it
should be possible to let users choose (a set of) their favourite
mirror(s), instead of always downloading sources from the first mirror
queried.
It could be as simple as adding ISO codes to each mirror URI.
> In the case of *texlive-texmf*, it serves mostly as a build
> dependence. To make things even less convenient, most of the mirror
> site only store its ISO package, not the tar ball used in guix
> package.
Oh. That's unfortunate. I'm not familiar with the Guix texlive packages,
and all the ones I happened to look at now have a direct ftp:// link.
Is upstream the one doing the — heh — redirection here? If so, it should
arguably doing a better job. We could still help matters by hard-coding
a shortlist of mirrors known to host the files we need.
> So, I gotta wonder, can we just download the normal inputs and
> propagated inputs from hydra while installing packages? Would that
> break something like the functional property of guix?
‘Installing’ is too ambiguous to answer.
- When *substituting* (installing a binary), native-inputs are not
required and should never be downloaded.
- When *building* (from source), they are.
Kind regards,
T G-R
PS: Oh. Right. Sigh... To complicate matters, texlive-texmf is a special
case that's never substituted, because doing so is thought to be worse
than just building it from source[1].
That's the reason you're downloading TexLive from upstream, but it's
*not* the reason you're pulling in TexLive to begin with and doesn't
change the native-inputs situation. I think.
[1]:
https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/nginx/hydra.gnu.org-locations.conf#n23
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Is it necessary to download the native inputs while installing packages?
2018-01-18 17:36 ` Tobias Geerinckx-Rice
@ 2018-01-18 19:56 ` Leo Famulari
2018-01-18 20:01 ` Tobias Geerinckx-Rice
2018-01-18 20:54 ` Fis Trivial
0 siblings, 2 replies; 14+ messages in thread
From: Leo Famulari @ 2018-01-18 19:56 UTC (permalink / raw)
To: guix-devel, Tobias Geerinckx-Rice, ybbs.daans
Sorry for the top-posting.
I need to clarify what --fallback does.
Guix will always build locally if the substitute servers say they lack something Guix needs.
--fallback works when the substitute servers say they have something, and then the substitution fails unexpectedly. For example, the server may become overloaded and drop the connection.
-------- Original Message --------
From: Tobias Geerinckx-Rice <me@tobias.gr>
Sent: January 18, 2018 9:36:50 AM PST
To: ybbs.daans@hotmail.com, guix-devel@gnu.org
Subject: Re: Is it necessary to download the native inputs while installing packages?
Hullo,
There are quite a few unrelated points mixed together here. I'll try to
address all of them, but I'm not entirely sure what your main question
is. I hope to answer it by accident.
Fis Trivial wrote on 18/01/18 at 16:19:
> The network connections to hydra is bad at day time from where I am,
> the download speed is about 10kB/s, I can only work with guix at
> night. And sometimes I use guix --fallback option(like texlive), guix
> will redirect to the upstream download link.
I get your meaning, but ‘redirect’ isn't the right word to use here.
Redirection is something servers do, and that's not the case here.
When installing a package, Guix queries all known substitute servers for
a pre-built binary substitute. What ‘--fallback’ does is tell Guix to
not give up if all servers answer negatively (404), but to build the
package from source locally. For that it needs to download the source
from upstream servers, and of course the native inputs required to
perform the build. There's no way around that.
If any of the substitute servers *can* provide a binary, no
native-inputs will be downloaded at all.
Why are you adding ‘--fallback’?
> Chances are the upstream has even worse network bandwidth, then I
> have to manually find a mirror of that particular upstream and use
> `guix download`.
This is an unrelated but valid point. I've previously mused that it
should be possible to let users choose (a set of) their favourite
mirror(s), instead of always downloading sources from the first mirror
queried.
It could be as simple as adding ISO codes to each mirror URI.
> In the case of *texlive-texmf*, it serves mostly as a build
> dependence. To make things even less convenient, most of the mirror
> site only store its ISO package, not the tar ball used in guix
> package.
Oh. That's unfortunate. I'm not familiar with the Guix texlive packages,
and all the ones I happened to look at now have a direct ftp:// link.
Is upstream the one doing the — heh — redirection here? If so, it should
arguably doing a better job. We could still help matters by hard-coding
a shortlist of mirrors known to host the files we need.
> So, I gotta wonder, can we just download the normal inputs and
> propagated inputs from hydra while installing packages? Would that
> break something like the functional property of guix?
‘Installing’ is too ambiguous to answer.
- When *substituting* (installing a binary), native-inputs are not
required and should never be downloaded.
- When *building* (from source), they are.
Kind regards,
T G-R
PS: Oh. Right. Sigh... To complicate matters, texlive-texmf is a special
case that's never substituted, because doing so is thought to be worse
than just building it from source[1].
That's the reason you're downloading TexLive from upstream, but it's
*not* the reason you're pulling in TexLive to begin with and doesn't
change the native-inputs situation. I think.
[1]:
https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/nginx/hydra.gnu.org-locations.conf#n23
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Is it necessary to download the native inputs while installing packages?
2018-01-18 19:56 ` Leo Famulari
@ 2018-01-18 20:01 ` Tobias Geerinckx-Rice
2018-01-18 20:54 ` Fis Trivial
1 sibling, 0 replies; 14+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-18 20:01 UTC (permalink / raw)
To: leo, guix-devel, ybbs.daans
Leo,
Leo Famulari wrote on 18/01/18 at 20:56:
> --fallback works when the substitute servers say they have something,
> and then the substitution fails unexpectedly. For example, the server
> may become overloaded and drop the connection.
You are, of course, completely right & I must have been smoking drugs.
'specially since I was thinking that's probably what's happening on an
unreliable connection.
Thanks,
T G-R
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Is it necessary to download the native inputs while installing packages?
2018-01-18 19:56 ` Leo Famulari
2018-01-18 20:01 ` Tobias Geerinckx-Rice
@ 2018-01-18 20:54 ` Fis Trivial
2018-01-19 13:24 ` Ludovic Courtès
2018-01-20 0:13 ` Leo Famulari
1 sibling, 2 replies; 14+ messages in thread
From: Fis Trivial @ 2018-01-18 20:54 UTC (permalink / raw)
To: Leo Famulari, guix-devel@gnu.org, Tobias Geerinckx-Rice
Sorry about the mess in the original question.
>
> ‘Installing’ is too ambiguous to answer.
>
> - When *substituting* (installing a binary), native-inputs are not
> required and should never be downloaded.
This answers my question in mind, thanks. :)
>
> If any of the substitute servers *can* provide a binary, no
> native-inputs will be downloaded at all.
>
> Why are you adding ‘--fallback’?
>
As you explained, the substituting process failed.
Thanks for explaining things clearly. I will try to look into the source of
guix next time.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Is it necessary to download the native inputs while installing packages?
2018-01-18 20:54 ` Fis Trivial
@ 2018-01-19 13:24 ` Ludovic Courtès
2018-01-20 0:13 ` Leo Famulari
1 sibling, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2018-01-19 13:24 UTC (permalink / raw)
To: Fis Trivial; +Cc: guix-devel@gnu.org
Fis Trivial <ybbs.daans@hotmail.com> skribis:
>> If any of the substitute servers *can* provide a binary, no
>> native-inputs will be downloaded at all.
>>
>> Why are you adding ‘--fallback’?
>>
>
> As you explained, the substituting process failed.
This particular issue should now be fixed: <https://bugs.gnu.org/30157>.
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Is it necessary to download the native inputs while installing packages?
2018-01-18 20:54 ` Fis Trivial
2018-01-19 13:24 ` Ludovic Courtès
@ 2018-01-20 0:13 ` Leo Famulari
2018-01-20 10:40 ` Prevent native-inputs references ending up in the final binary Danny Milosavljevic
1 sibling, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2018-01-20 0:13 UTC (permalink / raw)
To: Fis Trivial; +Cc: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
On Thu, Jan 18, 2018 at 08:54:32PM +0000, Fis Trivial wrote:
> Sorry about the mess in the original question.
>
> >
> > ‘Installing’ is too ambiguous to answer.
> >
> > - When *substituting* (installing a binary), native-inputs are not
> > required and should never be downloaded.
>
> This answers my question in mind, thanks. :)
Although native-inputs are typically things that are only required while
building [0], there's nothing that prevents a built package from keeping
references to native-inputs.
[0] The "native" part is related to cross-compilation.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Prevent native-inputs references ending up in the final binary
2018-01-20 0:13 ` Leo Famulari
@ 2018-01-20 10:40 ` Danny Milosavljevic
2018-01-20 15:47 ` Tobias Geerinckx-Rice
2018-01-26 0:56 ` Fis Trivial
0 siblings, 2 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2018-01-20 10:40 UTC (permalink / raw)
To: Leo Famulari, ludo; +Cc: guix-devel@gnu.org
Hi Leo,
> Although native-inputs are typically things that are only required while
> building [0], there's nothing that prevents a built package from keeping
> references to native-inputs.
We should change that in core-updates-next, if possible.
I think that native-inputs shouldn't end up in the final binary as a
reference, especially when cross-compiling
(but we don't do cross-compilation much in Guix - usually, we let
qemu-arm emulate the ARM CPU on x86_64 and just call the target tool :) ).
If there are indeed parts of the same package, one a native part and one a
runtime dependency part, I actually write the same package reference twice,
once in the inputs, once in the native-inputs, in my custom package
definitions.
In a "previous life" I did a lot of Linux cellphone development and,
there, it was kinda important that a x86_64 toolchain doesn't end
up being referenced in an ARM binary, so the habit stuck - and I
think it's important to distinguish the mold used to form a product
from an integral part of that product.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Prevent native-inputs references ending up in the final binary
2018-01-20 10:40 ` Prevent native-inputs references ending up in the final binary Danny Milosavljevic
@ 2018-01-20 15:47 ` Tobias Geerinckx-Rice
2018-01-21 22:37 ` Leo Famulari
2018-01-26 0:56 ` Fis Trivial
1 sibling, 1 reply; 14+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-20 15:47 UTC (permalink / raw)
To: dannym, leo, ludo; +Cc: guix-devel
Danny,
Danny Milosavljevic wrote on 20/01/18 at 11:40:
> We should change that in core-updates-next, if possible.
>
> I think that native-inputs shouldn't end up in the final binary as a
> reference [...]
This has been discussed before, and I agree. (I started a branch to do
so but it breaks quite a few things and it got tedious. I think I'm
ready for more now.)
Kind regards,
T G-R
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Prevent native-inputs references ending up in the final binary
2018-01-20 15:47 ` Tobias Geerinckx-Rice
@ 2018-01-21 22:37 ` Leo Famulari
2018-01-21 22:47 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2018-01-21 22:37 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]
On Sat, Jan 20, 2018 at 04:47:14PM +0100, Tobias Geerinckx-Rice wrote:
> Danny,
>
> Danny Milosavljevic wrote on 20/01/18 at 11:40:
> > We should change that in core-updates-next, if possible.
> >
> > I think that native-inputs shouldn't end up in the final binary as a
> > reference [...]
> This has been discussed before, and I agree. (I started a branch to do
> so but it breaks quite a few things and it got tedious. I think I'm
> ready for more now.)
Yeah, I think a lot of things will break.
Something to consider is that not every reference has an effect on the
built software. Sometimes the reference is a nonfunctional string that
ends up in documentation, or for error messages, or many other places.
It may be a lot of work to remove them all.
I'd rather we do it somewhere else than core-updates.
It's already very difficult to complete the core-updates cycles. We
should limit core-updates to updates of core packages, and handle big
changes to Guix itself on their own branches.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Prevent native-inputs references ending up in the final binary
2018-01-21 22:37 ` Leo Famulari
@ 2018-01-21 22:47 ` Tobias Geerinckx-Rice
2018-01-24 14:26 ` Ludovic Courtès
0 siblings, 1 reply; 14+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-21 22:47 UTC (permalink / raw)
To: leo; +Cc: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 1027 bytes --]
Leo,
Leo Famulari wrote on 21/01/18 at 23:37:
> On Sat, Jan 20, 2018 at 04:47:14PM +0100, Tobias Geerinckx-Rice wrote:
>> Danny,
>>
>> Danny Milosavljevic wrote on 20/01/18 at 11:40:
>>> We should change that in core-updates-next, if possible.
>>>
>>> I think that native-inputs shouldn't end up in the final binary as a
>>> reference [...]
>> This has been discussed before, and I agree. (I started a branch to do
>> so but it breaks quite a few things and it got tedious. I think I'm
>> ready for more now.)
[...]
> I'd rather we do it somewhere else than core-updates.
>
> It's already very difficult to complete the core-updates cycles. We
> should limit core-updates to updates of core packages, and handle big
> changes to Guix itself on their own branches.
Er, yeah. Definitely.
Unfortunate quoting on my part if it seemed like I was implying
otherwise. This is the right thing to do, but doing it on core-updates
is going to hurt rather than help anyone.
Kind regards,
T G-R
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 248 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Prevent native-inputs references ending up in the final binary
2018-01-21 22:47 ` Tobias Geerinckx-Rice
@ 2018-01-24 14:26 ` Ludovic Courtès
0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2018-01-24 14:26 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: guix-devel
Hi,
Tobias Geerinckx-Rice <me@tobias.gr> skribis:
> Leo Famulari wrote on 21/01/18 at 23:37:
>> On Sat, Jan 20, 2018 at 04:47:14PM +0100, Tobias Geerinckx-Rice wrote:
>>> Danny,
>>>
>>> Danny Milosavljevic wrote on 20/01/18 at 11:40:
>>>> We should change that in core-updates-next, if possible.
>>>>
>>>> I think that native-inputs shouldn't end up in the final binary as a
>>>> reference [...]
>>> This has been discussed before, and I agree. (I started a branch to do
>>> so but it breaks quite a few things and it got tedious. I think I'm
>>> ready for more now.)
>
> [...]
>
>> I'd rather we do it somewhere else than core-updates.
>>
>> It's already very difficult to complete the core-updates cycles. We
>> should limit core-updates to updates of core packages, and handle big
>> changes to Guix itself on their own branches.
>
> Er, yeah. Definitely.
+1
Anyway, I think it’s worth experimenting this on a branch. We’ll have
to expect lots of breakage as Leo writes, so we’ll need to refine things
progressively.
Once such a branch exist, we can get it built on berlin or hydra.
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Prevent native-inputs references ending up in the final binary
2018-01-20 10:40 ` Prevent native-inputs references ending up in the final binary Danny Milosavljevic
2018-01-20 15:47 ` Tobias Geerinckx-Rice
@ 2018-01-26 0:56 ` Fis Trivial
2018-01-26 1:05 ` Tobias Geerinckx-Rice
1 sibling, 1 reply; 14+ messages in thread
From: Fis Trivial @ 2018-01-26 0:56 UTC (permalink / raw)
To: Danny Milosavljevic, Leo Famulari, ludo@gnu.org; +Cc: guix-devel@gnu.org
On 01/20/2018 06:40 PM, Danny Milosavljevic wrote:
> Hi Leo,
>
>> Although native-inputs are typically things that are only required while
>> building [0], there's nothing that prevents a built package from keeping
>> references to native-inputs.
>
> We should change that in core-updates-next, if possible.
>
> I think that native-inputs shouldn't end up in the final binary as a
> reference, especially when cross-compiling
> (but we don't do cross-compilation much in Guix - usually, we let
> qemu-arm emulate the ARM CPU on x86_64 and just call the target tool :) ).
>
> If there are indeed parts of the same package, one a native part and one a
> runtime dependency part, I actually write the same package reference twice,
> once in the inputs, once in the native-inputs, in my custom package
> definitions.
>
> In a "previous life" I did a lot of Linux cellphone development and,
> there, it was kinda important that a x86_64 toolchain doesn't end
> up being referenced in an ARM binary, so the habit stuck - and I
> think it's important to distinguish the mold used to form a product
> from an integral part of that product.
>
I'm no expert, but can this little utility from nix help?
https://nixos.org/patchelf.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Prevent native-inputs references ending up in the final binary
2018-01-26 0:56 ` Fis Trivial
@ 2018-01-26 1:05 ` Tobias Geerinckx-Rice
0 siblings, 0 replies; 14+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-01-26 1:05 UTC (permalink / raw)
To: Fis Trivial, Danny Milosavljevic, Leo Famulari, ludo@gnu.org
Cc: guix-devel@gnu.org
Hullo,
On Fri, 2018-01-26 at 00:56 +0000, Fis Trivial wrote:
> On 01/20/2018 06:40 PM, Danny Milosavljevic wrote:
> > I think that native-inputs shouldn't end up in the final binary as
> > a
> > reference, especially when cross-compiling
> > (but we don't do cross-compilation much in Guix - usually, we let
> > qemu-arm emulate the ARM CPU on x86_64 and just call the target
> > tool :) ).
> >
> > If there are indeed parts of the same package, one a native part
> > and one a
> > runtime dependency part, I actually write the same package
> > reference twice,
> > once in the inputs, once in the native-inputs, in my custom package
> > definitions.
> >
> > In a "previous life" I did a lot of Linux cellphone development
> > and,
> > there, it was kinda important that a x86_64 toolchain doesn't end
> > up being referenced in an ARM binary, so the habit stuck - and I
> > think it's important to distinguish the mold used to form a product
> > from an integral part of that product.
> >
>
> I'm no expert, but can this little utility from nix help?
> https://nixos.org/patchelf.html
In what way?
Patchelf re-writes library and/or loader paths in compiled binaries.
It's cool, but I don't immediately see the connexion...
Kind regards,
T G-R
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-01-26 1:05 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-18 15:19 Is it necessary to download the native inputs while installing packages? Fis Trivial
2018-01-18 17:36 ` Tobias Geerinckx-Rice
2018-01-18 19:56 ` Leo Famulari
2018-01-18 20:01 ` Tobias Geerinckx-Rice
2018-01-18 20:54 ` Fis Trivial
2018-01-19 13:24 ` Ludovic Courtès
2018-01-20 0:13 ` Leo Famulari
2018-01-20 10:40 ` Prevent native-inputs references ending up in the final binary Danny Milosavljevic
2018-01-20 15:47 ` Tobias Geerinckx-Rice
2018-01-21 22:37 ` Leo Famulari
2018-01-21 22:47 ` Tobias Geerinckx-Rice
2018-01-24 14:26 ` Ludovic Courtès
2018-01-26 0:56 ` Fis Trivial
2018-01-26 1:05 ` Tobias Geerinckx-Rice
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).