Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A question about compile time ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Gentobobbyuk
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2020
Posts: 142

PostPosted: Mon Jun 15, 2020 1:18 am    Post subject: A question about compile time ? Reply with quote

Hi guys i have some really low end systems that have been donated for projects we are currently doing .

The compile time on some of the older computers is killing me for example the kernels.

But i also have a machine with 128 gb of ram and very powefull processor that also runs gentoo.
#can get the newer machines to compile for us and send back to the older machine ?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7555
Location: almost Mile High in the USA

PostPosted: Mon Jun 15, 2020 2:41 am    Post subject: Reply with quote

You can use distcc to do this, or you could use a chroot or virtual machine on the faster machine.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Gentobobbyuk
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2020
Posts: 142

PostPosted: Mon Jun 15, 2020 3:09 am    Post subject: Reply with quote

Can u explaine more before i mess everything up ive taken a snapshot to practice first
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7555
Location: almost Mile High in the USA

PostPosted: Mon Jun 15, 2020 1:07 pm    Post subject: Reply with quote

Using the distcc method is built-in to portage and there's so many safeguards and warnings to prevent a bad binary to be sent back. Only things that you need to make sure is that you have the same version of gcc on the helper machine, and merge distcc on all machines. You likely will need to use crossdev to build a toolchain for the target architecture.

The chroot method/VM methods are a bit more involved because there's a risk of polluting the machines with improper binaries as you export the disk to the helper machine.

If it's just the kernel, you can build these by itself on the fast machine, you may need to use crossdev once again to build the proper instruction set. If I remember right, all that's needed after having the proper cross compiler is use "ARCH=your_target_architecture command" like "ARCH=x86 make -j5 menuconfig all" or something like that to build the kernel for another machine. Once again you need to be careful to select the proper options...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Cuong Nguyen
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jan 2018
Posts: 146

PostPosted: Tue Jun 16, 2020 2:13 am    Post subject: Re: A question about compile time ? Reply with quote

Gentobobbyuk wrote:
Hi guys i have some really low end systems that have been donated for projects we are currently doing .

The compile time on some of the older computers is killing me for example the kernels.

But i also have a machine with 128 gb of ram and very powefull processor that also runs gentoo.
#can get the newer machines to compile for us and send back to the older machine ?

Try run an gentoo install in chroot or docker to build binaries on that behemoth with 128Gb RAM and powerful CPU, then run command on your target machine "env PORTAGE_BINHOST=<https:|ssh:|ftp:|rsync:your build machine> emerge -G"
Use march=x86-64 dont use march=native in cflags.
Or copy ready made binaries from build machine to your target.
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 893

PostPosted: Tue Jun 16, 2020 9:22 am    Post subject: Reply with quote

I second Cuong Nguyen's vote: use a binpkg host in one form or another. The trouble with DISTCC is that not all the work gets exported to the fast server, and it only builds the one slow machine on which you run emerge.

Creating a binpkg host means you're doing what Gentoo is really about - tailoring your own distribution, which you can then quickly install on all the slow machines. An important factor is the type of slow machine - if they're all very similar, this will work brilliantly. If there's significant variation in hardware (say different CPU architectures or graphics) you may have to choose between building for the "lowest common denominator" system or building different versions and maintaining multiple binpkg servers.

It also depends on how long this bit of work will last? If you will be getting more slow systems, will they be the same as the existing ones, or will that bring the problem described in the preceding paragraph?
_________________
Greybeard
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 16, 2020 12:57 pm    Post subject: Reply with quote

Gentobobbyuk,

distcc is the easiest to set up. It works with cross compiling too.
The drawback is that it only covers C and C++ compiles. The configure and link steps are still run the the less capable host.
Also not all C or C++ packages can use distcc.

Distcc is well documented on the wiki.


Using a chroot to do everything for the less capable system goes from trivial on a build system where the build CPU has all the instructions that the weak system has, getting progressively more difficult as the CPUs differ as the build system cannot execute all the instructions that the weak box can.
There are several solutions to that.

I've not seen this on the Wiki.


Finally, for completeness, Its possible to set up a chroot that has QEMU-static installed so that QEMU-static emulates the target CPU in software. This is slow and should be avoided if anything else works.

This is on the Wiki too. Its mostly used where its not possible to use distcc because the work the target has to do won't fit in the targets RAM. Think Raspberry Pi and LibreOffice.
_________________
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
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 676
Location: Winnipeg, Canada

PostPosted: Thu Jun 18, 2020 5:50 pm    Post subject: Reply with quote

Code:
model name      : Intel(R) Xeon(R) CPU           L5520


Best i recall Nehalem Intel cpu's were not uefi boot capable?

also did a mod prune this thread? it appears several post replies were removed.

Edit - or the topic of the post replies was moved
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
Gentobobbyuk
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2020
Posts: 142

PostPosted: Thu Jun 18, 2020 6:43 pm    Post subject: Reply with quote

I posted in the wrong thread about raid so i removed the posts
Back to top
View user's profile Send private message
Tortue
n00b
n00b


Joined: 27 May 2005
Posts: 65
Location: Gatineau (Québec), Canada

PostPosted: Fri Jun 19, 2020 9:41 pm    Post subject: Reply with quote

Gentobobbyuk,

I do use distcc to help an old Raspberry Pi (samba file server) compile and update it's software, and it works fine. I just installed the base system on the RPi and then used distcc and crossdev on a more powerful machine to help the RPi. Actually, at first,I used two machines for crossdev, but they were too fast for the input/output of the RPi (model B 512 mb of ram, arm6j), so I sticked to only one. It reduces the compile time a lot. The only thing is that when it comes to compile a new gcc version, the RPi does it on its own and it takes a long time.

I also use distcc for another RPi. (arm7j) on the same helper machine, which means that you can use crossdev for more than one architecture.

So, if your old machines have different architectures, your can still use your powerful one for all of them.

If I may, I encourage you to use distcc and crossdev. They are not hard or complicated to set up, and they work well. Just follow the instructions on the wiki!
_________________
"La vie est un formidable scénariste"
- Le cinéaste Bertrand Tavernier, citant un ami
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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