1
votes

I have been receiving the following compilation errors when running the following docker command in the picco, an MPC compiler, directory and after cloning the MPC-SoK/frameworks github repo:

docker build -t picco .
  • Forward declaration of 'struct evp_cipher_ctx'
  • 'std::pair<_T1, _T2>::second' has incomplete type
  • 'EVP_CIPHER_CTX en' has initializer but incomplete type

I have seen many related github and stack exchange tickets and posts pertaining to one or more of these specific errors and none have actually supplied workable solutions to them, such as:

It seems that the first and third errors are due to updates in Openssl however I have tried running fresh Ubuntu 16.04 and 18.04 VMs with 1.0.1, 1.0.2, 1.1.0, and 1.1.1 of openssl and on Mac OSX High Sierra with openssl 1.0.2, all with the same point of failure and all with the same three classes of errors.

I have also tried the solution of here where I manually went in and changed the EVP_CIPHER_CTX variables to pointers and used their associated freeing function. This too, did not work.

I would like to know if anyone has seen and successfully fixed these errors before, and if so what they did, on what machine, and with which dependencies if possible?

1
Can you include the link to the GitHub repo that you cloned?Reinier Torenbeek
@ReinierTorenbeek I have added the link to the repo.z.karl
Thanks, that helped -- see my answer.Reinier Torenbeek

1 Answers

2
votes

Looking at the repository that you mentioned, the Dockerfile starts with the following:

FROM ubuntu:latest
WORKDIR /root
RUN apt-get update && apt-get install -y \
  bison \
  flex \
  g++ \
  git \
  libgmp-dev \
  libssl-dev \
  make \
  python \
  vim

One of the packages installed is libssl-dev, which has no indication of the version. Now ubuntu:latest is the latest Ubuntu LTS, for which currently some openssl 1.1 version is the standard. That breaks your build, as you had figured out already.

It looks like the only thing you need to change is the selection of the libssl-dev package in Dockerfile, you have to replace it with libssl1.0-dev. That will install a 1.0.2 version of OpenSSL, for which the code was written. I found the name of that 1.0 versioned openssl package on this Ubuntu 18.04 openssl package information page.