Changes

Jump to: navigation, search

Add support for more compilers to distcc

11,547 bytes added, 04:26, 14 December 2007
m
fixed instructions
== Project Contributor(s) ==
Once <ul><li>[[User:Rueen|Rueen Fiez]]</li><li>[[User:tjduavis|Timothy Duavis]]</li><li>[[User:Vlam6|Vincent Lam]]</li><li>[[User:Vbala|Vijey Balasundaram]]</li><li>[[User:Simon|Simon Jung]]</li></ul> Some options for contributions:<ul> <li>publish/find some more c# files to test with</li> <li>NOTE: Please ensure the files compile with Mono c# before sending them.</li> <li>test this on different OSs & networks</li> <li>Make a comprehensive list of the set-up steps on one page, unlike the scattered links there are now. No coding required, but time consuming.</li></ul> == Project Details/News ===== 0.3 release (Under construction)======= Code ====All the code for the 0.3 release can be found [http://zenit.senecac.on.ca/wiki/imgs/Pcallaghanzeropointthree.zip here]. This contains three files:<ul><li>pcallaghanzeropointthreeWHOLE.txt - the entire patch</li><li>pcallaghanzeropointthreeCODE.txt - the changes to the src directory</li><li>pcallaghanzeropointthreeTEST.txt - the changes to test/distcctest.py</li></ul>These should be applied from the trunk directory. NOTE: use either pcallaghanzeropointthreeWHOLE.txt OR both the others, depending on your preference. The end result is the same. For more details see the instructions section. ==== Instructions ====In order to use this program, several steps must be completed. <ol> <li>download the Mono C# [http://www.mono-project.com/Main_Page compiler]</li> <ul> <li>put mono in your PATH</li> </ul> <li>set up an environment variable DISTCC_MCS_HOSTS=localhost</li> <li>Checkout the distcc source</li> <ul> <li>svn co svn://cdot.senecac.on.ca/distcc/trunk</li> <li>You should get revision 117</li> </ul> <li>If you are using windows [http://www.cygwin.com/ get cygwin]</li> <ul> <li>configure cygwin by running the setup file that gets downloaded. I used the mirror: http://mirror.rhsmith.umd.edu</li> <li>NOTE: This is the step most errors will stem from, so pay careful attention to detail.</li> <ul> <li>In addition to the packages downloaded by default, get the following packages:</li> <ul><li>binutils 20060817-1 (Devel)</li><li>diffutils 2.8.7-1 release (Utils)</li><li>gcc 3.4.4-3 (Devel) NOTE: MUST be version 3.4.4-3 </li><li>gcc-core 3.4.4-3 (Devel)</li><li>gcc-g++ 3.4.4-3 (Devel)</li><li>gcc-mingw 20040810-1 (Devel)</li><li>gcc-mingw-core 20050522-1 (Devel)</li><li>gcc-mingw-g++ 20050522-1 (Devel)</li><li>mingw_runtime 3.13-1 (Devel, Libs)</li><li>python 2.5.1-2 (Interpreters, Python)</li><li>subversion 1.4.5-2 (Devel)</li><li>openssl 0.9.8g-1 (Libs, Net)</li><li>patch 2.5.8-9 (Utils)</li><li>patchutils 0.2.31-1 (Devel, Libs, Text)</li><li>tcltk 20060202-1 (Libs)</li><li>zlib 1.2.3-2 (Libs)</li><li>w32api 3.10-1 (Libs)</li><li>libapr1 1.2.11-1 (Libs)</li><li>libaprutil1 1.2.10-1 (Libs)</li><li>libneon26 0.26.4-1 (Libs)</li><li>libcharset1 1.11-1 (Libs)</li> </ul> <li>modify the cygwin.bat file</li> <li>Copy and paste the following file, then change the paths so they accurately represent your system. It's VERY important</li> <li>The particular lines to change (if yours are different) are: 4,9,12,16,19,22</li> <li>If you copy and paste you should not have to make any changes past line 22.</li> <pre>@echo off C:chdir C:\cygwin\bin rem --- Set HOME so that cvs and ssh work correctlyrem --- cvs uses HOME to locate your .cvspass file, and ssh to locate your .ssh filerem --- if you are using ssh, your HOME should match the home directory specified in /etc/passwd. See http://www.cygwin.com/faq/faq0.html.set HOME=C:\home rem --- Set VCVARS to wherever the MSVC vcvars.bat file is foundset VCVARS=C:\ff\vcvars32.bat rem --- Set MSSDK to wherever the MS SDK is installedrem --- Only required for MSVC7 or the Free MSVC editions that don't come with an SDKset MSSDK=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2 rem --- Set MOZ_TOOLS to wherever you have the moztools packaged installedset MOZ_TOOLS=C:\moztoolsrem --- Set MONO to wherever you have mono installed.rem --- Make sure there are no spaces in the path, otherwise the unit tests won't workset MONO=C:\Mono-1.2.5.1 rem --- Set CYGWINBASE to wherever cygwin is completeinstalledrem --- Do not use CYGWIN or else cygserver, cygrunsrv, testers and Cygwin services will not function properlyrem --- Variable CYGWIN is also used to modify Cygwin's behaviour a little bit.set CYGWINBASE=C:\cygwinrem --- Make sure Cygwin does not print out a DOS style path warningset CYGWIN=nodosfilewarning rem --- Prepend Cygwin pathrem --- This is necessary so that cygwin find is ahead of windows find.exe in the PATH, but cgywin link is after MSVC link.exe.set PATH=%CYGWINBASE%\bin;%PATH%set PATH=%MONO%\bin;%PATH%rem --- Set MSVC environment varscall "%VCVARS%" rem --- Prepend SDK pathsrem --- Only required for MSVC7 or the Free MSVC editions that don't come with an SDKset PATH=%MSSDK%\bin;%PATH%;set INCLUDE=%MSSDK%\include;%MSSDK%\include\atl;%INCLUDE%set LIB=%MSSDK%\lib;%LIB% rem --- moztools comes lastset PATH=%PATH%;%MOZ_TOOLS%\bin;C:\ff\distcc\src;  rem --- Now the PATH variable contains:rem MS-SDK; MSVC; Cygwin; Windows; glib/libIDL; Moztools rem --- Typically the last thing the script does is launch a cygwin shellrem --- watch for your ~/.profile and /etc/profile which may overwrite your carefully setup PATH!bash --login -i</pre> </ul> </ul> <li>get the 0.3 [http://zenit.senecac.on.ca/wiki/imgs/Pcallaghanzeropointthree.zip patch]</li> <li>apply the patch</li> <ul> <li>from the trunk directory</li> <li>patch -p0 < pcallaghanzeropointthreeWHOLE.txt</li> <li>OR</li> <ul> <li>patch -p0 < pcallaghanzeropointthreeCODE.txt</li> <li>patch -p0 < pcallaghanzeropointthreeTEST.txt</li> </ul> </ul> <li>configure and build distcc</li> <ul> <li>from the trunk directory</li> <li>./configure && make && make install</li> </ul> <li>get a simple C# [http://docs.google.com/Doc?id=dfkp8fkz_1hbrfkk file]</li> <li>compile it</li> <ul> <li>distcc mcs hello.cs</li> </ul> <li>run it</li> <ul> <li>./hello</li> </ul> <li>As an alternative to steps 9 through 11, find or write some other c# files and test them.</li> <li>Tell me how it went.</li></ol> === Plans for 0.3 release ===While all the required functions exist, unit tests would streamline the testing process and ensure each function does exaclty what it's supposed to. Therefore, the major component of the 0.3 release is going to be needed a series of tests for the functions that can be run after any changes. In addition, (Time permitting) I'll clean up the instructions and make them clearer. Having found that these instructions are inadequate, I'm setting out to try compiling fix them. First up is configuring cygwin. The Instructions given on the linked page aren't enough to compile distcc with. There's a variety list of LANssome 165 packages I had. Most of them were obviously extraneous and quite a few were downloaded by default. So I'm down to about 40 to test. The required ones will be listed with the 0.3 release instructions.
== Project Details =0.25 Release (Obsolete) ===A new [http://docs.google.com/Doc?id=dfkp8fkz_3hqpw4f patch] has been created. All required functions are now complete for the Mono C# compiler. Now is a great time for more contributors to test this project and try to find (or fix) any bugs that pop up. I'm still having trouble with SVN, but I expect to get that sorted out soon. to use this patch:<ol> <li>[http://www.cygwin.com/ get cygwin]</li> <li>[http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin configure cygwin]</li> <li>download the Mono C# [http://www.mono-project.com/Main_Page compiler]</li> <ul> <li>put mono in your PATH</li> </ul> <li>set up an environment variable DISTCC_MCS_HOSTS=localhost</li> <li>Checkout the distcc source</li> <ul> <li>svn co svn://cdot.senecac.on.ca/distcc/trunk</li> <li>You should get revision 117</li> <li>cd trunk && ./configure && make && make install</li> <li>put distcc in your PATH, before cygwin</lI> </ul> <li>get the 0.25 [http://docs.google.com/Doc?id=dfkp8fkz_3hqpw4f patch]</li> <li>apply the patch</li> <ul> <li>from the trunk directory</li> <li>patch -p0 < pcallaghanzeropointtwofive.txt</li> </ul> <li>configure and build distcc</li> <ul> <li>from the trunk directory</li> <li>./configure && make && make install</li> </ul> <li>get a simple C# [http://docs.google.com/Doc?id=dfkp8fkz_1hbrfkk file]</li> <li>compile it</li> <ul> <li>distcc mcs hello.cs</li> </ul> <li>run it</li> <ul> <li>./hello</li> </ul> <li>As an alternative to steps 9 through 11, find or write some other c# files and test them.</li> <li>Tell me how it went.</li></ol>   === 0.2 Release (Obsolete)===A new [http://docs.google.com/Doc?id=dfkp8fkz_2gxdzhr patch] has been created. All except one of the required functions (dcc_mcs_scan_args) are now complete. As the work required for this update turned out to be a lot less than I anticipated, a 0.25 patch should be released soon that will implement that last function. An SVN branch is not available yet, but should also be ready in time for 0.25. to use this patch:<ul> <li>Either reverse the first patch or get a non-patched version of the trunk</li> <li>Apply the new [http://docs.google.com/Doc?id=dfkp8fkz_2gxdzhr patch]</ul>  ===Goal for 0.2 release===Continue work on the previously identified functions. As of 0.1 several were still little more than shells, by the completion of 0.2 all except dcc_mcs_scan_args should be fully completed. A supplementary goal is to set up the source as a branch of the existing trunk on cdot, so testers may just check out the new code rather than having to check out the trunk and patch it. === 0.1 Release (Obsolete)===A [http://docs.google.com/Doc?id=dfkp8fkz_0hdwb6s compiler] has been created.Note that it is by no means anywhere near completion.That's why this is the 0.1 release. This patch has been tested on Windows XP, using cygwin to tell distcc to compile a single, simple c# file. To use it:<ol> <li>[http://www.cygwin.com/ get cygwin]</li> <li>[http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin configure cygwin]</li> <li>download the Mono C# [http://www.mono-project.com/Main_Page compiler]</li> <ul> <li>put mono in your PATH</li> </ul> <li>set up an environment variable DISTCC_MCS_HOSTS=localhost</li> <li>Checkout the distcc source</li> <ul> <li>svn co svn://cdot.senecac.on.ca/distcc/trunk</li> <li>You should get revision 117</li> <li>cd trunk && ./configure && make && make install</li> <li>put distcc in your PATH, before cygwin</lI> </ul> <li>get the 0.1 [http://docs.google.com/Doc?id=dfkp8fkz_0hdwb6s patch]</li> <li>apply the patch</li> <ul> <li>from the trunk directory</li> <li>patch -p0 < pcallaghanzeropointone.txt</li> </ul> <li>configure and build distcc</li> <ul> <li>from the trunk directory</li> <li>./configure && make && make install</li> </ul> <li>get a simple C# [http://docs.google.com/Doc?id=dfkp8fkz_1hbrfkk file]</li> <li>compile it</li> <ul> <li>distcc mcs hello.cs</li> </ul> <li>run it</li> <ul> <li>./hello</li> </ul></ol> === Goal for 0.1 Release ===- Add support for Mono's cSharp compiler[http://www.mono-project.com/CSharp_Compiler]. By the 0.1 release, Distcc should be able to at least compile C# locally. While the earlier work done on this project [[Distcc With MSVC]] suggests that only a hand-full of functions need to be codedin order for it to add a new compiler, both Java and C# compile in a manner significantly different than C. RegardlessThis will likely cause some trouble shortly...regardless, the following functions are the minimum which need to be created:
<ul>
</ul>
 == Project News =Known Bugs ===See the list within [[Distcc With MSVC]]

Navigation menu