2

I am not a developer.

I am trying to build the Open Quantum Safe (OQS) variant of OpenSSL using an Ubuntu VM.

Everything worked great up until the last step where I do "make -j", where I am getting fatal errors. Examples of the fatal errors are

  In file included from include/openssl/x509.h:18,

  from apps/apps.c:29:

  include/openssl/evp.h:18:11: fatal error: oqs/oqs.h: No such file or directory

  18 | # include <oqs/oqs.h>

  |           ^~~~~~~~~~~

  compilation terminated.

I have tried several things, but just cannot past it, for example, checking that the system has openssl (openssl version = OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022))

Any ideas of how to correct these fatal errors?

3
  • 2
    the OQS library was not properly installed
    – Saxtheowl
    Apr 9, 2023 at 11:45
  • 2
    What version of Ubuntu?
    – David
    Apr 9, 2023 at 12:18
  • @David: it is release 22.10, kinetic.
    – Moo
    Apr 9, 2023 at 12:42

1 Answer 1

2

Your OQS library was not properly installed, to fix that you gonna have to follow these steps, first we install the needed dependencies

sudo apt-get update
sudo apt-get install -y build-essential git cmake python3 libssl-dev

Then we clone the liboqs repo

git clone https://github.com/open-quantum-safe/liboqs.git

we install it

cd liboqs
mkdir build
cd build
cmake -GNinja -DOQS_USE_OPENSSL=1 ..
ninja
sudo ninja install

Then we clone the OQS-OpenSSL repo

cd ~
git clone https://github.com/open-quantum-safe/openssl.git

then we build it

cd openssl
./Configure shared --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64
make -j

Normaly it should work, if not try

./Configure shared --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64 -I/usr/local/include -L/usr/local/lib
make -j

then we install it sudo make install

last we update the LD_LIBRARY_PATH environment variable.

export LD_LIBRARY_PATH=/usr/local/ssl/lib:$LD_LIBRARY_PATH

edit:

You should have liboqs.so present in /usr/local/lib, if not there there was a problem with the install of OQS library. Run the ./Configure command

cd ~/openssl
./Configure shared --prefix=/usr/local/ssl --openssldir=/usr/local/ssl linux-x86_64 -I/usr/local/include -L/usr/local/lib -DOQS_DIR=/usr/local

then

make -j

then we try sudo make install

4
  • It got much further, but had an issue on "sudo make install", with "No OQS library directory found to install. Exiting install with failure. exit 1 make: *** [Makefile:454: install_runtime_libs] Error 1"
    – Moo
    Apr 9, 2023 at 12:10
  • I updated my answer.
    – Saxtheowl
    Apr 9, 2023 at 12:45
  • There is a liboqs.a, but no liboqs.so, even after the ./Configure command.
    – Moo
    Apr 9, 2023 at 14:23
  • I do not think there was anything wrong with what you wrote or with what I did, I think there is an issue with the code base. I loaded the newer Docker image and that worked, although I am still working through all that newness. I will accept your answer - thanks for the help!
    – Moo
    Apr 11, 2023 at 2:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .