Score:2

Make -j Failing for OQS Openssl

ck flag
Moo

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?

Saxtheowl avatar
iq flag
the OQS library was not properly installed
David avatar
cn flag
What version of Ubuntu?
Moo avatar
ck flag
Moo
@David: it is release 22.10, kinetic.
Score:2
iq flag

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

Moo avatar
ck flag
Moo
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"
Saxtheowl avatar
iq flag
I updated my answer.
Moo avatar
ck flag
Moo
There is a liboqs.a, but no liboqs.so, even after the ./Configure command.
Moo avatar
ck flag
Moo
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!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.