# emerging apps on a different system...

## botulism

I wonder if someone could point me in the direction of how to set up my desktop, on which I'm running gentoo 1.4 with kernel 2.6.0-test9-mmc, so that I can emerge packages for use on my 233mhz pentium II laptop which is running the gs-sources kernel. The poor thing is dying trying to emerge gnome libraries and so forth. it has been compiling nonstop for 18 hours now. My desktop machine is much faster....

Thanks!

----------

## dizzey

i dont know the best way to do wath you want. but you should be able to do an ugly hack.

if you share the " / " filesystem over nfs you should be able to mount it from your desktop

then you should be able to chroot in to your laptop. and everything that you merge from the chrooted enverioment should be correct set up for your laptop.

im a bit unsure about the /proc filesystem you migth have to mount that on your desktop

mount laptop:/ /mnt/build

and maybe "mount -o bind /proc /mnt/build/proc"

then just chroot like you did on the ordinary install

there is probobly a better solution 

distcc should work pretty well otherwise

----------

## molander

I had the same problem a while back and used distcc to speed up the process. Its very easy to use and works well. Just make sure you are using the same versions of gcc and glibc on both machines. On your slow box do not list local host under DISTCC_HOSTS and list your fast machine(s) twice each. Then add the make option -j3 (or 5 if you have two faster computers.)  

Make will decide if build processes can be mulitasked and those that can will get shipped off to another box over the network. Not all packages will take advantage of this but many big ones do. This is still not as fast as building on your faster machine but does make a difference. google distcc and you can find an easy howto.

----------

## Cossins

 *molander wrote:*   

> google distcc and you can find an easy howto.

 

There is a specific Gentoo distcc guide: Gentoo Distcc Documentation

- Simon[/url]

----------

## botulism

i got distcc working. not sure how much faster it is. in case anyone is interested there are a couple problems i ran into using the gentoo distcc how-to:

the how-to says:

Note: Set DISTCC_DIR=${PORTAGE_TMPDIR}/portage/.distcc near the end of the file (last line is okay).

But putting this in the file will cause a syntax error. I changed this to:

DISTCC_DIR="${PORTAGE_TMPDIR}/portage/.distcc" 

Also, when I first tried using distcc, I received the following error on my desktop computer:

ERROR: can't use TMPDIR "/var/tmp/portage/distcc-2.11.2/temp": Permission denied

I fixed this by changing the permissions on that directory. I expect others might run into the same problem...

Anyway, thanks for the suggestion, seems to be working...

----------

## doughenry

a good way to solve this problem is to share your portage tree and do your compiling on your fastest machine (using distcc will help even more).  On the desktop machine export /usr/portage via nfs.  On the laptop mount that share to /usr/portage.  Now both machines share the portage tree and you only need to 'emerge sync' on one of them.  If you emerge using the -b option a binary package will be built in /usr/portage/packages.  Now if you go to any other computer and emerge using the -k option it will install using the package instead of compiling.  Basically you build stuff once and install it on everything else.  One important note is that you should come up with a common set of USE flags so that the dependencies are the same on both computers.  Also don't use something like -march=pentium4 in your make.conf because that will cause the packages to not work on your athlon.  I would suggest -march=i686, its a nice basic optimization that will work very well on pentiums and athlons alike.

----------

## nahpets

This is what I do:

Change your CFLAGS in /etc/make.conf to "i686" or "pentium2" and use the -B flag when you emerge.  This option builds a binary package and puts it in "/usr/portage/packages".  Copy the package over from the fast machine to the slow one and use the -K option to emerge.

Don't forget to change the CFLAGS back when you're done.

----------

## botulism

I'm running 2.6.0-test9 on the desktop, 2.4.23 on the laptop. Some code won't compile at all on the desktop, because of the kernel version. Wouldn't I have to be running the same version of the kernel in order for this strategy to work?

----------

## nahpets

You have to have the same version of glibc on both machines, but I'm not sure if you need the same kernel.  Only way to find out is to try it with a small package that takes a few minutes to emerge.

----------

## doughenry

kernel version should not matter unless it is something that depends on the kernel.  Things like nvidia-kernel, e1000, alsa-drivers are all dependent on the kernel source.  You can not share a binary for those.  Things like gnome, kde, mozilla, and almost all other packages will work just fine.  I run gs-sources on my server and gentoo-sources on all my workstations at work.  I have the server build packages and they work fine on the workstations.

Good luck!

----------

