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

Make linux.yaml workflow work for debian:testing/clang #1256

Merged
merged 21 commits into from
Oct 17, 2024

Conversation

dgreatwood
Copy link
Contributor

Intermittently, debian:testing has been failing with clang, saying that libstdc++ cannot be found. In debian:testing/clang, normally libstdc++-dev is installed as a dependency of meson. In the situation where the build breaks, the meson dependency is different to the latest available libstdc++; for instance, installing meson dependencies might install libstdc++-13-dev, whereas apt has access to libstdc++-14-dev. In other situations, the meson dependency libstdc++-..-dev may be the same as the latest libstdc++-..-dev to which apt has access.

To prevent the build breaking, we need to install the latest libstdc++-..-dev to which apt has access - not just the N-1 libstdc++-..-dev version which may be installed as a meson dependency. We do this now in linux.yaml.

Intermittently, debian:testing fails with clang, saying that libstdc++
cannot be found. In debian:testing/clang, normally libstdc++-dev is
installed as a dependency of meson. In the situation where the build
breaks, the meson dependency is different to the latest available
libstdc++; for instance, installing meson dependencies might install
libstdc++-13-dev, whereas apt has access to libstdc++-14-dev. In other
situations, the meson dependency libstdc++-..-dev may be the same as
the latest libstdc++-..-dev to which apt has access.

To prevent the build breaking, we need to install the latest
libstdc++-..-dev to which apt has access - not the N-1 version which
may be installed as a meson dependency. We do this now in linux.yaml.
@kiplingw kiplingw requested a review from Tachi107 October 17, 2024 04:24
@kiplingw kiplingw added bug portability fix in progress dependencies Pull requests that update a dependency file unit / CI testing For unit testing and CI (including DEP-8) labels Oct 17, 2024
@Tachi107
Copy link
Member

Are you sure libstdc++-dev gets pulled in by meson? I don't see it in its dependencies. Have you tried explicitly installing libstdc++-dev manually?

@dgreatwood
Copy link
Contributor Author

dgreatwood commented Oct 17, 2024 via email

@kiplingw kiplingw merged commit a9f63e9 into pistacheio:master Oct 17, 2024
154 of 156 checks passed
@Tachi107
Copy link
Member

Tachi107 commented Oct 17, 2024 via email

@Tachi107
Copy link
Member

  1. Stop installing the gcc package when using clang

gcc is pulled in by lcov:

$ apt depends lcov
lcov
  Depends: <python3:any>
    python3
  Depends: <perl:any>
    perl
  Depends: gcc   <-----------
  Depends: libcapture-tiny-perl
  Depends: libdatetime-perl
  Depends: libtimedate-perl
  Depends: libjson-perl
  Depends: libperlio-gzip-perl

This to me looks like a too stringent dependency by lcov, so I've filed a bug to the lcov package so that we can properly fix this. See https://bugs.debian.org/1085234

Also, next time please rebase your branch before marking it as ready for merging. Git commit histories like these are really unpleasing :/

image

@dgreatwood
Copy link
Contributor Author

dgreatwood commented Oct 17, 2024

Yeah, but we do not only install the Meson package :)

[DG] Oh yes, you're right. As you know, there is one "apt -y install ..." line that installs all the packages, so in principle it could be any one (or more than one) of the desired packages that is pulling in "libstdc++-13-dev" as a dependency. I shouldn't assume it's meson.

gcc is pulled in by lcov:

[DG] OK, thanks for finding.

Your current workaround works but might break in the scenario where the default gcc depends on e.g. libstdc++-14-dev but libstdc++-15-dev becomes available, as that would get installed instead.

[DG] Yes, that is possible, though we have yet to see that case AFAIK (and we know that it currently breaks a lot - 30% of the time? - without the workaround).

This to me looks like a too stringent dependency by lcov, so I've filed a bug to the lcov package so that we can properly fix this.

[DG] Great.

Meanwhile, for an alternative to my current workaround, would you/could we consider not doing lcov, and not installing lcov, for debian:testing/clang case?

@Tachi107
Copy link
Member

Tachi107 commented Oct 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file fix in progress portability unit / CI testing For unit testing and CI (including DEP-8)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants