-
Notifications
You must be signed in to change notification settings - Fork 670
Platform specific notes for building liboqs
- OpenBSD
- Building on Windows using MSYS2 and Mingw
- Cross-compiling on Linux for ARM
- Cross-compiling on Debian/Ubuntu Linux for Windows
- Cross-compiling on Arch Linux for Windows
Install the dependencies using pkg_add:
pkg_add cmake ninja
pkg_add -r python
pip3 install pytest pytest-xdistThen proceed with the remaining instructions here.
- Install required components:
Using the mingw64.exe shell:
pacman -S git \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-ninja \
mingw-w64-x86_64-python-pytest \
mingw-w64-x86_64-python-pytest-xdist \
mingw-w64-x86_64-toolchainUsing mingw32.exe shell:
pacman -S git \
mingw-w64-i686-cmake \
mingw-w64-i686-ninja \
mingw-w64-i686-python-pytest \
mingw-w64-i686-python-pytest-xdist \
mingw-w64-i686-toolchainand continue according to paragraph 2 of the quick-start instructions for building liboqs.
Binaries for ARM can be cross-compiled on Linux. In order to do so, you need to supply CMake with an appropriate toolchain file.
For example, to cross compile for a Raspberry Pi on an x86-64 Ubuntu Bionic machine:
apt install gcc-8-arm-linux-gnueabihf
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../.CMake/toolchain_rasppi.cmake -DOQS_USE_OPENSSL=OFF ..
ninjaAt present, there is a known bug involving running qTESLA on ARM: see issue #578.
Binaries for Windows AMD64 can be cross-compiled on Linux. In order to do so, you need to supply CMake with an appropriate toolchain file. The following example shows how to use the toolchain for Windows AMD64 compilation. The subsequent section shows how build using a different approach.
apt install gcc-mingw-w64
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../.CMake/toolchain_windows-amd64.cmake ..
ninja-
You need to enable the ownstuff repository.
-
Install required components:
pacman -S git \
mingw-w64-cmake \
mingw-w64-openssl \
mingw-w64-toolchain \
ninja- Get the source:
git clone -b master https://github.com/open-quantum-safe/liboqs.git
cd liboqs- And build:
mkdir build && cd build
x86_64-w64-mingw32-cmake .. -GNinja
ninjamkdir build && cd build
i686-w64-mingw32-cmake .. -GNinja
ninja