0

I'm using several freebsd machines, and all of them are in same version,

10.3-RELEASE i386. And installed distcc every machine through ports,

/usr/ports/devel/distcc/.

I think the distcc version is distcc-3.1 because of the distcc-3.1.tar.bz2 file in /usr/ports/distfiles/.

Any compile was done very successfully, even in a very fast way as I expected.

But after I try to make break point in gdb, it cannot catch any source files of the project.

It may be the result of the temp file such as 'distccd_xxxxxx.ii' that distcc / distccd give and receive between machines.

I've tried 'directory' command in gdb, and it is not sufficient because my file tree is so complicated and too big.

gdb is just fine when I compiled it locally without distcc.

Is there any solutions to break my situation?

1

1 Answer 1

0

Have You seen the entry in the distcc FAQ? https://github.com/marksatt/distcc/blob/master/doc/web/faq.html :

Unfortunately this is caused by a bug in gcc, which I hope will be fixed in a future release. gcc embeds the directory where the compiler (cc1) was run, when it really ought to record the directory the source came from.

You can work around it for now by using the "directory" command in gdb to tell it where to find the source, or by passing an absolute file name when compiling.

Tim Janik has an unofficial patch for distcc which works around this but I think I won't merge it because it's better to fix it in gcc.

This is Debian #148957.

There was a discussion about this bug on the gcc-patches mailing list.
This can affect other programs which rely on debug stabs, such as addr2line, and it results in object files not being byte-for-byte identical when they include the source directory. The same bug affects ccache.

The patch seems to be now here: http://testbit.eu/~timj/patches/

1
  • unfortunately, i've tried all of them. But doesn't work. It could be a compiler problem. I'm using clang instead of gcc. I think this was happened because clang recognize sources' location from where it compiled(/tmp/distccd_xxxx.ii) not from the real one.
    – Kim.K
    May 27, 2016 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.