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

spx.so: undefined symbol: gc_globals #239

Open
sergeypechenyuk opened this issue Jan 11, 2024 · 4 comments
Open

spx.so: undefined symbol: gc_globals #239

sergeypechenyuk opened this issue Jan 11, 2024 · 4 comments

Comments

@sergeypechenyuk
Copy link

sergeypechenyuk commented Jan 11, 2024

There was an identical ticket #188, but how to solve the problem is not described

OS: Centos8

$ php74 -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'spx.so' (tried: /opt/remi/php74/root/usr/lib64/php/modules/spx.so (/opt/remi/php74/root/usr/lib64/php/modules/spx.so: undefined symbol: gc_globals), /opt/remi/php74/root/usr/lib64/php/modules/spx.so.so (/opt/remi/php74/root/usr/lib64/php/modules/spx.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'spx.so' (tried: /opt/remi/php74/root/usr/lib64/php/modules/spx.so (/opt/remi/php74/root/usr/lib64/php/modules/spx.so: undefined symbol: gc_globals), /opt/remi/php74/root/usr/lib64/php/modules/spx.so.so (/opt/remi/php74/root/usr/lib64/php/modules/spx.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.33 (cli) (built: Aug  1 2023 08:46:35) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
    with Xdebug v3.1.6, Copyright (c) 2002-2022, by Derick Rethans
$ ls -l /opt/remi/php74/root/usr/lib64/php/modules/spx.so
-rwxr-xr-x 1 root root 363440 Jan 11 08:35 /opt/remi/php74/root/usr/lib64/php/modules/spx.so

What should I do to make the module work?

@NoiseByNorthwest
Copy link
Owner

Are you sure that spx.so is built with php7.4 dev package ?

@sergeypechenyuk
Copy link
Author

Yes, for 7.4

$ phpize -v
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902

@NoiseByNorthwest
Copy link
Owner

But loading your spx.so seems to require the existence of gc_globals global var which is private (non extern) since php7.3, so it really looks like spx.so has been built with php7.2 or older.

The patch making gc_globals private php/php-src@baa9890#diff-73f4feabd42f36a08c6fcf95029444538908ab8df3cd9c5790edf7d72e7e6d34L118

$ git tag --contains baa9890112a863f10e62bbb4c5a1623642a5db3c | sort | head
php-7.3.0
php-7.3.0RC6
php-7.3.1
php-7.3.10
php-7.3.10RC1
php-7.3.11
php-7.3.11RC1
php-7.3.12
php-7.3.12RC1
php-7.3.13

Could you show me the output of strings /opt/remi/php74/root/usr/lib64/php/modules/spx.so | grep API20 ?

@sergeypechenyuk
Copy link
Author

Return 'API20170718,NTS' and this is 7.2. I'll look for why it doesn't compile correctly

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

No branches or pull requests

2 participants