Summary:
Incremental builds do not pick up on OMR .c file changes.
Scenario:
OpenJDK10 on OpenJ9 is downloaded and compiled successfully.
A change is made to an OMR .c file, like omrmem.c or omrmemtag.c, to include a debug printf.
OpenJDK10 on OpenJ9 is recompiled.
Expected Result:
The debug statements appear when the surrounding logic is exercised.
Actual Result:
The debug statements do not occur.
Workaround:
A full clean-and-rebuild produces a build that generates the debug messages.
I know it doesn't help you now, but this works properly when using the CMake build system. CMake will eventually be the default and the autotools build system will be removed.
Another workaround which is faster to compile, but more annoying to accomplish, is to delete the shared library that the object is linked into before compiling.
Duplicate of #1831, it has a bit more detail as to what the core issue is.
Same issue, but in OpenJ9: eclipse/openj9#676
For what its worth, I doubt that any of the core developers want to fix this, as they are all focusing on finishing the CMake changes. We are accepting any and all volunteers who want to fix this issue!
What's the outlook for CMake?
Is this an OMR problem, or a problem with OpenJ9's makefiles not being able to incrementally build a change in their embedded OMR component? Presumably OMR's makefiles support incrementally rebuilding a c file? I know it works for changes in the compiler component (which, admittedly, currently "rely" on a different build system :( ).
It's a problem with OMR, but even if we fixed it I think we would have the same kind of problem with linking OMR libraries with UMA in openj9.
This explains the problem: https://github.com/eclipse/omr/issues/1831#issuecomment-338768904
This stack overflow post looks like it has the same problem, and some ways to solve it: https://stackoverflow.com/questions/3200235/makefile-updated-library-dependency
Which platforms is this about? I would expect issues on Windows, because I don't think dependencies are even captured. Is a problem on other platforms?
When I ran into it I was using x86 linux