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

Specifying SWOOLE_CONFIGURE_OPTS does not take effect #740

Closed
3 of 5 tasks
huangdijia opened this issue Jun 8, 2023 · 5 comments
Closed
3 of 5 tasks

Specifying SWOOLE_CONFIGURE_OPTS does not take effect #740

huangdijia opened this issue Jun 8, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@huangdijia
Copy link

Describe the bug

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

PHP versions
PHP 8.1

To Reproduce

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version:8.1
          extensions: redis, pdo, pdo_mysql, bcmath, swoole-5.0.3
          tools: phpize
          coverage: none
          ini-values: swoole.use_shortname=Off
        env:
          SWOOLE_CONFIGURE_OPTS: --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql --enable-brotli

Screenshots/Logs

Run shivammathur/setup-php@v2
  with:
    php-version: 8.1
    extensions: redis, pdo, pdo_mysql, bcmath, swoole-5.0.3
    tools: phpize
    coverage: none
    ini-values: swoole.use_shortname=Off
    ini-file: production
  env:
    PHP_CS_FIXER_IGNORE_ENV: 1
    SWOOLE_CONFIGURE_OPTS: --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql --enable-brotli
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v[2](https://github.com/friendsofhyperf/components/actions/runs/5208302373/jobs/9396736711#step:3:2)/src/scripts/run.sh

==> Setup PHP
✓ PHP Updated to PHP 8.1.18

==> Setup Extensions
✓ redis Enabled
✓ pdo Enabled
✓ pdo_mysql Enabled
✓ bcmath Enabled
✓ swoole-[5](https://github.com/friendsofhyperf/components/actions/runs/5208302373/jobs/9396736711#step:3:5).0.1 Installed and enabled

==> Setup Tools
✓ composer Added composer 2.5.[7](https://github.com/friendsofhyperf/components/actions/runs/5208302373/jobs/9396736711#step:3:7)
✓ php-config Added php-config [8](https://github.com/friendsofhyperf/components/actions/runs/5208302373/jobs/9396736711#step:3:8).1.18

@huangdijia huangdijia added the bug Something isn't working label Jun 8, 2023
@shivammathur
Copy link
Owner

Please specify the libraries, without them, it fails to compile and fallbacks to use the extension from the ubuntu package.

- name: Setup PHP
  uses: shivammathur/setup-php@verbose
  with:
    php-version: 8.1
    extensions: redis, pdo, pdo_mysql, bcmath, swoole-5.0.3
    tools: phpize
    coverage: none
    ini-values: swoole.use_shortname=Off
  env:
    SWOOLE_LIBS: libc-ares-dev libcurl4-openssl-dev libpq-dev libbrotli-dev
    SWOOLE_CONFIGURE_OPTS: --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql --enable-brotli

@huangdijia
Copy link
Author

Thanks!

@huangdijia
Copy link
Author

huangdijia commented Jun 8, 2023

https://github.com/friendsofhyperf/components/actions/runs/5208821156/jobs/9397868165

downloading swoole-5.0.3.tgz ...
Starting to download swoole-5.0.3.tgz (2,066,852 bytes)
......................................................................................................................................................................................................................................................................................................................................................................................................................done: 2,066,852 bytes
471 source files, building
running: phpize
Configuring for:
PHP Api Version:         20210902
Zend Module Api No:      20210902
Zend Extension Api No:   420210902
configure.ac:22: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
build/php.m4:2111: PHP_CONFIG_NICE is expanded from...
configure.ac:22: the top level
config.m4:334: warning: The macro `AC_PROG_CC_C99' is obsolete.
config.m4:334: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
config.m4:334: the top level
configure.ac:165: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:165: You should run autoupdate.
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:165: the top level
enable sockets supports? [no] : enable mysqlnd support? [no] : building in /tmp/pear/temp/pear-build-rootvB62Qw/swoole-5.0.3
running: /tmp/pear/temp/swoole/configure --with-php-config=/usr/bin/php-config --enable-sockets=no --enable-openssl=yes --enable-mysqlnd=no --enable-swoole-curl=yes --enable-cares=yes --enable-brotli=yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
env:
    SWOOLE_LIBS: libc-ares-dev libcurl4-openssl-dev libpq-dev libbrotli-dev
    SWOOLE_CONFIGURE_OPTS: --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql --enable-brotli

--enable-swoole-pgsql is lost。

@shivammathur shivammathur reopened this Jun 8, 2023
@shivammathur
Copy link
Owner

@huangdijia

swoole does not have support for that parameter in its package.xml, so PECL does not add it. Please ask upstream to add support for it.
https://github.com/swoole/swoole-src/blob/master/package.xml#L2411

@huangdijia
Copy link
Author

swoole/swoole-src#5081 Fixed

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

2 participants