[distcc] newbie: problem with distcc and intel C++ 7.1: 0 byte object

Filipe Sousa filipe.gr.sousa at alunos.ipb.pt
Tue Jun 10 18:15:13 GMT 2003


On Tuesday 10 June 2003 08:22, Martin Pool wrote:
> On  8 Jun 2003, Cristian Tibirna <ctibirna at giref.ulaval.ca> wrote:
> > Le Friday, 06 June 2003 10:29, Markus Werle a écrit:
> >
> > I have the same problem and, as it was pointed to me (in this same list;
> > you might find the messages in the archive), it's a problem stemming from
> > a difference in file extensions handling between the gnu compilers and
> > ICC.
> >
> > As you might know, in order to distribute compiling, distcc preprocesses
> > your C/C++ file on the main node/server (the one doing the make -jN) and
> > sends the result over the network to the computing client, which passes
> > it to gcc as a file with the .ii extension. It seems that ICC waits for a
> > file with the extension .i.
> >
> > Now, ICC has commandline switches that allow for explicit specification
> > of the type of the file passed, but I didn't yet come around to find out
> > if there's a way to configure the commandline used by a distcc client to
> > launch compilations. Or add such a way if it doesn't exist.
>
> As Cristian says there does not seem to be any terribly good solution
> at the moment.
>
> What happens when you give a .ii file to icc?  Does it just fail, or
> does it compile it incorrectly?

With this example
icc -o test.o -c test.ii
there is no error and no test.o file. 
The icc has an option to treat all files as c files with -xc

>
> > Suggestions I received included changing the source of the distcc client
> > so that it employs the .i extension instead of .ii, but this isn't
> > convenient for me, as I use (concurently) gcc and icc on the same
> > compiling farm.
>
> I think you'd need to change the server, not the client.
>
> If you made that change then I think things would work except for
> cases like "gcc foo.cc", where you are indicating that it is a C++
> file only by the extension.  gcc would see "tmpfoo.i", and compile it
> as C.  However, if you invoked the compiler as "g++ foo.i" then things
> would, I think, work out.
>
> That is in fact a good question: if icc only accepts .i as a
> preprocessed source file name then how does it know what language it's
> supposed to be?

By the compiler name, icc is for C code and icpc is for C++

> None of these are very helpful I know, but perhaps one of them will work:
>
>  - use gcc and support free software instead?
>
>  - lobby Intel to change this?
>
>  - put a little script on your server's path that renames the tmpfile
>    and invokes icc with the new name.
>
> If anyone can describe a better solution or send a patch then I'll be
> happy to look at it.

-- 
Filipe Sousa





More information about the distcc mailing list