Open zhp1254 opened 1 month ago
can not work with go build static
Steps to reproduce the behavior:
we want ego sign support ego-go build static
uname -a 6.5.0-1024-azure #25~22.04.1-Ubuntu SMP Mon Jun 17 18:38:57 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
error info : ERROR: /opt/ego/bin/ego-oesign ERROR: oe_sgx_build_enclave(): result=OE_FAILURE (0x1) 2024-09-09T10:00:16+0000.322210Z [(H)ERROR] tid(0x7aac2cdbf0c0) | ELF image is not a PIE or shared object (oe_result_t=OE_INVALID_IMAGE) [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/loadelf.c:_read_elf_header:95] 2024-09-09T10:00:16+0000.322227Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_INVALID_IMAGE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/loadelf.c:_load_elf_image:467] 2024-09-09T10:00:16+0000.322230Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_INVALID_IMAGE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/loadelf.c:_load_dependent_image:1500] 2024-09-09T10:00:16+0000.322232Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_INVALID_IMAGE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/loadelf.c:oe_load_elf_enclave_image:1546] 2024-09-09T10:00:16+0000.322234Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_INVALID_IMAGE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/load.c:oe_load_enclave_image:66] 2024-09-09T10:00:16+0000.322237Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_FAILURE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/create.c:oe_sgx_build_enclave:996]
libc must be dynamically linked. All other libs must be statically linked. See https://github.com/edgelesssys/ego/tree/master/samples/cgo
Issue description
can not work with go build static
To reproduce
Steps to reproduce the behavior:
Expected behavior
we want ego sign support ego-go build static
Additional info
uname -a 6.5.0-1024-azure #25~22.04.1-Ubuntu SMP Mon Jun 17 18:38:57 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
error info : ERROR: /opt/ego/bin/ego-oesign ERROR: oe_sgx_build_enclave(): result=OE_FAILURE (0x1) 2024-09-09T10:00:16+0000.322210Z [(H)ERROR] tid(0x7aac2cdbf0c0) | ELF image is not a PIE or shared object (oe_result_t=OE_INVALID_IMAGE) [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/loadelf.c:_read_elf_header:95] 2024-09-09T10:00:16+0000.322227Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_INVALID_IMAGE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/loadelf.c:_load_elf_image:467] 2024-09-09T10:00:16+0000.322230Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_INVALID_IMAGE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/loadelf.c:_load_dependent_image:1500] 2024-09-09T10:00:16+0000.322232Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_INVALID_IMAGE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/loadelf.c:oe_load_elf_enclave_image:1546] 2024-09-09T10:00:16+0000.322234Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_INVALID_IMAGE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/load.c:oe_load_enclave_image:66] 2024-09-09T10:00:16+0000.322237Z [(H)ERROR] tid(0x7aac2cdbf0c0) | :OE_FAILURE [/ertbuild/3rdparty/openenclave/openenclave-src/host/sgx/create.c:oe_sgx_build_enclave:996]