Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pump mode fails with -Wmissing-include-dirs -Werror #121

Open
GoogleCodeExporter opened this issue May 26, 2015 · 2 comments
Open

Pump mode fails with -Wmissing-include-dirs -Werror #121

GoogleCodeExporter opened this issue May 26, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

The problem appears if test.c doesn't include any file from the 'headers' 
directory and both -Wmissing-include-dirs -Werror are set.

$ distcc-pump distcc -c -Wmissing-include-dirs -Werror -Iheaders test.c
__________Using distcc-pump from /usr/bin
__________Using 1 distcc server in pump mode
distcc[32537] ERROR: compile test.c on 10.1.0.2,cpp,lzo failed
distcc[32537] (dcc_build_somewhere) Warning: remote compilation of 'test.c' 
failed, retrying locally
distcc[32537] (dcc_build_somewhere) Warning: failed to distribute and fallbacks 
are disabled
cc1: error: headers: No such file or directory [-Werror]
cc1: all warnings being treated as errors
__________Shutting down distcc-pump include server

This can be easily worked around by not using -Werror, but I guess it would be 
nice if this scenario was handled automatically by distcc.

Original issue reported on code.google.com by bino...@gmail.com on 10 Jan 2013 at 11:55

@GoogleCodeExporter
Copy link
Author

What's the contents of test.c?
What's the contents of your current working directory when you run the 
distcc-pump command?  Does it have a "headers" subdirectory?  Does that 
subdirectory contain any files?

Original comment by fergus.h...@gmail.com on 10 Jan 2013 at 1:19

@GoogleCodeExporter
Copy link
Author

Let's suppose a project with the following files:

file1.c
file2.c
headers/globals.h

file1.c includes "globals.h"
file2.c does not include it

Both files are compiled with the same CFLAGS, like this:

cc -c -Iheaders -Wmissing-include-dirs -Werror file1.c
cc -c -Iheaders -Wmissing-include-dirs -Werror file2.c

When compiling file1.c, headers/globals.h will be sent to the distcc server.

When compiling file2.c, it will not, because that header is not needed
to compile that file. However, -Wmissing-include-dirs will produce a
compilation warning, and together with -Werror it will make the
compilation fail.

Original comment by bino...@gmail.com on 10 Jan 2013 at 3:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant