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

[macos]: strange error during homebrew install #7725

Closed
3 of 10 tasks
igagis opened this issue Jun 14, 2023 · 3 comments
Closed
3 of 10 tasks

[macos]: strange error during homebrew install #7725

igagis opened this issue Jun 14, 2023 · 3 comments
Labels
Area: Packages bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: macOS

Comments

@igagis
Copy link

igagis commented Jun 14, 2023

Description

Recently I started getting strange error for my macos builds:
https://github.com/cppfw/svgdom/actions/runs/5240488083/jobs/9518560473#step:5:584

it happens during brew install phase and the error message is not very informative, just:

Error: Process completed with exit code 1.

Some days ago everything was working.

any idea what could be wrong?

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

https://github.com/cppfw/svgdom/actions/runs/5240488083/jobs/9518560473#step:5:584

Is it regression?

yes

Expected behavior

last successful build https://github.com/cppfw/svgdom/actions/runs/5190159946/jobs/9357595638

Actual behavior

error during brew install

Repro steps

see build link

@vpolikarpov-akvelon vpolikarpov-akvelon added Area: Packages OS: macOS investigate Collect additional information, like space on disk, other tool incompatibilities etc. and removed needs triage labels Jun 14, 2023
@vpolikarpov-akvelon
Copy link
Contributor

Hi @igagis. We will take a look.

@vpolikarpov-akvelon
Copy link
Contributor

Hey @igagis. I investigated this error and here are some info.

The event that have exposed this issue is release of Python 3.11.4 that happened on 6 June. As soon as it had released your pipeline started trying to upgrade Python 3. The error in your pipeline is here: https://github.com/cppfw/svgdom/actions/runs/5240488083/jobs/9501787549#step:5:207

Unfortunately there is a known problem with Python 3 upgrading. Some users still require Python 2 but it's absent from official Homebrew repo since 2020 so we are installing package served by python's team. The package installs link /usr/local/bin/2to3 that causes conflict when installing or updating Python 3 afterwards.

You can see the same error in runner image build log: https://github.com/actions/runner-images/actions/runs/5273257025/jobs/9536456138#step:10:866. Actually this error doesn't affect other installation steps and may be ignored as soon as you handle 2to3 link on your own. For example, to workaround this issue we let brew command to fail on installing Python 3 and then overwriting links with brew link --overwrite python@3.11.

Here are some options for what you can do:

  • Wait until macOS 12 update that includes latest Python 3 version is rolled out
  • Do not try to upgrade Python or upgrade it in separate step with forced link override.
  • Try running rm -rf /usr/local/bin/2to3 prior to upgrade.

@igagis
Copy link
Author

igagis commented Jun 15, 2023

Hi @vpolikarpov-akvelon ! Thanks for analysis.

I decided to go with the third approach of removing 2to3 because this way I will avoid this same problem when new python version comes out.

Though, I had to remove more stuff:

        rm -rf /usr/local/bin/2to3*
        rm -rf /usr/local/bin/idle3*
        rm -rf /usr/local/bin/pydoc3*
        rm -rf /usr/local/bin/python3
        rm -rf /usr/local/bin/python3-config
        rm -rf /usr/local/bin/python3*
        rm -rf /usr/local/bin/python3*-config

Closing the issue for now.

@igagis igagis closed this as completed Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Packages bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: macOS
Projects
None yet
Development

No branches or pull requests

2 participants