cryptimeleon / mclwrap

A wrapper to bring the mcl pairing library into cryptimeleon
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Investigate MCL Installation Script for Windows #3

Closed rheitjoh closed 4 years ago

rheitjoh commented 4 years ago

Currently, the install_mcl.sh script has only been tested on Linux (Ubuntu 18.04) and MacOS. We should add Windows support to it if possible and test it.

rheitjoh commented 4 years ago

So I've tried to compile the mcl library on windows, but I was not successful.

The maintainer provides three options in the readme file:

First, use his mklib and mk scripts to compile the library and run the tests. After installing Visual Studio together with C++ build tools and the Windows 10 SDK, the compilation was successful. However, running the tests via the mk command was not, there were many external symbols from GMP missing, and the mpir library provided by the cybozu_ext repository had mismatching module (x64) and target architecture (x86).

The second option, using msbuild with the .sln file also did not work. Probably due to the .sln being too old and requiring older Visual Studio 2013 build tools.

The third option used cmake which requires the additional installation of the CMake build tools for Visual Studio. Here, the msbuild command failed due to the command being unable to open files mclbn512.lib and mclbn384_256.lib.

rheitjoh commented 4 years ago

I got the first option working after all by changing the target architecture in the VS 2019 Developer Command Prompt to x64.

rheitjoh commented 4 years ago

I have added a tutorial to the readme for Windows installation. Not sure whether I will make an installation script since there are differences between Visual Studio versions for the installation and the user would have to provide the Visual Studio, the Java home, and the Java DLL path.