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

Merge upstream fix for osx-gcc job #650

Merged
merged 3 commits into from
May 14, 2024

Conversation

derrickstolee
Copy link
Collaborator

I noticed the osx-gcc job failing in #647 so I found this upstream fix from @peff. Merging now to unblock PR builds in microsoft/git.

peff added 3 commits May 9, 2024 09:57
The last user of this variable went away in 4a6e4b9 (CI: remove
Travis CI support, 2021-11-23), so it's doing nothing except making it
more confusing to find out which packages _are_ installed.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
On macOS, a bare "gcc" (without a version) will invoke a wrapper for
clang, not actual gcc. Even when gcc is installed via homebrew, that
only provides version-specific links in /usr/local/bin (like "gcc-13"),
and never a version-agnostic "gcc" wrapper.

As far as I can tell, this has been the case for a long time, and this
osx-gcc job has largely been doing nothing. We can point it at "gcc-13",
which will pick up the homebrew-installed version.

The fix here is specific to the github workflow file, as the gitlab one
does not have a matching job.

It's a little unfortunate that we cannot just ask for the latest version
of gcc which homebrew provides, but as far as I can tell there is no
easy alias (you'd have to find the highest number gcc-* in
/usr/local/bin yourself).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Our osx-gcc job explicitly asks to install gcc-13. But since the GitHub
runner image already comes with gcc-13 installed, this is mostly doing
nothing (or in some cases it may install an incremental update over the
runner image). But worse, it recently started causing errors like:

    ==> Fetching gcc@13
    ==> Downloading https://ghcr.io/v2/homebrew/core/gcc/13/blobs/sha256:fb2403d97e2ce67eb441b54557cfb61980830f3ba26d4c5a1fe5ecd0c9730d1a
    ==> Pouring gcc@13--13.2.0.ventura.bottle.tar.gz
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/c++-13
    Target /usr/local/bin/c++-13
    is a symlink belonging to gcc. You can unlink it:
      brew unlink gcc

which cause the whole CI job to bail.

I didn't track down the root cause, but I suspect it may be related to
homebrew recently switching the "gcc" default to gcc-14. And it may even
be fixed when a new runner image is released. But if we don't need to
run brew at all, it's one less thing for us to worry about.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
@derrickstolee derrickstolee requested a review from dscho May 10, 2024 13:34
@derrickstolee derrickstolee self-assigned this May 10, 2024
@jeffhostetler
Copy link

Do we still use or need the osx-gcc job? I thought we fixed the clang job to make universal binaries, but I may be thinking of something else.

@derrickstolee
Copy link
Collaborator Author

Do we still use or need the osx-gcc job? I thought we fixed the clang job to make universal binaries, but I may be thinking of something else.

It's still used upstream, so it would be a deviation from upstream to delete it (and that might cause merge conflicts during future rebases).

@dscho dscho merged commit caefa29 into microsoft:vfs-2.45.0 May 14, 2024
48 checks passed
dscho added a commit that referenced this pull request May 14, 2024
I noticed the `osx-gcc` job failing in #647 so I found this upstream fix
from @peff. Merging now to unblock PR builds in `microsoft/git`.
dscho added a commit that referenced this pull request May 14, 2024
I noticed the `osx-gcc` job failing in #647 so I found this upstream fix
from @peff. Merging now to unblock PR builds in `microsoft/git`.
dscho added a commit that referenced this pull request May 14, 2024
I noticed the `osx-gcc` job failing in #647 so I found this upstream fix
from @peff. Merging now to unblock PR builds in `microsoft/git`.
dscho added a commit that referenced this pull request Jun 3, 2024
I noticed the `osx-gcc` job failing in #647 so I found this upstream fix
from @peff. Merging now to unblock PR builds in `microsoft/git`.
dscho added a commit that referenced this pull request Jun 3, 2024
I noticed the `osx-gcc` job failing in #647 so I found this upstream fix
from @peff. Merging now to unblock PR builds in `microsoft/git`.
dscho added a commit that referenced this pull request Jun 3, 2024
I noticed the `osx-gcc` job failing in #647 so I found this upstream fix
from @peff. Merging now to unblock PR builds in `microsoft/git`.
dscho added a commit that referenced this pull request Jul 17, 2024
I noticed the `osx-gcc` job failing in #647 so I found this upstream fix
from @peff. Merging now to unblock PR builds in `microsoft/git`.
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.

4 participants