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
memcached branch corrupts dependency file #352
Comments
Thank you for reporting this bug. The dev/memcached branch is however not maintained as described in this and this comment to issue #58. That said, I think that the bug is because there is a missing call to |
Or alternatively, it should be fixed in both places. |
Sorry, what do you mean? |
Sometimes things have to be duplicated (e.g. master and maint), which means fixes have to be too. |
I still don't follow. There is only one place where a fix could be applied in this case. What do you think should be done? |
Never mind, just that we need a better plan for |
OK. I'll remove the branch to make it more clear that it's unsupported. |
Hopefully it can make a comeback in a form that can be supported ? |
😢 |
diff --git a/src/ccache.c b/src/ccache.c
index 6a57071..e0e5a09 100644
--- a/src/ccache.c
+++ b/src/ccache.c
@@ -1647,9 +1647,12 @@ to_memcached(struct args *args)
char *dep_d = NULL;
size_t dep_l = 0;
- if (generating_dependencies && !read_file(output_dep, 0, &dep_d, &dep_l)) {
- stats_update(STATS_ERROR);
- failed();
+ if (generating_dependencies) {
+ use_relative_paths_in_depfile(output_dep);
+ if (!read_file(output_dep, 0, &dep_d, &dep_l)) {
+ stats_update(STATS_ERROR);
+ failed();
+ }
}
if (memccached_set(cached_key, obj_d, stderr_d, dia_d, dep_d, |
@gjasny : thanks for the patch! I have some plans to keep the old code running against the maint branch, e.g. 3.4.x But we need to do some major refactoring, in order to go to master branch (i.e. 3.7) Hopefully that can work for you. |
Hello,
The following testcase reproduces the creation of a mismatching
.d
file:When I run it on Ubuntu 18.10 with
dev/memcached
head (3.4.3+136_gf771208) I get the following output:Please note that the
s2/foo.o.d
file contains/home/gregorj/Git/Experimental/ccache-deps-bug/s1/foo.h
.@afbjorklund That only happens on the memcached branch.
Thanks,
Gregor
The text was updated successfully, but these errors were encountered: