Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build remote attestation example on Ubuntu 22.04 after upgrade, undefined reference to `EVP_PKEY_id' #228

Open
itssme opened this issue Sep 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@itssme
Copy link

itssme commented Sep 26, 2023

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:

  1. Update Ubuntu 22.04: sudo apt update && sudo apt upgrade
  2. sudo snap install ego-dev --classic
  3. sudo apt install build-essential libssl-dev
  4. git clone https://github.com/edgelesssys/ego.git
  5. cd ego/samples/remote_attestation/
  6. ego-go build
  7. ego sign server
EGo v1.4.1 (8b99356398dd3bcb5f74e5194d20ce421f607404)
Generating new private.pem
  1. sudo ego run server
EGo v1.4.1 (8b99356398dd3bcb5f74e5194d20ce421f607404)
[erthost] loading enclave ...
[erthost] entering enclave ...
[ego] starting application ...
listening ...
  1. 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

@thomasten thomasten added the bug Something isn't working label Sep 26, 2023
@thomasten
Copy link
Member

thomasten commented Sep 26, 2023

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

@itssme
Copy link
Author

itssme commented Oct 2, 2023

Thanks for the quick response. I am using the DEB package now and it works fine 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants