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

Unable to install Couchbase extention on ubuntu 20.04 & php 8.0 #593

Closed
2 of 5 tasks
StuMason opened this issue May 16, 2022 · 5 comments
Closed
2 of 5 tasks

Unable to install Couchbase extention on ubuntu 20.04 & php 8.0 #593

StuMason opened this issue May 16, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@StuMason
Copy link

StuMason commented May 16, 2022

Describe the bug
The following stanza was working previously for us:

     - name: Setup PHP with PECL extension
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.0"
          extensions: couchbase
        env:
          fail-fast: true

However this is now failing, it's taking around 15 minutes to complete, and gives the following error:

==> Setup Extensions
PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'libcouchbase_php_core.so' in Unknown on line 0
✗ couchbase Could not install couchbase on PHP 8.0.18

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems

Ubuntu 20.04

PHP versions

8.0, 8.1

To Reproduce

     - name: Setup PHP with PECL extension
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.1"
          extensions: couchbase
        env:
          fail-fast: true

Expected behavior

Installs php with couchbase extension enabled

Screenshots/Logs

/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh

==> Setup PHP
✓ PHP Switched to PHP [8](https://github.com/pfizer/divine-waterfall/runs/6453536857?check_suite_focus=true#step:5:8).0.18

==> Setup Extensions
PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'libcouchbase_php_core.so' in Unknown on line 0
✗ couchbase Could not install couchbase on PHP 8.0.18

==> Setup Tools
PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'libcouchbase_php_core.so' in Unknown on line 0
✓ composer Added composer 2.3.5

==> #StandWithUkraine
✓ read-more https://setup-php.com/support-ukraine

image

image

Additional context

Last successful run was on the 29th March 2022

Are you willing to submit a PR?

With help, yes.

@StuMason StuMason added the bug Something isn't working label May 16, 2022
@StuMason
Copy link
Author

fwiw, it's just worked on Ubuntu 22.04 after 10 minutes:

image

@shivammathur
Copy link
Owner

@StuMason

Last week a new version of couchbase extension 4.0.0 was released which ships with a new C++ library version. I will fix this in the next release. Till then please use ubuntu-22.04 which should work.

Also, you should have a look at caching the couchbase extension as it takes 10 minutes to build.
https://github.com/shivammathur/cache-extensions

@polesen
Copy link

polesen commented May 19, 2022

I am getting the same problem with PHP7.4 on ubuntu-20.04. I have to stay on the v2 of libcouchbase/couchbase extension because v3 and v4 are not API compatible.

I suspect, that upgrading to ubuntu-22.04 will give me v4 right? And if so, is there a way to stay on couchbase extension v2? I tried changing my extensions option to include "couchbase-2" but that did not help.

@shivammathur
Copy link
Owner

shivammathur commented May 19, 2022

In the next release, instead of upgrading to v4 for now, I will wait till v4 becomes a bit stable as it fails to compile on some configurations. So it will be v2 till PHP 7.1 and v3 for 7.2 and above by default.

But, you will be able to specify the exact version of couchbase you want after the next release as per the example below. I plan to do the release on Monday next week.

- name: Setup PHP
  uses: shivammathur@setup-php@v2
  with:
    php-version: '7.4'
    extensions: couchbase-2.6.2

@shivammathur shivammathur added the awaiting-release Added/Fixed and tested, awaiting release label May 25, 2022
@shivammathur
Copy link
Owner

Released 2.19.0 with the fix.

I managed to add support for couchbase 4. So that will be default on PHP 7.4 and above. But you can specify the exact semver version in extensions input if you want an older version.

https://github.com/shivammathur/setup-php/releases/tag/2.19.0

@shivammathur shivammathur removed the awaiting-release Added/Fixed and tested, awaiting release label May 30, 2022
nicolas-grekas added a commit to symfony/symfony that referenced this issue Feb 13, 2023
This PR was submitted for the 6.3 branch but it was squashed and merged into the 5.4 branch instead.

Discussion
----------

Speed up Psalm tests

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the latest branch.
 - For new features, provide some code snippets to help understand usage.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

The setupphp maintainer [recommends caching the couchbase extension](shivammathur/setup-php#593 (comment)) using the [cache-extensions action](https://github.com/shivammathur/cache-extensions). This should speed up Psalm runs from 14 minutes to 2 minutes!

Commits
-------

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

No branches or pull requests

3 participants