edgelesssys / ego

EGo is an open-source SDK that enables you to develop your own confidential apps in the Go programming language.
https://www.edgeless.systems/products/ego/
Mozilla Public License 2.0
512 stars 51 forks source link

Unable to sign compiled executable #260

Closed harshu4 closed 5 months ago

harshu4 commented 8 months ago

Issue description

I am not able to sign my compiled binary. I am able to build and sign binary of the samples provided but when i try to compile and sign my own code it gives the following error

EGo v1.5.0 (952087dd77320d37883d446c97bb21317163e0dc) ERROR: The .oeinfo section is missing in the binary. Maybe the binary was not built with 'ego-go build'?

To reproduce

Steps to reproduce the behavior:

  1. git clone https://github.com/harshu4/openmesh-node
  2. cd openmesh-node
  3. ego-go build /cmd/app/main.go
  4. ego sign

Expected behavior

Expected behaviour would be that the binary is signed properly

harshu4 commented 8 months ago

used to work with older version of ego

thomasten commented 8 months ago

Thanks for reporting! I can confirm that this behavior is caused by the update to Go 1.21 with EGo 1.5.0. Your go.mod specifies 1.22. Since Go 1.21, Go will download the newer toolchain in this case. So it effectively builds with the original go instead of ego-go. We'll investigate how we can best handle this in ego-go. For now, please edit your go.mod and set the version to 1.21. Then rebuild with ego-go.

thomasten commented 5 months ago

fixed in v1.5.2