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

[new release] goblint (2.2.1) #24423

Merged
merged 2 commits into from
Sep 27, 2023
Merged

Conversation

sim642
Copy link
Contributor

@sim642 sim642 commented Sep 13, 2023

Static analysis framework for C

CHANGES:
  • Bump batteries lower bound to 3.5.0.
  • Fix flaky dead code elimination transformation test.

CHANGES:

* Bump batteries lower bound to 3.5.0.
* Fix flaky dead code elimination transformation test.
@sim642
Copy link
Contributor Author

sim642 commented Sep 13, 2023

All the CI failures aren't really related nor fixable here.

@tmcgilchrist
Copy link
Contributor

tmcgilchrist commented Sep 14, 2023

The macOS failure is curious, batteries not finding a real gcc? Perhaps it is related to the FreeBSD failure which is caused by conf-gcc not having an entry for FreeBSD. Added FreeBSD for conf-gcc #24429

@sim642
Copy link
Contributor Author

sim642 commented Sep 14, 2023

The "couldn't find real gcc" error is from goblint-cil, not goblint. I'm surprised to see this again because in #21975 (comment) I said:

With conf-gcc it's depext forces homebrew to install a real gcc.

Depext also shows gcc being installed via homebrew, so I'm not sure what the issue is.

@raphael-proust
Copy link
Contributor

On the macos CI failure I see the following in the logs.

First, it installs the conf-gcc package and that seems to happen alright.

- ==> Installing gcc
- ==> Pouring gcc--13.2.0.ventura.bottle.1.tar.gz
- No entry for terminal type "unknown";
- using dumb terminal settings.
- 🍺  /usr/local/Cellar/gcc/13.2.0: 1,590 files, 421.7MB

Then as part of installing goblint-cil, it tries to discover the local available the gcc by checking different versions. It starts with just plain gcc:

# (cd _build/default/bin && ./realGccConfigure.exe)
# run: gcc --version
# -> process exited with code 0
# -> stdout:
#  | Apple clang version 14.0.3 (clang-1403.0.22.14.1)
#  | Target: x86_64-apple-darwin22.5.0
#  | Thread model: posix
#  | InstalledDir: /Library/Developer/CommandLineTools/usr/bin
# -> stderr:

And then tries to go down from version to version:

# run: gcc-12 --version
# -> process exited with code 127
# -> stdout:
# -> stderr:
#  | sh: gcc-12: command not found
# run: gcc-11 --version
# -> process exited with code 127
# -> stdout:
# -> stderr:
#  | sh: gcc-11: command not found
# run: gcc-10 --version
# -> process exited with code 127
# -> stdout:
# -> stderr:
#  | sh: gcc-10: command not found
# run: gcc-9 --version
# -> process exited with code 127
# -> stdout:
# -> stderr:
#  | sh: gcc-9: command not found
# run: gcc-8 --version
# -> process exited with code 127
# -> stdout:
# -> stderr:
#  | sh: gcc-8: command not found
# run: gcc-7 --version
# -> process exited with code 127
# -> stdout:
# -> stderr:
#  | sh: gcc-7: command not found
# Fatal error: exception Failure("couldn't find real gcc")

As you can see, it misses the actual version that goblint-cil is actually installed at.

I'm a bit confused because AFAICT it should try versions 16 and lower. I think the issue is that goblint-cil<2.02 should be marked as incompatible with macos? or conf-gcc? or something like that?

@raphael-proust
Copy link
Contributor

@sim642 sorry to be using your PR to investigate and fix some not-totally-related issues, just trying to take the opportunity to improve the general health of the opam-repository.

@edwintorok
Copy link
Contributor

edwintorok commented Sep 20, 2023

Latest goblint and goblint-cil builds just fine on my Mac OS (with gcc-13). Earlier 'goblint-cil' indeed doesn't build on the latest version of 'gcc' that homebrew installs. If you install a different version of 'gcc' it might work, but I don't think you can express that in 'conf-gcc'. To make the CI happier you could indeed mark older version of 'goblint-cil' as not supported on macos-homebrew, but please only do that on the CI (there are some x-ci-accept-failures tags that could be put on goblint-cil), it may be possible for someone using an actual Mac to get it working.

@sim642
Copy link
Contributor Author

sim642 commented Sep 20, 2023

I'm a bit confused because AFAICT it should try versions 16 and lower. I think the issue is that goblint-cil<2.02 should be marked as incompatible with macos? or conf-gcc? or something like that?

Ah! That lintcstubs macos job is forced to go with goblint-cil 2.0.1, which I didn't notice before. goblint-cil 2.0.2 extends the range of gcc binaries it looks for such that it works.

Indeed, it works on macos if an older gcc from Homebrew is present. So goblint-cil 2.0.1 isn't outright incompatible with macos but depends on some depext versions on which constraints aren't possible.

@raphael-proust
Copy link
Contributor

Is it likely to work if we just add a patch file for goblint-cil to extend gcc version detection?

We could add this patch to the package. I think that's the solution which keeps the most compatibility. Does anyone know if goblint-cil might have incompatibilities with higher versions of gcc?

@sim642
Copy link
Contributor Author

sim642 commented Sep 21, 2023

It should be fine. This patch should do it: goblint/cil@28d3e7e.

@raphael-proust
Copy link
Contributor

I made #24493

@raphael-proust
Copy link
Contributor

I think this is ready to merge.

@dinosaure
Copy link
Contributor

Thanks!

@dinosaure dinosaure merged commit f1be7c8 into ocaml:master Sep 27, 2023
Leonidas-from-XIV added a commit to Leonidas-from-XIV/lintcstubs that referenced this pull request Mar 28, 2024
Goblint 2.2 removed `Prelude.Ana` (and all of `Prelude`) thus
compilation fails with that version.

opam-repository already applied the constraint in the package:
ocaml/opam-repository#24423
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants