{"action":"created","issue":{"url":"https://api.github.com/repos/baidu/rust-sgx-sdk/issues/44","repository_url":"https://api.github.com/repos/baidu/rust-sgx-sdk","labels_url":"https://api.github.com/repos/baidu/rust-sgx-sdk/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/baidu/rust-sgx-sdk/issues/44/comments","events_url":"https://api.github.com/repos/baidu/rust-sgx-sdk/issues/44/events","html_url":"https://github.com/baidu/rust-sgx-sdk/issues/44","id":377804810,"node_id":"MDU6SXNzdWUzNzc4MDQ4MTA=","number":44,"title":"ring fail if debug info is enabled","user":{"login":"elichai","id":2167860,"node_id":"MDQ6VXNlcjIxNjc4NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/2167860?v=4","gravatar_id":"","url":"https://api.github.com/users/elichai","html_url":"https://github.com/elichai","followers_url":"https://api.github.com/users/elichai/followers","following_url":"https://api.github.com/users/elichai/following{/other_user}","gists_url":"https://api.github.com/users/elichai/gists{/gist_id}","starred_url":"https://api.github.com/users/elichai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elichai/subscriptions","organizations_url":"https://api.github.com/users/elichai/orgs","repos_url":"https://api.github.com/users/elichai/repos","events_url":"https://api.github.com/users/elichai/events{/privacy}","received_events_url":"https://api.github.com/users/elichai/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-11-06T11:27:45Z","updated_at":"2018-11-11T16:30:24Z","closed_at":"2018-11-11T16:30:24Z","author_association":"CONTRIBUTOR","body":"Hi,\r\nI tried removing the `--release` option to enable debug info(symbols), and when compiling while using ring it fails:\r\n```\r\n/opt/sgxsdk/bin/x64/sgx_edger8r --trusted enclave/Enclave.edl --search-path /opt/sgxsdk/include --search-path ../../edl --trusted-dir enclave\r\n/opt/sgxsdk/bin/x64/sgx_edger8r --untrusted enclave/Enclave.edl --search-path /opt/sgxsdk/include --search-path ../../edl --untrusted-dir app\r\nGEN  =>  enclave/Enclave_t.c enclave/Enclave_t.h app/Enclave_u.c app/Enclave_u.h\r\nCC   <=  enclave/Enclave_t.c\r\nar rcsD app/libEnclave_u.a app/Enclave_u.o\r\ncp app/libEnclave_u.a ./lib\r\n    Updating crates.io index\r\n   Compiling libc v0.2.43\r\n   Compiling sgx_types v1.0.4 (/root/sgx/sgx_types)\r\n   Compiling app v1.0.0 (/root/sgx/samplecode/hello-rust/app)\r\n   Compiling sgx_urts v1.0.4 (/root/sgx/sgx_urts)\r\n   Compiling dirs v1.0.4\r\n    Finished dev [unoptimized + debuginfo] target(s) in 2.66s\r\nCargo  =>  bin/app\r\ncp ./app/target/debug/app ./bin\r\nmake -C ./enclave/\r\nmake[1]: Entering directory '/root/sgx/samplecode/hello-rust/enclave'\r\ncargo build\r\n    Updating crates.io index\r\n   Compiling sgx_unwind v0.0.1 (/root/sgx/sgx_unwind)\r\n   Compiling sgx_types v1.0.4 (/root/sgx/sgx_types)\r\n   Compiling sgx_build_helper v0.1.0 (/root/sgx/build_helper)\r\n   Compiling cc v1.0.25\r\n   Compiling spin v0.4.10\r\n   Compiling untrusted v0.6.2\r\n   Compiling lazy_static v1.2.0\r\n   Compiling sgx_tstd v1.0.4 (/root/sgx/sgx_tstd)\r\n   Compiling sgx_trts v1.0.4 (/root/sgx/sgx_trts)\r\n   Compiling ring v0.13.2 (/root/sgx/third_party/ring)\r\n   Compiling sgx_tprotected_fs v1.0.4 (/root/sgx/sgx_tprotected_fs)\r\n   Compiling sgx_alloc v1.0.4 (/root/sgx/sgx_alloc)\r\n   Compiling sgx_rand v1.0.4 (/root/sgx/sgx_rand)\r\n   Compiling Helloworldsampleenclave v1.0.0 (/root/sgx/samplecode/hello-rust/enclave)\r\n    Finished dev [unoptimized + debuginfo] target(s) in 13.13s\r\ncp ./target/debug/libhelloworldsampleenclave.a ../lib/libenclave.a\r\nmake[1]: Leaving directory '/root/sgx/samplecode/hello-rust/enclave'\r\nmake -C ../../compiler-rt/ 2> /dev/null\r\nmake[1]: Entering directory '/root/sgx/compiler-rt'\r\nmake[1]: Nothing to be done for 'all'.\r\nmake[1]: Leaving directory '/root/sgx/compiler-rt'\r\nCC   <=  enclave/Enclave_t.c\r\ncp ../../compiler-rt/libcompiler-rt-patch.a ./lib\r\n./lib/libenclave.a(e_aes.o): In function `aes_ctr32_encrypt_blocks':\r\n/root/sgx/third_party/ring/crypto/fipsmodule/cipher/e_aes.c:225: undefined reference to `__assert_fail'\r\n./lib/libenclave.a(e_aes.o): In function `GFp_aes_gcm_init':\r\n/root/sgx/third_party/ring/crypto/fipsmodule/cipher/e_aes.c:235: undefined reference to `__assert_fail'\r\n./lib/libenclave.a(e_aes.o): In function `gfp_aes_gcm_init_and_aad':\r\n/root/sgx/third_party/ring/crypto/fipsmodule/cipher/e_aes.c:252: undefined reference to `__assert_fail'\r\n./lib/libenclave.a(e_aes.o): In function `GFp_aes_gcm_seal':\r\n/root/sgx/third_party/ring/crypto/fipsmodule/cipher/e_aes.c:264: undefined reference to `__assert_fail'\r\n/root/sgx/third_party/ring/crypto/fipsmodule/cipher/e_aes.c:265: undefined reference to `__assert_fail'\r\n./lib/libenclave.a(e_aes.o):/root/sgx/third_party/ring/crypto/fipsmodule/cipher/e_aes.c:287: more undefined references to `__assert_fail' follow\r\ncollect2: error: ld returned 1 exit status\r\nMakefile:152: recipe for target 'enclave/enclave.so' failed\r\nmake: *** [enclave/enclave.so] Error 1\r\n```\r\n\r\nTo reproduce:\r\n1. Clone this repo and open the docker.\r\n2. apply this git patch: https://gist.github.com/elichai/ce15b09dc0bfb169dd885b15613f6f2b\r\n3. run make in `/root/sgx/samplecode/hello-rust`"},"comment":{"url":"https://api.github.com/repos/baidu/rust-sgx-sdk/issues/comments/437684229","html_url":"https://github.com/baidu/rust-sgx-sdk/issues/44#issuecomment-437684229","issue_url":"https://api.github.com/repos/baidu/rust-sgx-sdk/issues/44","id":437684229,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzY4NDIyOQ==","user":{"login":"elichai","id":2167860,"node_id":"MDQ6VXNlcjIxNjc4NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/2167860?v=4","gravatar_id":"","url":"https://api.github.com/users/elichai","html_url":"https://github.com/elichai","followers_url":"https://api.github.com/users/elichai/followers","following_url":"https://api.github.com/users/elichai/following{/other_user}","gists_url":"https://api.github.com/users/elichai/gists{/gist_id}","starred_url":"https://api.github.com/users/elichai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elichai/subscriptions","organizations_url":"https://api.github.com/users/elichai/orgs","repos_url":"https://api.github.com/users/elichai/repos","events_url":"https://api.github.com/users/elichai/events{/privacy}","received_events_url":"https://api.github.com/users/elichai/received_events","type":"User","site_admin":false},"created_at":"2018-11-11T16:30:24Z","updated_at":"2018-11-11T16:30:24Z","author_association":"CONTRIBUTOR","body":"It seems to work. Thanks!"}}
{"actor":{"display_login":"elichai"}}