Project

General

Profile

Actions

Bug #2972

closed

Missing dependencies in the Makefile

Added by vemakereporter over 4 years ago. Updated over 4 years ago.

Status:
Invalid
Priority:
Normal
Category:
build_autotools
Target version:
-
ASK QUESTIONS IN Forums:

Description

Hi,

Our tool has found around 127 missing dependencies in the Makefile.
Most of them are missing headers. We've attached the reports in JSON format.

Are they are valid dependency issues? If so I think they can be eliminated by using the automatic dependency generation (gcc -MM).
I can help modify the Makefile to use dependency files generated with gcc -MM. But someone please advise how to submit a patch.


Files

MP.json (223 KB) MP.json Missing dependencies for targets. vemakereporter, 2019-08-22 09:19
MP.json (223 KB) MP.json Missing dependencies for targets. vemakereporter, 2019-08-22 09:40
Actions #1

Updated by vemakereporter over 4 years ago

Hi,

Our tool has found around 127 missing dependencies in the Makefile.
Most of them are missing headers. We've attached the reports in JSON format.

Are they real dependency issues? If so I think they can be eliminated by using the automatic dependency generation (gcc -MM).
I can help modify the Makefile to use dependency files generated with gcc -MM. But someone please advise how to submit a patch.

Actions #2

Updated by stbuehler over 4 years ago

  • Status changed from New to Need Feedback

It doesn't look like your tool knows what automake is.

Without a clearer description what you used as input and why you think the output of your tool shows actual problems I'm gonna close this.

lighty is developed in git, we take patches the usual ways (attach "unified diff" here or as pull request on https://github.com/lighttpd/lighttpd1.4).

Actions #3

Updated by vemakereporter over 4 years ago

stbuehler wrote:

It doesn't look like your tool knows what automake is.

Without a clearer description what you used as input and why you think the output of your tool shows actual problems I'm gonna close this.

lighty is developed in git, we take patches the usual ways (attach "unified diff" here or as pull request on https://github.com/lighttpd/lighttpd1.4).

Our tool checks the Makefile together with the actual dependencies occurred in a build.
What we have found are missing dependencies.

For an example in the report file:

"lighttpd-http_kv.obj": {
        "Missing Prerequisites": [
            "/home/vemakecreator/Vemake/testbase/testproject/lighttpd-1.4.53/src/http_kv.h", 
            "/home/vemakecreator/Vemake/testbase/testproject/lighttpd-1.4.53/config.h", 
            "/home/vemakecreator/Vemake/testbase/testproject/lighttpd-1.4.53/src/buffer.h", 
            "/home/vemakecreator/Vemake/testbase/testproject/lighttpd-1.4.53/src/first.h" 
        ]
    }, 

It means the build of "lighttpd-http_kv.obj" requires those header files, however, they are not specified in the Makefile.

Since the Makefile is generated by Automake, I think we can also try to fix this problem in Makefile.am or Makefile.in.
If you think they are true issues, I will try to fix them and submit a patch on GitHub.

Thx.

Actions #4

Updated by stbuehler over 4 years ago

  • Status changed from Need Feedback to Invalid
  • Target version deleted (1.4.x)

My build directory doesn't have any file named lighttpd-http_kv.obj, and the build log didn't mention it either.

If it were build the build rules look like they would generate the appropriate dependency file.

What makes you think automake wouldn't generate the needed dependency files based on our Makefile.am? What would you even "fix"? We certainly won't add manual dependencies there, neither manual dependency tracking - that is what we have automake for.

If there actually is a problem (and it doesn't look to me like there is), you'd better fix it in automake itself.

It is a nice idea to check whether automake works properly, but please think about how to remove obvious false positives and where you report those problems.

Actions #5

Updated by vemakereporter over 4 years ago

stbuehler wrote:

My build directory doesn't have any file named lighttpd-http_kv.obj, and the build log didn't mention it either.

If it were build the build rules look like they would generate the appropriate dependency file.

What makes you think automake wouldn't generate the needed dependency files based on our Makefile.am? What would you even "fix"? We certainly won't add manual dependencies there, neither manual dependency tracking - that is what we have automake for.

If there actually is a problem (and it doesn't look to me like there is), you'd better fix it in automake itself.

It is a nice idea to check whether automake works properly, but please think about how to remove obvious false positives and where you report those problems.

OK, after a closer check, I think you were right about it.

Automake indeed generates dependency files for those objects that are built by default.

Our tool tries to build every target mentioned in the Makefile. That is, it will try to build objects that are not built by default.

For example, "lighttpd-mod_uploadprogress.obj" is not built by default. However, you can execute "make lighttpd-mod_uploadprogress.obj" to build it under the src directory.
In the first call to "make lighttpd-mod_uploadprogress.o", those dependencies we reported are indeed missing in the Makefile. However, in the second call to "make lighttpd-mod_uploadprogress.o", the dependencies appear as a result of including a temp dependency file in src/.deps.

I think this is not an issue, thanks for your time.

Actions #6

Updated by stbuehler over 4 years ago

I think an additional problem is that various build targets share a dependency file; in your first example this would be lighttpd-http_kv.o and lighttpd-http_kv.obj - but only one should be used on a given platform, so in the end it works out fine (but not if you try building targets manually that aren't supposed to be built on the platform).

Actions

Also available in: Atom