aerospike-client-python icon indicating copy to clipboard operation
aerospike-client-python copied to clipboard

Python2.7 undefined symbol: sk_pop_free

Open harshvladha opened this issue 8 years ago • 6 comments

I am running Python in a debian based system and when I do import aerospike I get error undefined symbol: sk_pop_free

Followed procedure which is given at http://www.aerospike.com/docs/client/python/install

Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import aerospike
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python2.7/dist-packages/aerospike.so: undefined symbol: sk_pop_free

Did I miss anything to install?

harshvladha avatar Jul 07 '17 09:07 harshvladha

Hi @harshvladha ,

If you could share what what version of your operating system you are using that would be helpful.

Also if you could tell us if you installed aerospike with sudo pip install aerospike pip, or by manually compiling the extension would be helpful as well.

From first glance It looks like the issue is coming from a symbol from an SSL library not being found while the extension was being built.

If you could verify that you have openssl and the libssl-dev package installed that may help to diagnose the issue further.

aerospikerobertmarks avatar Jul 07 '17 16:07 aerospikerobertmarks

Hi @aerospikerobertmarks,

I used sudo pip install aerospike and also installed all the required packages (including openssl-devel)

OS version: x86_64 GNU/Linux

My friend tried compiling with gnutls after that when I do import aerospike in Python Interpreter I get error: SSL_CTX_set1_param

I verified that we have openssl and libssl-dev installed on the box.

harshvladha avatar Jul 10 '17 09:07 harshvladha

Hello,

I have noticed same error trying to make aerospike-client-python work wiith Debian Stretch 9.0 (latest stable) apparently latest versions of libssl-dev are not compatible with this client. Maybe @harshvladha uses Stretch or recently upgraded to it..

notRomualdas avatar Jul 12 '17 07:07 notRomualdas

Thanks for the additional information about stretch 9.0 and the libssl-dev package, we'll look into the issue and alert you when we have a fix.

aerospikerobertmarks avatar Jul 12 '17 16:07 aerospikerobertmarks

Stretch moved to OpenSSL 1.1 which has non-backward-comaptible APIs to 1.0x, and I believe is the first major distro to do so ( as all the Ubuntu are delayed version of debian, and redhat / centos hasn't picked it up ). It will take some time for all apps to move to code that can compile with both OpenSSLs, stretch has been around in pre-release forms for a year but we simply didn't try it until later, and we'll work on it, but just to let you know the background. Our enterprise server ( which does cert auth through OpenSSL ) has also been hit by this 1.1 change.

We can't suggest you move your default open-ssl back to 1.0, but if you're really stuck, you can probably hack around this by compiling in an environment where the dev SSL is 1.0x, then running where both the 1.0x SSL runtime, and the 1.1x runtime, is available. The linking system is decent about picking the right runtime, although with OpenSSL and all its sub-flavors, that can be tricky.

Again, we're working on a fix as robert says, but if you want a chance to work around, that should give you a clue of where to look. I'm sure Robert will update this thread when we release a fix - or take a pull request for a fix ( if you'd like to contribute!, this would be a fix to make aerospike-client-c compile, the update the submodule to point to the new version ).

bbulkow avatar Jul 12 '17 16:07 bbulkow

Thanks, @aerospikerobertmarks @notRomualdas @bbulkow for clearing all the issues, I earlier thought this might be the installation issue.

@bbulkow Other client libraries in java/golang are working fine, I will move to that without much of a problem (I used golang's benchmarking tool on the same box in which I was trying to use python client).

I'll look around the suggestion given for the contribution, and will update this thread when I am comfortable to initiate changes.

Thanks!

harshvladha avatar Jul 13 '17 06:07 harshvladha