Skip to content

Do not define project(CBMC ...) twice to fix CMake failures #8435

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

tautschnig
Copy link
Collaborator

@tautschnig tautschnig commented Sep 3, 2024

project(P, ...) sets the CMake variablee P_SOURCE_DIR to whichever
directory that CMake file is in. We happen to rely on the value of
CBMC_SOURCE_DIR in several places. Invoking project(P, ...) twice
in different directories for the same value of P will cause
hard-to-reproduce behaviour. Even though this duplication was in place
ever since, 7949cac, we apparently got lucky until a few days ago.
Now, however, we see sporadic failures on GitHub runners, such as
https://github.com/diffblue/cbmc/actions/runs/10677152028/job/29591809621.
GitHub's runner image notes do not point out any recent change to CMake,
but it might as well be changes to the kernel's scheduler.

  • 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.

@tautschnig tautschnig self-assigned this Sep 3, 2024
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.34%. Comparing base (27b845c) to head (aeeb39f).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8435   +/-   ##
========================================
  Coverage    78.34%   78.34%           
========================================
  Files         1726     1726           
  Lines       188769   188769           
  Branches     18503    18503           
========================================
  Hits        147891   147891           
  Misses       40878    40878           

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

@tautschnig tautschnig changed the title [DO NOT REVIEW] Debug CMake failures Do not define project(CBMC ...) twice to fix CMake failures Sep 3, 2024
`project(P, ...)` sets the CMake variablee `P_SOURCE_DIR` to whichever
directory that CMake file is in.  We happen to rely on the value of
`CBMC_SOURCE_DIR` in several places.  Invoking `project(P, ...)` twice
in different directories for the same value of `P` will cause
hard-to-reproduce behaviour.  Even though this duplication was in place
ever since, 7949cac, we apparently got lucky until a few days ago.
Now, however, we see sporadic failures on GitHub runners, such as
https://github.com/diffblue/cbmc/actions/runs/10677152028/job/29591809621.
GitHub's runner image notes do not point out any recent change to CMake,
but it might as well be changes to the kernel's scheduler.
@tautschnig tautschnig marked this pull request as ready for review September 3, 2024 12:52
@tautschnig tautschnig requested a review from a team as a code owner September 3, 2024 12:52
@tautschnig tautschnig assigned peterschrammel and TGWDB and unassigned tautschnig Sep 3, 2024
Copy link
Contributor

@TGWDB TGWDB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as a suitable fix for now. Reading it there seems to be some tension between CBMC_SOURCE_DIR and SRC neither of which are where the source code lives. Maybe disambiguating with CBMC_ROOT_DIR might be clearer... but this is an improvement and not necessary for now.

@tautschnig tautschnig merged commit faf92c5 into diffblue:develop Sep 5, 2024
40 checks passed
@tautschnig tautschnig deleted the debug-cmake-fail branch September 5, 2024 12:33
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Sep 19, 2024
This release addresses build failures on aarch64 (64-bit ARM) platforms
(via PR diffblue#8366) and for some CMake configurations (via PR diffblue#8435). Users
of loop invariants with dynamic frames have two changes to their user
experience:
1) Users will no longer need to give unwinding specifications for `do {
   ... } while(0)` loops.
2) Loop invariants that are conjunctions will be turned into more
   fine-grained properties to ease debugging of loop invariants when
   they aren't successfully proved.
@tautschnig tautschnig mentioned this pull request Sep 19, 2024
4 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants