Skip to content

Conversation

@tautschnig
Copy link
Collaborator

@tautschnig tautschnig commented Nov 26, 2025

In just src/big-int we were including common before defining SRC,
which meant a possible environment-defined value of SRC was being used
to construct some rules. The possible reason for having the include
earlier in just that file was that we were lacking a rule for .cc
files, the absence of which caused make to fail when sourcing common
after setting SRC.

Both fixes together now ensure that even an environment with SRC set
won't cause builds to fail in strange ways.

Fixes: #4834

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.94%. Comparing base (0985044) to head (7d06389).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8742   +/-   ##
========================================
  Coverage    79.94%   79.94%           
========================================
  Files         1699     1699           
  Lines       187790   187790           
  Branches        73       73           
========================================
  Hits        150133   150133           
  Misses       37657    37657           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kroening
Copy link
Collaborator

The override directive ensures that the Makefile's definition takes precedence over any value inherited from the environment.

The make documentation https://www.gnu.org/software/make/manual/html_node/Environment.html seems to suggest that definitions in the Makefile override environment variables?

@tautschnig tautschnig self-assigned this Nov 30, 2025
@tautschnig tautschnig marked this pull request as draft November 30, 2025 22:33
In just `src/big-int` we were including `common` before defining `SRC`,
which meant a possible environment-defined value of `SRC` was being used
to construct some rules. The possible reason for having the `include`
earlier in just that file was that we were lacking a rule for `.cc`
files, the absence of which caused `make` to fail when sourcing `common`
after setting `SRC`.

Both fixes together now ensure that even an environment with `SRC` set
won't cause builds to fail in strange ways.

Fixes: diffblue#4834
@tautschnig tautschnig changed the title Makefile builds: do not inherit SRC from environment Makefile builds: do not inherit SRC from environment in big-int Dec 1, 2025
@tautschnig
Copy link
Collaborator Author

The override directive ensures that the Makefile's definition takes precedence over any value inherited from the environment.

The make documentation https://www.gnu.org/software/make/manual/html_node/Environment.html seems to suggest that definitions in the Makefile override environment variables?

You are of course right. Nonetheless the original bug report in #4834 was justified and reproducible, because only in src/big-int/makefile we did not set SRC right away. The updates to this PR now fix this, together with the other changes necessary to make this work.

@tautschnig tautschnig assigned kroening and unassigned tautschnig Dec 1, 2025
@tautschnig tautschnig marked this pull request as ready for review December 2, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build inherits $SRC from shell

2 participants