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

openssl 3.0.2 #40

Closed
alexanderbsd opened this issue Jun 12, 2022 · 8 comments
Closed

openssl 3.0.2 #40

alexanderbsd opened this issue Jun 12, 2022 · 8 comments

Comments

@alexanderbsd
Copy link

Hi there,

I am getting this issue after trying to compile pymgclient on Ubuntu 22.04. Could you help please? thanks

ImportError:miniconda3/envs/eth/lib/python3.10/site-packages/mgclient.cpython-310-x86_64-linux-gnu.so: undefined symbol: SSL_get1_peer_certificate

@antaljanosbenjamin
Copy link
Contributor

Hi @alexanderbsd,

Currently mgclient/pymgclient doesn't support Ubuntu 22.04 and OpenSSL 3. It was on our radar to make it work, but because of your request we will prioritize this one. Hopefully we can release a new version of pymgclient that supports OpenSSL 3 in the next two weeks. If no big changes are necessary in our code base, it is even possible that it will arrive this week.

In any case, I will keep you updated through this issue.

@antaljanosbenjamin
Copy link
Contributor

After checking out what has changed in OpenSSL 3.0 based on the migration guide I would say the issue is not necessarily with OpenSSL 3.0 (I was able to compile pymgclient on an Ubuntu 22.04 docker container and connected to a Memgraph instance using SSL connections without any issues.

My assumption is pymgclient compiles with OpenSSL 3.0 without any issues, but when you try to load it, it somehow finds the OpenSSL 1.1.1 library. I will try to reproduce the issue on my machine and get back to you. In the meantime, could you please provide some information how did you install pymgclient?

@alexanderbsd
Copy link
Author

You are right. Looks like conda comes with openssl-1.1.1 by default. I had to install openssl-3 from conda-forge and rebuild the package. All works right now, thank you.

@antaljanosbenjamin
Copy link
Contributor

In the meantime I found a solution for the conflict between the OpenSSL version of conda and the operating system. I couldn't convince the conda based setuptools to use OpenSSL from OS, but I could managed to instruct the CMake config of mgclient to use the OpenSSL libraries from conda. However the default g++ will complain about some warnings, therefore I had to install clang-12, but after that the following command did the job:

CC=clang-12 CXX=clang++-12 OPENSSL_INCLUDE_DIR=/home/ubuntu/miniconda3/include OPENSSL_ROOT_DIR=/home/ubuntu/miniconda3 OPENSSL_LIBRARIES=/home/ubuntu/miniconda3/lib pip install pymgclient --no-cache

With the OPENSSL_XXX variables you can use a separate version of OpenSSL in your conda environment than the OpenSSL version of the OS in case of any of the packages doesn't work with OpenSSL 3.0.

I am already working on to update mgclient to work with the newest GCC version, so probably we can manage to release a new version of pymgclient that works without clang.

@antaljanosbenjamin
Copy link
Contributor

The latest release, pymgclient 1.3.0 addresses the issue. You can also use PyPI to download pymgclient.

@alexanderbsd
Copy link
Author

just upgraded - works well, no issues. Thanks!

@antaljanosbenjamin
Copy link
Contributor

Glad to hear that! If you encounter any other issues, feel free to let us know again!

@katarinasupe
Copy link

Might be related: memgraph/gqlalchemy#294, #54

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

3 participants