You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2021/01/21 10:07:04 UTC

[GitHub] [incubator-teaclave-sgx-sdk] assafmo opened a new issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

assafmo opened a new issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313


   Hi guys.
   
   When trying to compile outside our CI, we're seeing this error:
   ```
   cc -m64 -O2 -fstack-protector -ffreestanding -nostdinc -fvisibility=hidden -fpie -fno-strict-overflow -fno-delete-null-pointer-checks  -I../../../third_party/vendor/sgx_edl/common/inc -I../../../third_party/vendor/sgx_edl/edl -I/home/assafmo/.sgxsdk/sgxsdk/include -I/home/assafmo/.sgxsdk/sgxsdk/include/tlibc -I/home/assafmo/.sgxsdk/sgxsdk/include/stlport -I/home/assafmo/.sgxsdk/sgxsdk/include/epid -I./ -I./include -c Enclave_t.c -o Enclave_t.o
   g++ Enclave_t.o -o librust_cosmwasm_enclave.so -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L/home/assafmo/.sgxsdk/sgxsdk/lib64 -Wl,--whole-archive -fno-common -lsgx_trts_sim -Wl,--no-whole-archive -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -lsgx_tcrypto -lsgx_tservice_sim -lsgx_tprotected_fs -L./lib -lenclave -Wl,--end-group -Wl,--version-script=Enclave.lds -Wl,-z,relro,-z,now,-z,noexecstack -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-pie,-eenclave_entry -Wl,--export-dynamic -Wl,--gc-sections -Wl,--defsym,__ImageBase=0
   /usr/bin/ld: ./lib/libenclave.a(dyn-info-list.o):(.bss+0x0): multiple definition of `_U_dyn_info_list'; ./lib/libenclave.a(Linit.o):(.bss+0x0): first defined here
   collect2: error: ld returned 1 exit status
   ```
   
   We thought it's a dependency issue, but running `cargo clean`, `xargo clean` and deleting both their caches didn't solve the issue.
   
   Do you guys have any idea what might be the issue?
   
   (Makefiles: [main](https://github.com/enigmampc/SecretNetwork/blob/2e94a789c1a7212bb09e2c863c947df0a2ab429c/Makefile), [enclave](https://github.com/enigmampc/SecretNetwork/blob/2e94a789c1a7212bb09e2c863c947df0a2ab429c/cosmwasm/packages/wasmi-runtime/Makefile); CI: [link](https://github.com/enigmampc/SecretNetwork/blob/2e94a789c1a7212bb09e2c863c947df0a2ab429c/.github/workflows/ci.yaml))


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] cschramm edited a comment on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
cschramm edited a comment on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-791938552


   I encountered the same problem and can confirm that it relates to the GCC version. I get the error with GCC 10.1 and 10.2 but 9.3 works fine.
   
   I also got this apparent conflict between the Intel and the Rust SDKs when compiling `unit-test`, even with GCC 9.3:
   ```
   /usr/bin/ld: /opt/sgxsdk/lib64/libsgx_tcxx.a(init.o): in function `_UIx86_64_mi_init':
   init.c:(.text._UIx86_64_mi_init+0x0): multiple definition of `_UIx86_64_mi_init'; ./lib/libenclave.a(init.o):init.c:(.text+0x0): first defined here
   /usr/bin/ld: /opt/sgxsdk/lib64/libsgx_tcxx.a(dyn-info-list.o): in function `_U_dyn_info_list_addr':
   dyn-info-list.c:(.text._U_dyn_info_list_addr+0x0): multiple definition of `_U_dyn_info_list_addr'; ./lib/libenclave.a(dyn-info-list.o):dyn-info-list.c:(.text+0x0): first defined here
   /usr/bin/ld: /opt/sgxsdk/lib64/libsgx_tcxx.a(global.o): in function `_Ux86_64_dwarf_init':
   global.c:(.text._Ux86_64_dwarf_init+0x0): multiple definition of `_Ux86_64_dwarf_init'; ./lib/libenclave.a(global.o):global.c:(.text+0x0): first defined here
   ```
   Recompiling the *Intel* SDK with GCC 9.3 fixed it for me.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] volcano0dr commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
volcano0dr commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-792272859


   thanks @cschramm ! I will try to sync upstream libunwind to fix this error.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
dingelish commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-774225419


   @assafmo can i have your `./lib/libenclave.a` ? thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] dingelish closed issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
dingelish closed issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
dingelish commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-776474303


   thanks @okready ! let me try to reproduce this and see if we can port that commit to our fork :-) thanks again!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] assafmo commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
assafmo commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-774741764


   Thanks for looking into it.
   
   [libenclave.zip](https://github.com/apache/incubator-teaclave-sgx-sdk/files/5939801/libenclave.zip)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] cschramm edited a comment on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
cschramm edited a comment on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-791938552


   I encountered the same problem and can confirm that it relates to GCC version. I get the error with GCC 10.1 and 10.2 but 9.3 works fine.
   
   I also got this apparent conflict between the Intel and the Rust SDKs when compiling `unit-test`, even with GCC 9.3:
   ```
   /usr/bin/ld: /opt/sgxsdk/lib64/libsgx_tcxx.a(init.o): in function `_UIx86_64_mi_init':
   init.c:(.text._UIx86_64_mi_init+0x0): multiple definition of `_UIx86_64_mi_init'; ./lib/libenclave.a(init.o):init.c:(.text+0x0): first defined here
   /usr/bin/ld: /opt/sgxsdk/lib64/libsgx_tcxx.a(dyn-info-list.o): in function `_U_dyn_info_list_addr':
   dyn-info-list.c:(.text._U_dyn_info_list_addr+0x0): multiple definition of `_U_dyn_info_list_addr'; ./lib/libenclave.a(dyn-info-list.o):dyn-info-list.c:(.text+0x0): first defined here
   /usr/bin/ld: /opt/sgxsdk/lib64/libsgx_tcxx.a(global.o): in function `_Ux86_64_dwarf_init':
   global.c:(.text._Ux86_64_dwarf_init+0x0): multiple definition of `_Ux86_64_dwarf_init'; ./lib/libenclave.a(global.o):global.c:(.text+0x0): first defined here
   ```
   Recompiling the *Intel* SDK with GCC 9.3 fixed it for me.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] cschramm commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
cschramm commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-808736829


   All fine with current master. :+1: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
dingelish commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-774219372


   seems multiple `libunwind` are involved. let me investigate.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
dingelish commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-805229103


   @assafmo @cschramm i think https://github.com/apache/incubator-teaclave-sgx-sdk/pull/329 solve this. could you please test it? thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] okready commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
okready commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-776315992


   I started running into this as well after upgrading from Ubuntu 20.04 to Ubuntu 20.10. I haven't looked into the cause that much (changes in GCC 10 maybe?), but it seems it may have been fixed upstream in libunwind v1.5 in [this commit](https://github.com/libunwind/libunwind/commit/29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e) (referenced from [a similar FreeBSD bug report](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248699)).
   
   Locally, I just commented out one of the `_U_dyn_info_list` definitions in the SDK, and it looks to be building/running fine so far.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] cschramm commented on issue #313: multiple definition of '_U_dyn_info_list' when trying to compile

Posted by GitBox <gi...@apache.org>.
cschramm commented on issue #313:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/313#issuecomment-791938552


   I encountered the same problem and can confirm that it relates to GCC version. I get the error with GCC 10.1 and 10.2 but 9.3 works fine.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org