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

Could not load liboqs shared library in fedora 36 #51

Closed
evil-user opened this issue Jun 25, 2022 · 6 comments
Closed

Could not load liboqs shared library in fedora 36 #51

evil-user opened this issue Jun 25, 2022 · 6 comments

Comments

@evil-user
Copy link

evil-user commented Jun 25, 2022

@vsoftco @dstebila @baentsch I followed the instructions in liboqs python wrapper to install as a shared library (make -GNinja -DBUILD_SHARED_LIBS=ON ..). Then I cloned liboqs-python and setup a venv called test inside. I then installed setup.py. I then tried to run the kem example with python3 examples/kem.py but the code breaks because it could not load the liboqs library. I have tried multiple variants of liboqs shared library command but I have not gotten any of them to work. Am I doing something wrong or missing a step?

i am using fedora 36 with openssl-devel package instead of libssl-dev , everything compiles really well and checked env and followed all precaution measures in issue #28

@evil-user evil-user changed the title Could not load liboqs shared library in fdedora 36 Could not load liboqs shared library in fedora 36 Jun 25, 2022
@evil-user
Copy link
Author

i am having openssl 3.0.3 and python3 setup.py gives warnings :-

zipsafe flag not set analyzing contents.
usr/1ib/python3.16/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip an
| other standards-based tools.

usr/1ib/python3.10/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy install command is deprecated. Use build
and pip and other standards-based tools.

@baentsch
Copy link
Member

To better understand your issue, could you please provide output of these commands on your installation:

ls $PYTHONPATH
ls $LD_LIBRARY_PATH
ldd $LD_LIBRARY_PATH/liboqs.so

@evil-user
Copy link
Author

evil-user commented Jun 26, 2022

@baentsch output of above commands: -

ls $PYTHONPATH displays contents of liboqs-python folder and additionally build , dist , liboqs-python.egg-info folders

ls $LD_LIBRARY_PATH displays ls: cannot access ':/usr/local/lib': no such file or directory

ldd $LD_LIBRARY_PATH/liboqs.so displays ldd: :/usr/local/lib/liboqs.so': no such file or directory

@baentsch
Copy link
Member

Well, then you have the answer to your question: You did not install liboqs, i.e., did not run ninja install as per https://github.com/open-quantum-safe/liboqs-python#pre-requisites.

Alternatively, find the location of liboqs.so on your machine and point LD_LIBRARY_PATH to that directory.

@evil-user
Copy link
Author

thank you.

@ArkS0001
Copy link

ArkS0001 commented Aug 25, 2024

I have already set oqs.dll to system path still cant load shared library

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