LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Compiling over internet? (https://www.linuxquestions.org/questions/linux-from-scratch-13/compiling-over-internet-841179/)

Blender3D 10-29-2010 10:04 AM

Compiling over internet?
 
I have a really slow computer at home, and I got permission to SSH into my university's Linux servers (they have Intel Xeons, which will compile a bit faster than my AMD Athlon). The only problem is I don't have root access. They don't care if I hog their CPU (as they have like 100 of these monsters) either ;)

Would it be possible for me to compile programs via SSH and send the compiled files back to my machine, assuming I have no root privileges on the SSH box? I'm not sure how it would work, but I'm wondering if it is even feasible, since I would love to be able to use my home computer while I'm performing an ALFS build...

Thanks to anybody who cares to look at this ;)

pwc101 10-29-2010 10:15 AM

In general, compiling software requires no special privileges. Installing software, on the other hand, usually requires root privileges as you're typically writing to parts of the system which are read-only for ordinary users.

I don't have any experience with LFS, but my understanding is you chroot into a particular directory and use that to build your system. However, chrooting requires root permissions, so you might be out of luck there.

Blender3D 10-29-2010 10:19 AM

I tried chrooting before, but no luck. They don't want me running chroot-jails on their computers...

Would the program that I compile via their server be any different than the one I compile locally (assuming I override their compiler flags with my machine's native flags)? I have no problem with scripting it to transfer folders to and from to get it done... I'm guessing it will take just as long to transfer all of the stuff to/from as it would for me to compile it on my rig.

pwc101 10-29-2010 10:25 AM

Quote:

Originally Posted by Blender3D (Post 4143387)
I tried chrooting before, but no luck. They don't want me running chroot-jails on their computers...

That is understandable.
Quote:

Originally Posted by Blender3D (Post 4143387)
Would the program that I compile via their server be any different than the one I compile locally (assuming I override their compiler flags with my machine's native flags)?

As far as I understand it, the resultant code is essentially hardware independent.
Quote:

Originally Posted by Blender3D (Post 4143387)
I have no problem with scripting it to transfer folders to and from to get it done... I'm guessing it will take just as long to transfer all of the stuff to/from as it would for me to compile it on my rig.

If those machines are connected to the internet, then you can use their (presumably faster) net connection to download the necessary files directly from their original source, rather than you uploading them from your machine. This would save you time uploading source files. The compiled binaries should be relatively small, certainly in comparison to the decompressed source code. I wouldn't have thought you'd lose out overall by having to download from their servers back to your computer. However, I don't know what kind of a connection you have.

Blender3D 10-29-2010 10:35 AM

Oh yes, they have a 50mb/s connection (I downloaded Ubuntu 10.10 x32 and x64 simultaneously in less than 1 minute). LFS packages should finish in about 20 seconds :)

I think I'm going to attempt this now :D

TobiSGD 10-29-2010 10:57 AM

Wow, that must compile really fast, if you use something like make -j100
I "only" have six cores, and on my machine, using -j8, I have a SBU of 37 seconds.

Blender3D 10-30-2010 01:51 PM

Lol, I meant that it would download the packages in 20 seconds...

My SBU is ~ 200s, but I've got my rendering machine running! It performs about 20% faster than Ubuntu in CLI rendering. I'm quite pleased!

markush 10-30-2010 06:04 PM

Hello Blender3D,

I'm using Gentoo on three of my computers. Also I use distcc to distribute compilingjobs over my network. This works very well since two of my machines have the same architecture (AMD K8). If you have different machines you'll have to build a toolchain on the other machine in order to enable the building of code for your machine. Building a toolchain will need rootpermssions. Another point is that distcc is running as a daemon on the "server". To start this daemon you'll also need rootpermissions. So my answer to your question is that it will be not possible to compile your code on the Universitymachines.
Otherwise distributed compiling is very fast (Kernel for my netbook in 3 minutes (after "make mrproper")), maybe it is possible for you to gain a second machine for this purpose.

Markus


All times are GMT -5. The time now is 12:01 PM.