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

why build sgx_unwind failed? #399

Closed
chuan-xu opened this issue Jun 30, 2022 · 3 comments
Closed

why build sgx_unwind failed? #399

chuan-xu opened this issue Jun 30, 2022 · 3 comments

Comments

@chuan-xu
Copy link

--- stderr
autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:18: installing 'config/compile' configure.ac:11: installing 'config/missing' src/Makefile.am:371: warning: whitespace following trailing backslash src/Makefile.am:372: warning: whitespace following trailing backslash src/Makefile.am: installing 'config/depcomp' src/Makefile.am:165: warning: variable 'libunwind_dwarf_generic_la_SOURCES' is defined but no program or src/Makefile.am:165: library has 'libunwind_dwarf_generic_la' as canonical name (possible typo) src/Makefile.am:619: warning: variable 'libunwind_x86_64_la_SOURCES' is defined but no program or src/Makefile.am:619: library has 'libunwind_x86_64_la' as canonical name (possible typo) src/Makefile.am:168: warning: variable 'libunwind_dwarf_generic_la_LIBADD' is defined but no program or src/Makefile.am:168: library has 'libunwind_dwarf_generic_la' as canonical name (possible typo) src/Makefile.am:621: warning: variable 'libunwind_x86_64_la_LIBADD' is defined but no program or src/Makefile.am:621: library has 'libunwind_x86_64_la' as canonical name (possible typo) src/Makefile.am:620: warning: variable 'libunwind_x86_64_la_LDFLAGS' is defined but no program or src/Makefile.am:620: library has 'libunwind_x86_64_la' as canonical name (possible typo) autoreconf: Leaving directory .'
grep: ./configure: No such file or directory
grep: ./configure: No such file or directory
expr: syntax error: unexpected argument ‘30’
sed: -e expression #1, char 1: unknown command: ,' grep: ./configure: No such file or directory expr: syntax error: unexpected argument ‘30’ sed: -e expression #1, char 1: unknown command: ,'
In file included from /root/rust/sgx/incubator-teaclave-sgx-sdk/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/rust/sgx/incubator-teaclave-sgx-sdk/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/rust/sgx/incubator-teaclave-sgx-sdk/sgx_unwind/../sgx_unwind/libunwind/src/os-linux.c:29:
/root/rust/sgx/incubator-teaclave-sgx-sdk/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~

@chuan-xu chuan-xu reopened this Jun 30, 2022
@chuan-xu chuan-xu closed this as completed Jul 1, 2022
@chuan-xu chuan-xu changed the title tags v1.1.5: build sgx_unwind failed why build sgx_unwind failed Jul 2, 2022
@chuan-xu chuan-xu changed the title why build sgx_unwind failed why build sgx_unwind failed? Jul 2, 2022
@chuan-xu chuan-xu reopened this Jul 2, 2022
@volcano0dr
Copy link
Contributor

Can you provide some information about the build environment, such as the installed intel sgx sdk version, rust version, etc.?

@chuan-xu
Copy link
Author

chuan-xu commented Jul 4, 2022

I've tried many versions:
os: ubuntu18.04 and ubuntu20.04
step 1: install linux dep refer to docker hub(baiduxlab/sgx-rust TAG: 1804-1.1.4 or 2004-1.1.4) "/bin/sh -c apt update && apt install -y ......"
step 2: install intel sgx sdk. first is 2.17 and then 2.16.
step 3: git clone teaclave sgx sdk, first v1.1.5 and then v1.1.4
But all sgx_unwind failed to compile.
I tried to alter sgx_unwind/build.rs and libunwind/autogen.sh, because autogen.sh can not find libunwind/configure.

now: reset os use ubuntu20.04
step 1: only install automake autoconf libtool.
step 2: install intel sgx sdk 2.17.
step 3: git clone teaclave sgx sdk v1.1.5.
It compiled successfully!!!!!!

@chuan-xu
Copy link
Author

chuan-xu commented Jul 7, 2022

@volcano0dr
os: ubuntu20.04 intel sgx sdk version: 2.17, sgx driver version: 2.11.054c9c4c, rustc version: 1.61.0-nightly (68369a041 2022-02-22).
The same error occurs after make clean and make.
why???
##################################################################################
--- stderr
autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:18: installing 'config/compile' configure.ac:11: installing 'config/missing' src/Makefile.am:371: warning: whitespace following trailing backslash src/Makefile.am:372: warning: whitespace following trailing backslash src/Makefile.am: installing 'config/depcomp' src/Makefile.am:165: warning: variable 'libunwind_dwarf_generic_la_SOURCES' is defined but no program or src/Makefile.am:165: library has 'libunwind_dwarf_generic_la' as canonical name (possible typo) src/Makefile.am:619: warning: variable 'libunwind_x86_64_la_SOURCES' is defined but no program or src/Makefile.am:619: library has 'libunwind_x86_64_la' as canonical name (possible typo) src/Makefile.am:168: warning: variable 'libunwind_dwarf_generic_la_LIBADD' is defined but no program or src/Makefile.am:168: library has 'libunwind_dwarf_generic_la' as canonical name (possible typo) src/Makefile.am:621: warning: variable 'libunwind_x86_64_la_LIBADD' is defined but no program or src/Makefile.am:621: library has 'libunwind_x86_64_la' as canonical name (possible typo) src/Makefile.am:620: warning: variable 'libunwind_x86_64_la_LDFLAGS' is defined but no program or src/Makefile.am:620: library has 'libunwind_x86_64_la' as canonical name (possible typo) autoreconf: Leaving directory .'
grep: ./configure: No such file or directory
grep: ./configure: No such file or directory
expr: syntax error: unexpected argument ‘30’
sed: -e expression #1, char 1: unknown command: ,' grep: ./configure: No such file or directory expr: syntax error: unexpected argument ‘30’ sed: -e expression #1, char 1: unknown command: ,'
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Lget_accessors.c:1: warning: "UNW_LOCAL_ONLY" redefined
1 | #define UNW_LOCAL_ONLY
|
: note: this is the location of the previous definition
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Lget_proc_info_by_ip.c:1: warning: "UNW_LOCAL_ONLY" redefined
1 | #define UNW_LOCAL_ONLY
|
: note: this is the location of the previous definition
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Ldyn-extract.c:1: warning: "UNW_LOCAL_ONLY" redefined
1 | #define UNW_LOCAL_ONLY
|
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Lfind_dynamic_proc_info.c:1: warning: "UNW_LOCAL_ONLY" redefined
1 | #define UNW_LOCAL_ONLY
|
: note: this is the location of the previous definition
: note: this is the location of the previous definition
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/mempool.c:27:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/dyn-info-list.c:26:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Lget_proc_name.c:1: warning: "UNW_LOCAL_ONLY" redefined
1 | #define UNW_LOCAL_ONLY
|
: note: this is the location of the previous definition
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/x86_64/is_fpreg.c:28:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Gget_accessors.c:26,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Lget_accessors.c:4:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1765: mi/mempool.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Gget_proc_info_by_ip.c:26,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Lget_proc_info_by_ip.c:4:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/flush_cache.c:26:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1765: mi/dyn-info-list.lo] Error 1
make[2]: *** [Makefile:1765: x86_64/is_fpreg.lo] Error 1
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Gdyn-extract.c:26,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Ldyn-extract.c:4:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/init.c:26:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Gfind_dynamic_proc_info.c:26,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Lfind_dynamic_proc_info.c:4:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1765: mi/Lget_proc_info_by_ip.lo] Error 1
make[2]: *** [Makefile:1765: mi/Lget_accessors.lo] Error 1
make[2]: *** [Makefile:1765: mi/flush_cache.lo] Error 1
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/os-linux.c:29:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Gget_proc_name.c:26,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/mi/Lget_proc_name.c:4:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/x86_64/Los-linux.c:1: warning: "UNW_LOCAL_ONLY" redefined
1 | #define UNW_LOCAL_ONLY
|
: note: this is the location of the previous definition
make[2]: *** [Makefile:1765: mi/Ldyn-extract.lo] Error 1
make[2]: *** [Makefile:1765: mi/init.lo] Error 1
make[2]: *** [Makefile:1765: mi/Lfind_dynamic_proc_info.lo] Error 1
make[2]: *** [Makefile:1765: os-linux.lo] Error 1
make[2]: *** [Makefile:1765: mi/Lget_proc_name.lo] Error 1
In file included from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread.h:37,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/libunwind_i.h:52,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/x86_64/unwind_i.h:35,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/x86_64/Gos-linux.c:28,
from /root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/src/x86_64/Los-linux.c:4:
/root/chuan/sgx/v1.1.5/sgx_unwind/../sgx_unwind/libunwind/include/pthread_compat.h:39:10: fatal error: sgx_spinlock.h: No such file or directory
39 | #include "sgx_spinlock.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1765: x86_64/Los-linux.lo] Error 1
make[1]: *** [Makefile:1225: all] Error 2
make: *** [Makefile:592: all-recursive] Error 1

@chuan-xu chuan-xu closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants