tpm2dev / tpm.dev.docker

Docker image for TPM 2.0 development from TPM.dev
https://tpm.dev
MIT License
11 stars 5 forks source link

openssl libraries for tpm2-openssl are wrong #7

Open iolivergithub opened 3 years ago

iolivergithub commented 3 years ago

Currently commented out in the Dockerfile.release. During the compile of the tpm2-openssl I get this error. Tried solving it using libssl-dev but seems not to work. Wouldn't like to specifically compile openssl into this but it is an option. If anyone has a better idea then please solve :-)

So, libssl-dev is the wrong version:

RUN apt update -yq && \
    DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
  apt -y install libssl-dev

Error from ./compile here:

#34 9.558 checking for CRYPTO... no
#34 9.565 configure: error: Package requirements (libcrypto >= 3.0.0) were not met:
#34 9.565 
#34 9.565 Requested 'libcrypto >= 3.0.0' but version of OpenSSL-libcrypto is 1.1.1f
#34 9.565 
#34 9.565 Consider adjusting the PKG_CONFIG_PATH environment variable if you
#34 9.565 installed software in a non-standard prefix.
#34 9.565 
#34 9.565 Alternatively, you may set the environment variables CRYPTO_CFLAGS
#34 9.565 and CRYPTO_LIBS to avoid the need to call pkg-config.
#34 9.565 See the pkg-config man page for more details.
------
failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c ./bootstrap &&     ./configure &&     make &&     make install]: runc did not terminate sucessfully
make: *** [Makefile:39: all] Error 1
tomoveu commented 3 years ago

This seems like a tpm2-openssl issue with Ubuntu versioning of OpenSSL. I do not think this is a Docker issue. I may be wrong.