You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2024. It is now read-only.
I have Fedora 30. I built the extension from sources using build.sh and installed it using make install.
After enabling the extension I got the following warning when running php -v:
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/remi/php71/root/usr/lib64/php/modules/aerospike.so' - /opt/remi/php71/root/usr/lib64/php/modules/aerospike.so: undefined symbol: sk_pop_free in Unknown on line 0
Details
The problem is that Fedora 30 uses OpenSSL in version 1.1 by default and this version has symbol OPENSSL_sk_pop_free instead. The older OpenSSL 1.0 used to have symbol sk_pop_free.
I found out that the code that requires this symbol is not required by aerospike-client-php itself but by its dependency aerospike-client-c.
The build.sh script internally calls scripts/aerospike-client-c.sh that takes care of downloading the right libaerospike.a binary. It first detects what is the distribution/version of the running OS using scripts/os_version.sh and then downloads certain package that contains the pre-compiled library.
However, Fedora 30 (or Fedora 16 and higher to be more precise) is detected as Red Hat Enterprise Linux 7. Therefore the scripts/aerospike-client-c.sh script downloads aerospike-client-c-devel-4.5.0-1.el7.x86_64.rpm for my system.
This package contains a binary that is compiled for OpenSSL 1.0 and therefore it contains references to sk_pop_free symbol.
Fedora 30 uses OpenSSL 1.1 by default, meaning that /usr/lib64/libcrypto.so links to libcrypto.so.1.1.1b. But it also has compat-openssl10 package that provides old OpenSSL 1.0 API by /usr/lib64/libcrypto.so.10 symlink that links to libcrypto.so.1.0.2o.
When the aerospike-client-php extension is linked, the following command is used:
Notice the -lcrypto. This links the default /usr/lib64/libcrypt.so library that is from OpenSSL 1.1.
Workarounds
I managed to link the 1.0 library by executing the command with -l:libcrypto.so.10 instead of -lcrypto.
I also managed to fix the problem by compiling aerospike-client-c from sources automatically linking to the OpenSSL 1.1.
Then I had to rerun the build of aerospike-client-php using the following command:
where ~/git_projects/aerospike-client-c/ is path to the manually compiled aerospike-client-c.
Proposed solutions
I guess you can either provide different binary package for new Fedora releases that would contain libaerospike.a linked for OpenSSL 1.1 or you can change the build so that it requires/links specifically version 1.0 of OpenSSL.
Or, maybe you could change the build process of the aerospike-client-php package in a way that it would automatically compile aerospike-client-c instead of downloading a pre-compiled library.
The text was updated successfully, but these errors were encountered:
Briefly
I have Fedora 30. I built the extension from sources using
build.sh
and installed it usingmake install
.After enabling the extension I got the following warning when running
php -v
:Details
The problem is that Fedora 30 uses OpenSSL in version 1.1 by default and this version has symbol
OPENSSL_sk_pop_free
instead. The older OpenSSL 1.0 used to have symbolsk_pop_free
.I found out that the code that requires this symbol is not required by aerospike-client-php itself but by its dependency aerospike-client-c.
The
build.sh
script internally callsscripts/aerospike-client-c.sh
that takes care of downloading the rightlibaerospike.a
binary. It first detects what is the distribution/version of the running OS usingscripts/os_version.sh
and then downloads certain package that contains the pre-compiled library.However, Fedora 30 (or Fedora 16 and higher to be more precise) is detected as Red Hat Enterprise Linux 7. Therefore the
scripts/aerospike-client-c.sh
script downloads aerospike-client-c-devel-4.5.0-1.el7.x86_64.rpm for my system.This package contains a binary that is compiled for OpenSSL 1.0 and therefore it contains references to
sk_pop_free
symbol.Fedora 30 uses OpenSSL 1.1 by default, meaning that
/usr/lib64/libcrypto.so
links tolibcrypto.so.1.1.1b
. But it also hascompat-openssl10
package that provides old OpenSSL 1.0 API by/usr/lib64/libcrypto.so.10
symlink that links tolibcrypto.so.1.0.2o
.When the aerospike-client-php extension is linked, the following command is used:
Notice the
-lcrypto
. This links the default/usr/lib64/libcrypt.so
library that is from OpenSSL 1.1.Workarounds
I managed to link the 1.0 library by executing the command with
-l:libcrypto.so.10
instead of-lcrypto
.I also managed to fix the problem by compiling aerospike-client-c from sources automatically linking to the OpenSSL 1.1.
Then I had to rerun the build of aerospike-client-php using the following command:
where
~/git_projects/aerospike-client-c/
is path to the manually compiled aerospike-client-c.Proposed solutions
I guess you can either provide different binary package for new Fedora releases that would contain
libaerospike.a
linked for OpenSSL 1.1 or you can change the build so that it requires/links specifically version 1.0 of OpenSSL.Or, maybe you could change the build process of the aerospike-client-php package in a way that it would automatically compile aerospike-client-c instead of downloading a pre-compiled library.
The text was updated successfully, but these errors were encountered: