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

Fix out of sources tree build #5239

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

remicollet
Copy link
Contributor

@remicollet remicollet commented Jan 24, 2024

Broken by eb9a16e and 03b2639

Notice: pecl build use out of sources tree build

So tagged version 5.1.2 will be unusable there

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2dcfef9) 72.95% compared to head (7df66e1) 72.96%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5239      +/-   ##
==========================================
+ Coverage   72.95%   72.96%   +0.01%     
==========================================
  Files          69       69              
  Lines       14858    14858              
==========================================
+ Hits        10839    10841       +2     
+ Misses       4019     4017       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@remicollet
Copy link
Contributor Author

Notice: It will be nice to use some out of sources tree build in CI

phpize
mkdir cibuild
cd bibuild
../configure
make

@remicollet
Copy link
Contributor Author

remicollet commented Jan 24, 2024

Notice, pecl-install.sh is not enough

See https://github.com/swoole/swoole-src/actions/runs/7635384707/job/20800724466
Some file (ex php_swoole_cxx) are not build.

Yes, the extension is built, but with mising sources it is unusable

Ex:

$  /usr/bin/php --no-php-ini -d extension=curl -d extension=sockets -d extension=mysqlnd -d extension=pdo --define extension=/dev/shm/BUILDROOT/php-pecl-swoole5-5.1.2-1.fc39.remi.8.2.x86_64/usr/lib64/php/modules/swoole.so --modules

Warning: PHP Startup: Unable to load dynamic library '/dev/shm/BUILDROOT/php-pecl-swoole5-5.1.2-1.fc39.remi.8.2.x86_64/usr/lib64/php/modules/swoole.so'
  (tried: /dev/shm/BUILDROOT/php-pecl-swoole5-5.1.2-1.fc39.remi.8.2.x86_64/usr/lib64/php/modules/swoole.so
  (/dev/shm/BUILDROOT/php-pecl-swoole5-5.1.2-1.fc39.remi.8.2.x86_64/usr/lib64/php/modules/swoole.so: undefined
  symbol: sw_zend_known_strings),
  /usr/lib64/php/modules//dev/shm/BUILDROOT/php-pecl-swoole5-5.1.2-1.fc39.remi.8.2.x86_64/usr/lib64/php/modules/swoole.so.so
  (/usr/lib64/php/modules//dev/shm/BUILDROOT/php-pecl-swoole5-5.1.2-1.fc39.remi.8.2.x86_64/usr/lib64/php/modules/swoole.so.so:
  cannot open shared object file: No such file or directory)) in Unknown on line 0

So, adding such a minimal load test may be useful too.

@remicollet
Copy link
Contributor Author

remicollet commented Jan 24, 2024

So, adding such a minimal load test may be useful too.

Second commit add such a test

P.S. Notice, the check will work fully when PHP is built using --enable-rtld-now

@matyhtf matyhtf merged commit 9c08e1a into swoole:master Jan 24, 2024
41 of 43 checks passed
@remicollet remicollet deleted the issue-out-of-tree branch January 24, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants