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

make in openenclave_test/ on SGX-machine fails with unresolved references during link phase. #122

Open
gapisback opened this issue Jun 23, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gapisback
Copy link
Collaborator

gapisback commented Jun 23, 2023

After fixing Makefiles to handle the reference(s) to certprotos/certifier.proto [ changes arising from fixes to address issue #116 ], the following simple make command fails on SGX-machine:

sgx-server:[60] $ pwd
/home/sgx/agurajada/certifier-framework-for-confidential-computing/openenclave_test

make

The fix to access certifier_service/certprotos/certifier.proto is working fine:

Processing /home/sgx/openenclave-bin/share/pkgconfig/../../include/openenclave/edl/sgx/switchless.edl.
Success.
../protobufs-bin/bin/protoc --cpp_out=. --proto_path=../../certifier_service/certprotos ../../certifier_service/certprotos/certifier.proto

Later we fail at link phase:

cc -g -c -nostdinc -m64 -fPIE -ftls-model=local-exec -fvisibility=hidden -fstack-protector-strong -fno-omit-frame-pointer
-ffunction-sections -fdata-sections -I/home/sgx/openenclave-bin/share/pkgconfig/../../include/openenclave/3rdparty/libc 
-I/home/sgx/openenclave-bin/share/pkgconfig/../../include/openenclave/3rdparty -I/home/sgx/openenclave-bin/share/pkgconfig/../../include  
-I.. -DOE_API_VERSION=2 ./attestation_t.c

g++ -o enclave ecalls.o attestation_t.o certifier.pb.o certifier.o support.o test_support.o simulated_enclave.o application_enclave.o attestation.o sealing.o 
/home/sgx/openenclave-bin/share/pkgconfig/../../lib/openenclave/enclave/objects-Debug/oeseal_gcmaes/seal_gcmaes.c.o -L/home/sgx/openenclave-bin/share/pkgconfig/../../lib/openenclave/enclave -nostdlib -nodefaultlibs -nostartfiles -Wl,--no-undefined -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--export-dynamic -Wl,-pie -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,now -Wl,-gc-sections -loeenclave -loelibcxx -loelibc -loesyscall -loecore -loecryptoopenssl -lopensslssl -lopensslcrypto -loelibc -loesyscall -loecore -L../protobufs-bin/lib -lprotobuf -loeenclave -loelibcxx -loelibc -loesyscall -loecore -loehostfs

/usr/bin/ld: test_support.o: in function `construct_standard_evidence_package(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, signed_claim_sequence*, signed_claim_sequence*, key_message*, key_message*, evidence_package*)':

Further failures:

/home/sgx/agurajada/certifier-framework-for-confidential-computing/openenclave_test/enclave/../../src/test_support.cc:151: undefined reference to `get_vse_clause_from_signed_claim(signed_claim_message const&, vse_clause*)'
/usr/bin/ld: /home/sgx/agurajada/certifier-framework-for-confidential-computing/openenclave_test/enclave/../../src/test_support.cc:335: 

undefined reference to `construct_what_to_say(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, key_message&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)'
/usr/bin/ld: test_support.o: in function `test_local_certify(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)':
/home/sgx/agurajada/certifier-framework-for-confidential-computing/openenclave_test/enclave/../../src/test_support.cc:512:

 undefined reference to `init_certifier_rules(certifier_rules&)'
/usr/bin/ld: /home/sgx/agurajada/certifier-framework-for-confidential-computing/openenclave_test/enclave/../../src/test_support.cc:545: undefined reference to `validate_evidence(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, signed_claim_sequence&, signed_claim_sequence&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, evidence_package&, key_message&)'
/usr/bin/ld: simulated_enclave.o: in function `simulated_Attest(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned char*, int*, unsigned char*)':
/home/sgx/agurajada/certifier-framework-for-confidential-computing/openenclave_test/enclave/../../src/simulated_enclave.cc:252: undefined reference to `sign_report(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, key_message const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:52: build] Error 1

NOTE: Similarly: $ make in openenclave_test/enclave also fails.

This whole build in this openenclave_test/ needs to be re-examined.

@gapisback gapisback self-assigned this Jun 23, 2023
@gapisback gapisback added the bug Something isn't working label Jun 23, 2023
@gapisback
Copy link
Collaborator Author

Not important to resolve before the summit.

@gapisback gapisback assigned yelvmw and unassigned gapisback Oct 30, 2023
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