Difference between revisions of "Talk:Distcc With MSVC"

From CDOT Wiki
Jump to: navigation, search
(Specifying language to cl.exe)
(Using filename containing slashes)
 
Line 80: Line 80:
 
</blockquote>
 
</blockquote>
 
You can solve this problem by specifying the source file type to Visual C++ with /TP (for C++) or /TC (for C).  You can also use /tp or /tc for specifying the language for each individual file.  Documentation is in MSDN[http://msdn2.microsoft.com/en-us/library/032xwy55(VS.80).aspx].
 
You can solve this problem by specifying the source file type to Visual C++ with /TP (for C++) or /TC (for C).  You can also use /tp or /tc for specifying the language for each individual file.  Documentation is in MSDN[http://msdn2.microsoft.com/en-us/library/032xwy55(VS.80).aspx].
 +
 +
== Using filename containing slashes ==
 +
 +
The Jan 4, 2007 news mentions that
 +
<blockquote>
 +
cl /cygdrive/c/home/temp/hello.c
 +
</blockquote>
 +
doesn't work, because the path is interpreted as an option.  You can solve that by passing the filename (with path) to cl.exe in quotes.  If your shell interprets quotes you may need to escape them.  For example, from bash you could use
 +
<pre>
 +
cl \"/cygdrive/c/home/temp/hello.c\"
 +
</pre>

Latest revision as of 13:11, 21 September 2007

You guys should put a link to your patch here. (David.humphrey 19:09, 12 October 2006 (EDT))

I would like to help you out with this project. I'll look into it in the weekend. (Liz Chak 17:09, 29 November 2006 (EDT))

Distribution Failure Causes

Ok, so I've been wondering what could be causing these issues here's a weird thing: When trying to send the file over the network it doesn't seem to getting distributed right now (Using cl settings). I don't know why this is but with gcc it seems to get distrubted fine. I'll document more as I find out how and why this is happening

Themystic 00:30, 20 December 2006 (EST)

how to make several processes work together and how to reserve the debug information?

first, thanks a lot for the authors working with the distcc vc support;

I have two questions about distcc with vc support, thanks a lot!

Fist of all, Thanks!

Second of all, I'm very interested in how you're using distcc. Please email me at themystic.ca@gmail.com

Themystic 21:11, 6 September 2007 (EDT)

Thanks a lot, I'll mail you later because I can't use mail service rightnow, I will mail to you later!

1, how to make several threads working together?

I have already use the distcc with MSVC on the windows with the support of CygWin; but now, I only can make the whole project with single thread, when I assign the -jN opition to gnu make, a error occurs: sth about vc60.idb file can't be accessed, maybe the cl.exe will used this file when compile a c file, when several threads works concurrently they want to open the file, but the file can't be opened by more than one users for writing purpose.

I use vc60, and export the projects mkfiles, and modified the nmake makefile to gnu's make file. and want to use the -jN opition , but failed.

Please post more info. Please, at least, give the entire error message.

I'm also a little unclear - are you trying to read vc60.idb multilple times or write it multiple times or a combination?

Themystic 21:08, 6 September 2007 (EDT)


thanks for your reply:

I wonder that what's your method using the distcc-vc? because this question I mentioned here should be meet when somebody use distcc tools to compile the vc projects, but why there aren't anything about it? ^-^

I invoke the gnu make at the cygwin bash:$ make -j4 -fgnumakefile.mk all

cl option is: /nologo /MLd /w /W0 /GX /Z7 /Od /I /FR"./debug/\" /Fp"./debug/Lib-vrp.pch" /YX /Fd"./debug/\" /FD /GZ /c

the error is : fatal error C1033: cannot open program database 'directoryname\vc60.idb' C:/Cygwin/tmp/distccd_de56c7fd.c(0) : fatal error C1033: cannot open program dat abase 'c:\cygwin\tmp\vc60.idb' distcc[3724] ERROR: compile filename.c on 1.1.1.1 failed with exit code 2 make: *** [debug/filename.obj] Error 2 distccd_8b6cc7fd.c C:/Cygwin/tmp/distccd_8b6cc7fd.c(0) : fatal error C1033: cannot open program dat abase 'c:\cygwin\tmp\vc60.idb' distcc[7040] ERROR: compile filename.c on 1.1.1.1 failed with exit code 2 make: *** [debug/filename1.obj] Error 2

the read operation of the idb file is performed by cl.exe (maybe, because I don't access it (in my makefile, don't mention the file) but the cl.exe report the error), I thought maybe the cl.exe will accessed the file whenever compile a file?

2, how to dealwith the pdb file? Can the distcc maintain the debug informations when distributing the compile task?

When I get a exe file generated by the distcc tools, can I use the vc IDE to debug the exe? just like debug the exe which generated on the localhost?

Did someone has some method to resolve this problem? thanks!

By deafult MSVC uses pdb files to hold debug info. I'm working on patching distcc to make this a non-issue but in the mean time you can give cl.exe a flag which will embed debug symbols in the .o files (and thus in the .exe). I don't remember the flag.

Themystic 21:04, 6 September 2007 (EDT)

Thanks, I tried just a few miutes before. By using of vc6's IDE , I can set the debug information's format(microsoft or coff), and can determinate whether the pdb file is used to hold debug-information, but the generated exe can't be debugged and the IDE says: the exe contains no debug informations.

how you test the distcc-vc? can you debug the exe file? what's the process? ^_^

Specifying language to cl.exe

The Jan 4, 2007 news says:

Both C/C++ preprocessed file ends in .i. cl has no way of knowning if it's a C/C++ preprocessed file.

You can solve this problem by specifying the source file type to Visual C++ with /TP (for C++) or /TC (for C). You can also use /tp or /tc for specifying the language for each individual file. Documentation is in MSDN[1].

Using filename containing slashes

The Jan 4, 2007 news mentions that

cl /cygdrive/c/home/temp/hello.c

doesn't work, because the path is interpreted as an option. You can solve that by passing the filename (with path) to cl.exe in quotes. If your shell interprets quotes you may need to escape them. For example, from bash you could use

cl \"/cygdrive/c/home/temp/hello.c\"