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

local compilation is not incremental #15

Closed
rusefillc opened this issue Sep 3, 2024 · 5 comments
Closed

local compilation is not incremental #15

rusefillc opened this issue Sep 3, 2024 · 5 comments
Assignees

Comments

@rusefillc
Copy link
Contributor

rusefillc commented Sep 3, 2024

under WSL

git clone --recurse-submodules https://github.com/rusefi/fw-custom-example



cd /home/rusefi/fw-custom-example
./compile_firmware.sh
./compile_firmware.sh

expected: second compilation does not really compile everything
actual result: second compilation compiles everything :(

@rusefillc rusefillc added the bug Something isn't working label Sep 3, 2024
@rusefillc
Copy link
Contributor Author

@chuckwagoncomputing any chance you could help with diagnostics of root causes of the issue, if the issue reproduces for you with latest of this repo?

FYI recent progress #14 rusefi/rusefi#6879 was to generate much more of files not into submodule folders but into local generated e42639d

While this gave clarity of what is changed - at least all headers are now local to this custom repo - it did not help with incremental compilation like I was hoping it would

@rusefillc rusefillc removed the bug Something isn't working label Sep 11, 2024
@rusefillc rusefillc added this to DevOps Sep 11, 2024
@esaulenka
Copy link
Member

looks like make always tries recompile everyting due to recreation of these auto-generated files

     Prerequisite '../../../connectors/generated_outputs.h' is newer than target 'pch/pch.h.gch/firmware'.
     Prerequisite '../../../connectors/generated_ts_name_by_pin.cpp' is newer than target 'pch/pch.h.gch/firmware'.

and next, for these files

     Prerequisite '.config-sentinel' is newer than target '../../../connectors/generated_outputs.h'.
     Prerequisite '.docsenums-sentinel' is older than target '../../../connectors/generated_outputs.h'.
    Must remake target '../../../connectors/generated_outputs.h'.

and... what is it?! what is the 'signature_XYZ' ?

       Finished prerequisites of target file '.config-sentinel'.
       Prerequisite '../../../generated/tunerstudio/generated/signature_XYZ.txt' of target '.config-sentinel' does not exist.
       Prerequisite 'controllers/algo/rusefi_hw_stm32_enums.h' is older than target '.config-sentinel'.
       Prerequisite 'controllers/algo/rusefi_hw_adc_enums.h' is older than target '.config-sentinel'.
...
       Prerequisite '.target-sentinel' is older than target '.config-sentinel'.
      Must remake target '.config-sentinel'.

rusefillc pushed a commit to rusefi/rusefi that referenced this issue Sep 12, 2024
@rusefillc
Copy link
Contributor Author

--- a/firmware/bin/compile.sh
+++ b/firmware/bin/compile.sh

-make $B -j$(nproc) -r $MAKE_ARGS
+# make $B -j$(nproc) -r $MAKE_ARGS
+make -d $B -r $MAKE_ARGS

@rusefillc
Copy link
Contributor Author

Looks fixed thank you @esaulenka

@esaulenka
Copy link
Member

make -d $B -r $MAKE_ARGS

to clarify: this one can be used to debugging Makefiles.
It produses huge logs (~15MB in this case), but you can find there the whole sequence, which file depends on which one.

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

No branches or pull requests

3 participants