Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Installing binary packages on another PC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Verdazil
n00b
n00b


Joined: 14 Feb 2019
Posts: 47
Location: One small country ...

PostPosted: Tue Mar 19, 2019 12:07 pm    Post subject: [solved] Installing binary packages on another PC Reply with quote

There are two computers: first - in my signature and second PC with weak Ivybrigge CPU and relative small amount of memory. Would it be correct during updates to build heavy binary packages on fast PC and install them on a slow one?
_________________
GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V


Last edited by Verdazil on Wed Mar 20, 2019 5:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6962

PostPosted: Tue Mar 19, 2019 12:12 pm    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Binary_package_guide
i think all your answers are there
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21328
Location: here

PostPosted: Tue Mar 19, 2019 12:14 pm    Post subject: Reply with quote

You should also compile package for generic x86_64 architetture (see -march and -mtune gcc options in man) because I doubt that all cflags on your Skylake cpu are compatible for Ivybrigge.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Verdazil
n00b
n00b


Joined: 14 Feb 2019
Posts: 47
Location: One small country ...

PostPosted: Tue Mar 19, 2019 12:23 pm    Post subject: Reply with quote

Yes, i use -march=ivybridge and -march=skylake respectively. This means that the packages will not be fully compatible...
Perhaps cross-compiling is a better solution?
Or temporarily set -march to generic?
I haven't been able to update chromium on a weak machine for two days...
_________________
GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6962

PostPosted: Tue Mar 19, 2019 12:34 pm    Post subject: Reply with quote

they are the same arch, cross-compilation is not need, just proper flags or strategy.

the fast computer could build the package using specific cflags from the slow one and make a binary out of it, but won't use it for itself. (look at --buildpkgonly)
or you can even ssh (if doable) to the slow host, chroot it using the fast computer and just use emerge like you would do with the slow one, if the fast computer is a superset of the slow one, even running something using the slow one cflags won't be an issue.
Back to top
View user's profile Send private message
Verdazil
n00b
n00b


Joined: 14 Feb 2019
Posts: 47
Location: One small country ...

PostPosted: Tue Mar 19, 2019 12:39 pm    Post subject: Reply with quote

krinn wrote:
the fast computer could build the package using specific cflags from the slow one and make a binary out of it, but won't use it for itself. (look at --buildpkgonly)
Yes!!! It looks like the most promising solution. I try in the evening.
_________________
GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6962

PostPosted: Tue Mar 19, 2019 1:04 pm    Post subject: Reply with quote

Verdazil wrote:
krinn wrote:
the fast computer could build the package using specific cflags from the slow one and make a binary out of it, but won't use it for itself. (look at --buildpkgonly)
Yes!!! It looks like the most promising solution. I try in the evening.

Don't get happy too fast, solutions have their own problems :)
It's doable to do that if the two hosts are similar (not speaking about their arch similarity, but their portage tree graph similarity).

You'll see, it could be a pain if they are too different, as an example ; if fasthost build package Z for slow one, package Z use packages A,B and C.
If fasthost doesn't have any use of package A, B, C and Z ; it mean to build package Z for slowhost, fasthost will need to compile A, B, C and Z (!)

Or even undoable at all: if fasthost use package B[true] only, and to build package Z, you need package B[!true], fasthost will try building package B[true] which won't be doable on its own system that must have package B built with [!true]
Back to top
View user's profile Send private message
Verdazil
n00b
n00b


Joined: 14 Feb 2019
Posts: 47
Location: One small country ...

PostPosted: Tue Mar 19, 2019 1:24 pm    Post subject: Reply with quote

krinn, of course, I will try anyway. However, considering all the above, is not cross-compiling more versatile and durable solution?
_________________
GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6962

PostPosted: Tue Mar 19, 2019 1:52 pm    Post subject: Reply with quote

the advantage of cross-compilation is taken from two points: first one is that you have a mirror of the other one, the second one is the ability to build code not native from the build host cpu.

as your fastcomputer cpu is able to produce code easy for the slowone, you endup with only getting the mirror benefit (when i speak about "mirror" i'm speaking about the buildhost (fast computer) hosting a copy of the tree of the slow one, in order to build something without affecting its own system).
something more easy to handle thu ssh/chroot or an nfs/chroot solution
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42564
Location: 56N 3W

PostPosted: Tue Mar 19, 2019 5:23 pm    Post subject: Reply with quote

Verdazil,

There are a few other options.

distcc. The weak system does the preprocess and link steps and the fast machine helps out with everything else.
Its not a siver bullet. Not everything can use distcc.
If you run out of RAM for linking, this approach won't help.

export the root filesystem of the weak machine using nfs.
Mount this nfs export on the fast machine, then chroot into it on the fast machine. Like a gentoo install.
The fast machine does all the work now.
Its horribly insecure, so you need a fast trusted network. Don't do it over wifi, that's neither secure, nor fast.
Only export the root filesystem when you need to or anyone that can see the export can mount it too.

Make a chroot on the fast machine and set it up exactly as the slow machine.
You can borrow the portage repo and distfiles from outside the chroot.
Build and install packages here. Include the FEATURE to build packages as you go.
Use the packages on the slow machine.

The last two options require that the instruction set on the slow machine is a subset of the fast machine, since the fast machine will need to execute code intended to run on the slow machine.
That's not true of distcc. Distcc builds on behalf of the slow system, it never runs any of code that it builds as a helper.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Verdazil
n00b
n00b


Joined: 14 Feb 2019
Posts: 47
Location: One small country ...

PostPosted: Wed Mar 20, 2019 5:05 pm    Post subject: Reply with quote

NeddySeagoon, thank you, but these are very complicated waraints for my simple case. Both computers were software identic and similar in hardware. Therefore, I temporarily replaced in /etc/portge/make.conf on fast PC -march=skylake --> -march=ivybridge and build the package chromium. Then I emerged the package on a slow PC and everything works fine.
_________________
GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum