ego
ego copied to clipboard
Cannot build remote attestation example on Ubuntu 22.04 after upgrade, undefined reference to `EVP_PKEY_id'
Issue description
After performing a apt upgrade on ubuntu 22.04 I cannot build the example for remote attestation anymore. (it worked previously)
To reproduce
Steps to reproduce the behavior:
- Update Ubuntu 22.04:
sudo apt update && sudo apt upgrade
-
sudo snap install ego-dev --classic
-
sudo apt install build-essential libssl-dev
-
git clone https://github.com/edgelesssys/ego.git
-
cd ego/samples/remote_attestation/
-
ego-go build
-
ego sign server
EGo v1.4.1 (8b99356398dd3bcb5f74e5194d20ce421f607404)
Generating new private.pem
-
sudo ego run server
EGo v1.4.1 (8b99356398dd3bcb5f74e5194d20ce421f607404)
[erthost] loading enclave ...
[erthost] entering enclave ...
[ego] starting application ...
listening ...
-
EGOPATH=/snap/ego-dev/current/opt/ego CGO_CFLAGS=-I$EGOPATH/include CGO_LDFLAGS=-L$EGOPATH/lib go build ra_client/client.go
# command-line-arguments
/snap/go/10339/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /snap/ego-dev/current/opt/ego/lib/liboehostverify.a(key.c.o): in function `oe_private_key_from_engine':
key.c:(.text+0x3de): undefined reference to `EVP_PKEY_id'
/usr/bin/ld: /snap/ego-dev/current/opt/ego/lib/liboehostverify.a(key.c.o): in function `oe_private_key_read_pem':
key.c:(.text+0xaab): undefined reference to `EVP_PKEY_id'
/usr/bin/ld: /snap/ego-dev/current/opt/ego/lib/liboehostverify.a(key.c.o): in function `oe_public_key_read_pem':
key.c:(.text+0xfdb): undefined reference to `EVP_PKEY_id'
collect2: error: ld returned 1 exit status
Expected behavior
The example should compile without an error.
Additional info
sudo apt search libssl-dev
Sorting... Done
Full Text Search... Done
libssl-dev/jammy-updates,jammy-security,now 3.0.2-0ubuntu1.10 amd64 [installed]
Secure Sockets Layer toolkit - development files
Normal go compiler has been installed via snap:
sudo snap install go --classic
go 1.21.1 from Canonical✓ installed
Seems like the function MVP_PKEY_id
has been renamed in newer version of libssl:
https://manpages.debian.org/testing/libssl-doc/EVP_PKEY_id.3ssl.en.html#HISTORY
Thanks for reporting! We can confirm that using the EGo snap on Ubuntu 22.04, you can't build the remote attestation client. (But you can build and run the server.)
There are two workarounds:
- Build the client using the ego-dev container:
docker run --rm -v$PWD:$PWD -w$PWD ghcr.io/edgelesssys/ego-dev go build ra_client/client.go
- Use the DEB package instead of the snap
Thanks for the quick response. I am using the DEB package now and it works fine :+1: