Compiling source code on FAI client
Michael Tautschnig
tautschn at model.in.tum.de
Mon Feb 11 13:24:22 CET 2008
[...]
> 1 #!/bin/bash
> 2 3 $ROOTCMD cp -R /media/mirror/clustersoft /home/cluster
> 4 $ROOTCMD chmod -R 777 /home/cluster/clustersoft
> 5 $target/usr/bin/gcc $target/home/cluster/clustersoft/test.c
>
> From previous runs I learned that I have to put the keyword "$target"
> infront of the gcc command and in front of the file I would like to compile
> (test.c). But know, fai complains that the file stdio.h (this is file which
> I include in test.c) can not be found. Obviously, I should also add the
> keyword "$target" infront of any filename I call within the source-code,
> but this would not make any sense ...
>
[...]
Ok, just one seeming misconception: $target is not a keyword, but a simple
environment variable (ah, and you should be using $FAI_ROOT, IMHO); but the
solution should be pretty simple: State line 5 as
$ROOTCMD gcc /home/cluster/clustersoft/test.c
as $ROOTCMD expands to "chroot $FAI_ROOT", which is what you need: a chroot.
Best,
Michael
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : nicht verfügbar
Dateityp : application/pgp-signature
Dateigröße : 194 bytes
Beschreibung: nicht verfügbar
URL : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20080211/fb4e4ba1/attachment.bin
More information about the linux-fai
mailing list