Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Distcc on non gentoo computers [SOLVED]
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
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Thu Jul 21, 2016 5:39 pm    Post subject: Distcc on non gentoo computers [SOLVED] Reply with quote

Hello all,

What I'm currently having trouble is I have 2 pcs that will help my 1 netbook compile things trough distcc but I dont know if it will work properly as theyre running different distros one of them is slackware 14.2 and the other arch linux.If I have to install another distro I will without much problems.If you guys need any other information just ask me.


Last edited by nerd811 on Thu Jul 21, 2016 7:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Thu Jul 21, 2016 5:51 pm    Post subject: Reply with quote

Biggest trouble is that the versions of gcc, binutils need to match on both machines. I suppose with Gentoo with the slotted gcc's it will help...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jul 21, 2016 5:52 pm    Post subject: Reply with quote

nerd811,

Welcome to Gentoo.

The different distros for the helper(s) don't matter.
Follow the individual distros guide(s) to install and start the daemon on the helpers.

Its essential that the helpers and the client have identical versions of of gcc available.
_________________
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
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Thu Jul 21, 2016 6:19 pm    Post subject: Reply with quote

Hum yes it seems that it will be a pain to change the gcc version on the machines so they will match each other.The gcc version on slackware is 5.3 and on arc 6.1.I think I might end up doing a gentoo install on all of them installing from the most powerful machine and the lastly on my netbook unless you guys have any livecd to reccomend me that would be able to run distcc.(I plan on installing gentoo on all machines anyway now but being able to have them share the burden would be much faster so I'd be thankful if there was a livecd that is up to date to do this).Also thanks for the help so far.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jul 21, 2016 6:37 pm    Post subject: Reply with quote

nerd811,

If one of the helpers can execute code that will eventually run on the netbook, you can build Gentoo for the netbook in a chroot, then install the binary packages on the netbook.
It not quite like distcc, where the helpers should never execute the packages that they build but its often good enough.
You may find that you need to build a few packages on the netbook to get the best possible performance - multimedia packages being an example.

Similarly, the netbook root filesystem can be exported to a build host ... you chroot into it and avoid the need to install from binary packages.
The build constraint about the build host running code intended for the target still applies.

Either way, you end up doing
Code:
mkdir /home/nerd811/netbook
or whatever, then installing for the netbook into /home/nerd811/netbook.
As you already have Linux installed, no live distro is required. Nothing from the boot media goes into a Gentoo install.
_________________
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
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Thu Jul 21, 2016 6:45 pm    Post subject: Reply with quote

NeddySeagoon,

So what I could do is copy my / filesystem entirely to my external hdd and then chroot into it (and set the -march and other flags not to something like native but especifically for the netbook)compile everything, and then just copy it all back into the netbook?

You've been more helpful than some people on other distros forums so far thanks a lot.

EDIT: I've been thinking about maybe running a virtual machine on the helpers and have it running gentoo to run distcc but it doesnt seem like much of a efficient idea.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Thu Jul 21, 2016 7:23 pm    Post subject: Reply with quote

Yes, if you have root access to a machine, even if it's not Gentoo, you can still build a Gentoo install with it in a subdirectory chroot, and build there. Then copy the whole thing to the target machine. Do be careful, and not recommended if it's your first time, as it's very easy to inadvertently screw up a machine when you're using root access :)

I do have a VM running 32-bit Gentoo on a 64-bit Gentoo mostly due to not wanting to convert, but wanted to upgrade the physical machine. I make it run distcc for 32-bit machines, but find that it's considerably slower than a real machine and only use it if the machine is significantly slower (like a sub 1GHz machine). YMMV. The 64-bit native system can also do the 32-bit compile but I've found that sometimes clients don't submit the correct versions through distcc and best to just point a 32 bit machine to another 32 bit machine.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Thu Jul 21, 2016 7:27 pm    Post subject: Reply with quote

Ok so what I will do is compile it in a chroot on my external HDD and then copy it all over to my netbook's HDD.
For now I will leave the post as [SOLVED]
If I run into any trouble I'll see if It's more fitted for a new post or this one.

Thanks a lot to the both of you.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jul 21, 2016 7:28 pm    Post subject: Reply with quote

nerd811,

Yes that works too. USB2 HDD are slow as there is no DMA for USB Storage.
USB3 fixes that, if its USB3 all the way.

Run gcc on the netbook and ask it what -march=native means
Repeat on the build box.
Take care not to set anything that the build box does not support. Eventually, you will get an Illegal Instruction Exception.
Likewise with CPU_FLAGS_X86= ... there is a script to parse the settings out of /proc/cpuinfo.

Saying don't set anything that the build box does not support is a bit of a blunt instrument. If the build box will only ever build, its only the packages needing for building that you care about.
There are a few strange packages (perl for one) that build something, then executes it as a part of the build process, so things like that could still do wrong.

Setting CFLAGS only gives gcc permission to do things, it may still choose not to.
_________________
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
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Thu Jul 21, 2016 7:31 pm    Post subject: Reply with quote

Sorry for posting on a already marked as "[SOLVED]" post but yes the build host has all the flags that will be used in the netbook and it's a usb3 device but unfortunately to copy it over to the netbook will be a bit slow since the netbook is ubs2 only.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Thu Jul 21, 2016 9:17 pm    Post subject: Reply with quote

I have a real weak net-top class PC, one of those that consume 6 W max. I use NFS chroot to keep it updated.
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 581

PostPosted: Fri Jul 29, 2016 6:49 am    Post subject: Reply with quote

Quote:
I have a real weak net-top class PC, one of those that consume 6 W max. I use NFS chroot to keep it updated.


I used to do the same... However i figured a rsync to a usb drive is much faster.
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