Closed thias closed 3 years ago
Hi @thias,
The PHP client currently uses C client 4.6.5. So, for now, try using that.
Thanks @dwelch-spike, that mostly worked indeed. Compilation completed, but now I get the following error while checking a trivial load of the module:
$ php --define extension=modules/aerospike.so --modules | grep aero
PHP Warning: PHP Startup: Unable to load dynamic library 'modules/aerospike.so' (tried: modules/aerospike.so (modules/aerospike.so: undefined symbol: g_as_log), /usr/lib64/php/modules/modules/aerospike.so.so (/usr/lib64/php/modules/modules/aerospike.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
The relevant bit being modules/aerospike.so: undefined symbol: g_as_log
It's the same message someone already reported in https://github.com/aerospike/aerospike-client-python/issues/119 but that doesn't give me much indication about what could be the actual problem.
I'm using a custom compat-aerospike-client-c-4.6.20-1.el7_9
rpm package built by myself, that includes the latest "common", "mod-lua" and "luajit" (the git modules for those in 4.6.20 don't specify any tag or commit), and compiled using make EVENT_LIB=libev USE_LUAJIT=1
on RHEL7 with libev 4.15.7. Given g_as_log
seems to be part of the "common" codebase, there must be some linking issue somewhere. I've forced the PHP modules to use the static libaerospike.a
with the same result, so the problem must be with aerospike-client-c
... here I go down the rabbit hole.
The issue was on my end: I'm too used to phpize/configure/make taking care of everything, and hadn't properly replicated all of the required CFLAGS and LDFLAGS overrides from build.sh. The build could benefit a lot from an updated config.m4 and from libaerospike using something like pkg-config... but that's another issue.
I've been preparing our PHP 7.3 environment to work with Aerospike, and I've encountered the following error:
Looking at https://www.aerospike.com/download/client/c/notes.html#5.0.0 I was able to find:
I'm using the latest versions of everything I could find, which includes the aerospike-client-c 5.1.0. I'll now try with 4.6.x, but maybe this should be fixed/updated in the php client module?