shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
https://setup-php.com
MIT License
2.85k stars 334 forks source link

macos-latest on PHP 8.1 failing #823

Closed caendesilva closed 5 months ago

caendesilva commented 5 months ago

Describe the bug

dyld[30[9](): Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'

See https://github.com/hydephp/develop/actions/runs/8047285149/job/21976218585

Version

Runners

Operating systems

macos-latest

PHP versions PHP 8.1

To Reproduce

https://github.com/hydephp/develop/actions/runs/8047285149/workflow?pr=1565

Expected behavior

Screenshots/Logs

Run shivammathur/setup-php@v2
/bin/bash /Users/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh

==> Setup PHP
✓ PHP Installed PHP 8.1.27

==> Setup Extensions
dyld[2438]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'
  Referenced from: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
/Users/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/../scripts/extensions/add_extensions.sh: line 9:  2438 Abort trap: [6](https://github.com/hydephp/develop/actions/runs/8047285149/job/21976218585?pr=1565#step:2:7)           php -m > "$extension_list"
dyld[2440]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.[7](https://github.com/hydephp/develop/actions/runs/8047285149/job/21976218585?pr=1565#step:2:8)4.dylib'
  Referenced from: '/usr/local/Cellar/php@[8](https://github.com/hydephp/develop/actions/runs/8047285149/job/21976218585?pr=1565#step:2:9).1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
dyld[2443]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'
  Referenced from: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
dyld[2577]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'
  Referenced from: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
✗ fileinfo Could not install fileinfo on PHP 8.1.27
dyld[2580]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'
  Referenced from: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
dyld[2583]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'
  Referenced from: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
dyld[27[10](https://github.com/hydephp/develop/actions/runs/8047285149/job/21976218585?pr=1565#step:2:11)]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'
  Referenced from: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
✗ zip Could not install zip on PHP 8.1.[27](https://github.com/hydephp/develop/actions/runs/8047285149/job/21976218585?pr=1565#step:2:28)

==> Setup Tools
dyld[2724]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'
  Referenced from: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
/Users/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/../scripts/tools/add_tools.sh: line 28:  2724 Abort trap: 6           php -r "try {\$p=new Phar('$tool_path.phar', 0);exit(0);} catch(Exception \$e) {exit(1);}"
✓ composer Added composer 2.7.1
Run composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
dyld[3090]: Library not loaded: '@loader_path/../../../../opt/icu4c/lib/libicuio.74.dylib'
  Referenced from: '/usr/local/Cellar/php@[8](https://github.com/hydephp/develop/actions/runs/8047285149/job/21976218585?pr=1565#step:4:9).1/8.1.27_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.27_1/bin/../../../../opt/icu4c/lib/libicuio.74.dylib' (no such file), '/usr/local/lib/libicuio.74.dylib' (no such file), '/usr/lib/libicuio.74.dylib' (no such file)
/Users/runner/work/_temp/38d5b687-3a78-43c8-bdb2-62a8158[9](https://github.com/hydephp/develop/actions/runs/8047285149/job/21976218585?pr=1565#step:4:10)f181.sh: line 1:  3090 Abort trap: 6           composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
Error: Process completed with exit code 134.

Additional context

Are you willing to submit a PR?

crazywhalecc commented 5 months ago

Also unavailable on 8.2: https://github.com/crazywhalecc/static-php-cli/actions/runs/8048183702/job/21978978002?pr=355

zhangskz commented 5 months ago

I believe we're hitting this as well for PHP 8.2 e.g. https://github.com/protocolbuffers/protobuf/actions/runs/8050034238/job/21990224675

caendesilva commented 5 months ago

I believe we're hitting this as well for PHP 8.2 e.g. https://github.com/protocolbuffers/protobuf/actions/runs/8050034238/job/21990224675

Really seems like macOS testing is prone to a lot of issues! I never have problems with Linux, and almost never on Windows.

shivammathur commented 5 months ago

When a new widely used dependency like icu4c has a new release for example, it takes sometimes up to a month or two for Homebrew to update the version and they do it randomly one day as their tests complete.

Then it requires me to rebuild all formulae that need it, This process takes up to a day sometimes and in that time it is broken. To speed up this process we need more build runners. I'm barely able to find a single runner for all supported macOS versions currently as the project is no longer sponsored by Scaleway.

All PHP versions have now been built with icu4c 74.2, and it should start working correctly again. If you are still seeing failures please wait for the next setup-php release.

caendesilva commented 5 months ago

When a new widely used dependency like icu4c has a new release for example, it takes sometimes up to a month or two for Homebrew to update the version and they do it randomly one day as their tests complete.

Then it requires me to rebuild all formulae that need it, This process takes up to a day sometimes and in that time it is broken. To speed up this process we need more build runners. I'm barely able to find a single runner for all supported macOS versions currently as the project is no longer sponsored by Scaleway.

All PHP versions have now been built with icu4c 74.2, and it should start working correctly again. If you are still seeing failures please wait for the next setup-php release.

Thank you so much for explaining the background to the issue. The insight is appreciated. Considering how many companies, big and small, depend on this action it's honestly outrageous that you don't have the resources you need. I imagine the impact for businesses having to deal with runner outages must far outweigh what it would cost to support you properly.

caendesilva commented 5 months ago

Confirmed the issue is resolved.

beberlei commented 5 months ago

@shivammathur do you pay the costs out of your GitHub sponsors money? How much did Scaleway pay towards this project before and/or how much is needed every month?

zhangskz commented 5 months ago

Our macos PHP 8.2 tests still seem to failing: https://github.com/protocolbuffers/protobuf/actions/runs/8067813896/job/22039182062

We're pinned at shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # 2.26.0 -- will this be fixed once we update to the next release, or is there an existing release we should upgrade too?

shivammathur commented 5 months ago

@beberlei

Yes, I purchased a Mac mini using the GitHub Sponsors funds when macos-14 support was added. Earlier Scaleway was providing a machine but they closed their open source program.

At a minimum, it requires 3 machines for the builds to complete. One of them is provided by Macstadium, the other one I purchased, and for the 3rd one I use a VM on a Macbook I have.

Ideally, I would like to get at least 3 more Mac minis to speed up the build process.

shivammathur commented 5 months ago

@zhangskz

Fixed in 2.30.0. Please let me know if it still failling.

zhangskz commented 4 months ago

Thanks @shivammathur for the speedy fix! Looks like this is working now in 2.30.0: https://github.com/protocolbuffers/protobuf/actions/runs/8160105770/job/22305996976?pr=16054