<div dir="ltr">In your Makefile, change all occurrences of "gcc" to "$(CC)".</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 10 May 2021 at 13:19, anish anil <<a href="mailto:anish.a.anil@gmail.com">anish.a.anil@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello Henderson,</div><div><br></div><div>Thank you for that lead, I changed the code by reading through the code mentioned at <br></div><div><br></div><div><a href="https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html#zz-2.1" target="_blank">https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html#zz-2.1</a></div><div><br></div><div>Now created the sample example and did the following</div><div>**********</div><div>// hello.c<br>#include <stdio.h><br><br>int main() {<br>    printf("Hello, world!\n");<br>    return 0;<br>}</div><div>**********</div><div><br></div><div>Make file with the below contents:</div><div><br></div><div>***************</div><div>all: hello.exe<br><br>hello.exe: hello.o<br>         gcc -o hello.exe hello.o<br><br>hello.o: hello.c<br>         gcc -c hello.c<br><br>clean:<br>         rm hello.o hello.exe</div><div>****************</div><div><br></div><div>Ran the build withe the make file using the below command:</div><div><br></div><div>******************</div><div>root@ip-172-31-24-96:/data/cprg# ls<br>hello.c  makefile<br>root@ip-172-31-24-96:/data/cprg# pump make -j8 CC=distcc --debug<br>__________Using distcc-pump from /usr/local/bin<br>__________Found 2 available distcc servers<br>GNU Make 4.1<br>Built for x86_64-pc-linux-gnu<br>Copyright (C) 1988-2014 Free Software Foundation, Inc.<br>License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" target="_blank">http://gnu.org/licenses/gpl.html</a>><br>This is free software: you are free to change and redistribute it.<br>There is NO WARRANTY, to the extent permitted by law.<br>Reading makefiles...<br>Updating goal targets....<br> File 'all' does not exist.<br>   File 'hello.exe' does not exist.<br>     File 'hello.o' does not exist.<br>    Must remake target 'hello.o'.<br>gcc -c hello.c<br> File 'all' does not exist.<br>   File 'hello.exe' does not exist.<br>  Must remake target 'hello.exe'.<br>gcc -o hello.exe hello.o<br> File 'all' does not exist.<br>Must remake target 'all'.<br>Successfully remade target file 'all'.<br>__________Shutting down distcc-pump include server<br>root@ip-172-31-24-96:/data/cprg# ls -la<br>total 32<br>drwxr-xr-x 2 root root 4096 May 10 11:51 .<br>drwxr-xr-x 5 root root 4096 May 10 11:48 ..<br>-rw-r--r-- 1 root root   92 May 10 11:48 hello.c<br>-rwxr-xr-x 1 root root 8304 May 10 11:51 hello.exe<br>-rw-r--r-- 1 root root 1544 May 10 11:51 hello.o<br>-rw-r--r-- 1 root root  133 May 10 11:49 makefile<br>root@ip-172-31-24-96:/data/cprg# vi hello.c<br>root@ip-172-31-24-96:/data/cprg# vi makefile<br>root@ip-172-31-24-96:/data/cprg#<br></div><div>******************<br></div><div><br></div><div>So here it looks like it has build correctly, But I'm yet to ascertain, If all the servers were really used during the compile operation which lands me back to the original question.</div><div><br></div><div>Thank you,</div><div>Anish<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 10, 2021 at 5:08 PM Fergus Henderson <<a href="mailto:fergus@google.com" target="_blank">fergus@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Your makefile is not doing any actual C or C++ compilation. If you want to test whether distcc is set up correctly, you need to actually compile something.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 10 May 2021, 12:33 anish anil via distcc, <<a href="mailto:distcc@lists.samba.org" target="_blank">distcc@lists.samba.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<button>
            
        </button>
    

    
        <div><div>

</div>
        </div>

        

<div>
    
    <div>
                
<p>I'm first time using distcc and have gone through the Readme.</p>
<p>To setup I have three Ubuntu Servers:
Master and Client:</p>
<p>As per the readme it sound like we need to install them on all theree machines. which i have completed.
<a href="https://github.com/distcc/distcc/blob/master/INSTALL" rel="nofollow noreferrer noreferrer" target="_blank">https://github.com/distcc/distcc/blob/master/INSTALL</a></p>
<p>Ran the command on all three servers:</p>
<p>sudo apt-get install gcc make python3 python3-dev libiberty-dev</p>
<p>./autogen.sh
./configure
make install</p>
<p>They completed without any errors.</p>
<p>Create ssh keys across the three machines and added then to the authorized host section.
Did a ssh and confirmed they are able to login from the master to the Agent systems without any password</p>
<p>Now from the Master Server i ran the below pointing two the two clients:</p>
<pre><code>Export DISTCC_POTENTIAL_HOSTS='localhost 172.31.33.11 172.31.37.109'
</code></pre>
<p>Created a hello world make file:</p>
<pre><code>    #.DEFAULT_GOAL := generate
    .PHONY: all say_hello generate clean

    all: say_hello generate

    say_hello:
            @echo "Hello World"

    generate:
            @echo "Creating empty text files..."
            touch file-{1..10}.txt

    clean:
            @echo "Cleaning up....."
            rm -f *.txt
</code></pre>
<p>Ran a build using the below command</p>
<pre><code> make
 Hello World
 Creating empty text files...
 touch file-{1..10}.txt
 root@ip-172-31-24-96:/data/helloworls#
</code></pre>
<p>So here it does look to have worked as expected.</p>
<p>Ran the command as specified in the documentation:</p>
<pre><code>pump make -j40 CC="distcc gcc" --debug
__________Using distcc-pump from /usr/local/bin
__________Found 1 available distcc servers
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" rel="noreferrer" target="_blank">http://gnu.org/licenses/gpl.html</a>>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
 File 'all' does not exist.
   File 'say_hello' does not exist.
  Must remake target 'say_hello'.
   File 'generate' does not exist.
  Must remake target 'generate'.
Hello World
Creating empty text files...
touch file-{1..10}.txt
 File 'all' does not exist.
 File 'all' does not exist.
Must remake target 'all'.
Successfully remade target file 'all'.
__________Shutting down distcc-pump include server
root@ip-172-31-24-96:/data/helloworls# ls
Makefile  file-{1..10}.txt
root@ip-172-31-24-96:/data/helloworls#
</code></pre>
<p>Question:</p>
<pre><code>1> How do we really know that the two client servers have been used during this build
2> Is setting the client servers same as that of the master, If no is there a difference
3> How do we see the UI distcc Monitor
4> How can i join a range of machines which does not have DistCC installed
</code></pre>
<p>Thank you</p>
    </div></div>

</div>
__<br>
distcc mailing list            <a href="http://distcc.samba.org/" rel="noreferrer noreferrer" target="_blank">http://distcc.samba.org/</a><br>
To unsubscribe or change options:<br>
<a href="https://lists.samba.org/mailman/listinfo/distcc" rel="noreferrer noreferrer" target="_blank">https://lists.samba.org/mailman/listinfo/distcc</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Fergus Henderson <<a href="mailto:fergus@google.com" target="_blank">fergus@google.com</a>></div></div></div>