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

Build and infrastructure fixes for FreeBSD #7924

Merged
merged 18 commits into from
Dec 18, 2023

Conversation

tautschnig
Copy link
Collaborator

We rely on thin archives via ar rcT for libcprover-cpp nests archives, which FreeBSD's ar does not support. Use llvm-ar instead, which does have this capability. This enables a successful build.

All further changes are to enable successful test runs, with one caveat: goto-analyzer/loop-termination-eq/test-value-sets.desc yields a segmentation fault that I was unable to root cause thus far.

  • 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.
  • 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.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig self-assigned this Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (8fc41f3) 79.08% compared to head (18a35b8) 79.07%.

Files Patch % Lines
src/libcprover-cpp/api.cpp 20.00% 4 Missing ⚠️
src/cbmc/cbmc_parse_options.cpp 25.00% 3 Missing ⚠️
src/goto-analyzer/goto_analyzer_parse_options.cpp 25.00% 3 Missing ⚠️
src/goto-diff/goto_diff_parse_options.cpp 25.00% 3 Missing ⚠️
.../goto-instrument/goto_instrument_parse_options.cpp 25.00% 3 Missing ⚠️
src/goto-synthesizer/cegis_verifier.cpp 25.00% 3 Missing ⚠️
src/util/config.cpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7924      +/-   ##
===========================================
- Coverage    79.08%   79.07%   -0.01%     
===========================================
  Files         1696     1696              
  Lines       196429   196456      +27     
===========================================
+ Hits        155343   155352       +9     
- Misses       41086    41104      +18     

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

@tautschnig tautschnig force-pushed the bugfixes/freebsd-build branch 4 times, most recently from a1ae212 to 547ae0e Compare September 29, 2023 15:15
@tautschnig
Copy link
Collaborator Author

All further changes are to enable successful test runs, with one caveat: goto-analyzer/loop-termination-eq/test-value-sets.desc yields a segmentation fault that I was unable to root cause thus far.

#7956 fixes that one.

@tautschnig tautschnig force-pushed the bugfixes/freebsd-build branch 4 times, most recently from 81b105b to b791e29 Compare October 13, 2023 21:03
@tautschnig tautschnig force-pushed the bugfixes/freebsd-build branch from 0de2cb1 to 08f211c Compare November 16, 2023 09:24
@tautschnig tautschnig assigned kroening and TGWDB and unassigned tautschnig Nov 16, 2023
@tautschnig
Copy link
Collaborator Author

@kroening @TGWDB I am hoping that this one is now uncontroversial. It would be great to get this merged in time for a version 6 release so that we can safely claim that version 6 also builds on FreeBSD. (And I would then try to sort out #7651 on top of this so that we can even claim OpenBSD/NetBSD support.)

@kroening kroening removed their assignment Nov 17, 2023
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.

I'd love and hate to have this tested in CI. Approving regardless of that.

@tautschnig tautschnig force-pushed the bugfixes/freebsd-build branch 8 times, most recently from 2109148 to ecfafd9 Compare December 18, 2023 16:12
We rely on thin archives via `ar rcT` for libcprover-cpp nests archives, which
FreeBSD's `ar` does not support. Use `llvm-ar` instead, which does have this
capability. This enables a successful build.
This improves portability as not all systems have bash, perl, or python
in /usr/bin (FreeBSD is one such example).
FreeBSD has inline implementations of fe{set,get}round.
FreeBSD redefines various inet_* function names to __inet_*.
This is the same problem as previously seen on macOS.
It works for both FreeBSD kernel-only as well as full FreeBSD userland.
The object files are already part of libcprover-cpp, no need to add them
again. Doing so results in duplicate-definition errors on FreeBSD.
Implemented as over-approximations of the implementations found at
https://cgit.freebsd.org/src/tree/lib/libc/stdio/.
With Makefile-based builds, we rely on CaDiCaL's configure to produce an
appropriate build script.
We can always fall back to `getrusage` for minimal memory usage
information.
BSD systems won't alias gcc to clang.
Tags may contain an exclamation mark, which the shell will treat as a
request for history expansion.
Library functions may introduce inline assembler. For example, FreeBSD's
fesetround is an inline function with inline assembler. Library
functions might introduce calls to fesetround, and thereby introduce
inline assembler. Thus, run a fixed point over remove_asm and library
linking.
Uses https://github.com/cross-platform-actions/action, and can be
extended to OpenBSD and NetBSD. QEMU on Linux runners appears to be
faster than nested virtualisation on macOS runnners (even when the
latter ought to use more hardware acceleration).
Uses the same virtualisation set-up as FreeBSD checks.
This appears to have much better performance (FreeBSD job completes in
26 minutes instead of 4 hours). We can now also enable the same number
of steps in OpenBSD and NetBSD.
This needs to be debugged eventually.
@tautschnig tautschnig force-pushed the bugfixes/freebsd-build branch from ecfafd9 to 18a35b8 Compare December 18, 2023 19:59
@tautschnig tautschnig merged commit 3ff2cf7 into diffblue:develop Dec 18, 2023
37 of 39 checks passed
@tautschnig tautschnig deleted the bugfixes/freebsd-build branch December 18, 2023 22:19
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.

7 participants