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

Installing extensions from PECL is not working when disabling all extensions first #553

Closed
1 of 2 tasks
ruudk opened this issue Jan 9, 2022 · 4 comments
Closed
1 of 2 tasks
Assignees
Labels
bug Something isn't working v3

Comments

@ruudk
Copy link

ruudk commented Jan 9, 2022

Describe the bug
I use the following config:

            -   name: Setup PHP
                uses: shivammathur/setup-php@verbose
                with:
                    php-version: '8.0'
                    coverage: none
                    extensions: 'none, igbinary, msgpack, memcached-3.1.4'
                env:
                    fail-fast: true

As you can see, I disable all extensions first, and then enable igbinary and msgpack (as the bundled memcached extension seems to use that), and then I choose not the latest memcached version but one before that, to trigger a PECL install.

I'm using @verbose, but no valuable error is logged.

Version

  • v2

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
Ubuntu 20.04

PHP versions
8.0

To Reproduce
See https://github.com/ruudk/setup-php-reproducers/blob/5f369a7eacb57a6a756d560628ad509c8eb48d93/.github/workflows/test.yaml,
and failing workflow https://github.com/ruudk/setup-php-reproducers/runs/4753170961?check_suite_focus=true

Expected behavior
It should work, or at least show more error info?

Screenshots/Logs
Nothing special

Additional context

Are you willing to submit a PR?
Sure

@ruudk ruudk added the bug Something isn't working label Jan 9, 2022
@shivammathur
Copy link
Owner

On GitHub runners memcached-3.1.5 should already be installed, so you can use that instead of memcached-3.1.4.

- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
      php-version: '8.0'
      extensions: 'none, igbinary, msgpack, memcached-3.1.5'
  env:
      fail-fast: true

The error here is because PECL requires xml extension and if you add that then it will fail because it won't be able to find libmemcached. This can be improved and I will look into it.

Currently, If you want to use memcached-3.1.4 you can install it using the source API of setup-php instead of PECL as it allows you to specify the library needed for it.
https://github.com/shivammathur/setup-php/wiki/Add-extension-from-source

- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
      php-version: '8.0'
      extensions: 'none, igbinary, msgpack, memcached-php-memcached-dev/php-memcached@v3.1.4'
  env:
      fail-fast: true
      MEMCACHED_LIB: libmemcached-dev

@ruudk
Copy link
Author

ruudk commented Jan 9, 2022

Ah it was xml! How did you find out? As it's not visible in the logs, right?

@shivammathur
Copy link
Owner

It is there in the logs after all the warnings "XML Extension not found"
https://github.com/ruudk/setup-php-reproducers/runs/4753170961?check_suite_focus=true#step:3:1265

@ruudk
Copy link
Author

ruudk commented Jan 9, 2022

Sorry, I didn't notice because of all the noise. Thanks, I'll try to search for extension next time. Thanks for helping me out 💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3
Projects
None yet
Development

No branches or pull requests

2 participants