sgx sdk

https://github.com/aminueza/sgx-docker

 

in the container:

    1. git clone https://github.com/intel/linux-sgx.git

    2. apt-get install build-essential ocaml ocamlbuild automake autoconf libtool wget python libssl-dev git cmake perl -y

    3. apt-get install libssl-dev libcurl4-openssl-dev protobuf-compiler libprotobuf-dev debhelper cmake reprepro -y

    4. cd linux-sgx

    5. ./download_prebuilt.sh

    6. make sdk_install_pkg_no_mitigation

    7. cd linux/installer/bin/

    8. ./sgx_linux_x64_sdk_2.9.101.2.bin

    9. cd ../../../

    10. make psw_install_pkg

    11. apt-get install -y libcurl4 libprotobuf10 libssl1.1 make module-init-tools

    12. cd linux/installer/bin/

    13. ./sgx_linux_x64_psw_2.9.101.2.bin --no-start-aesm

    14. source /opt/intel/sgxsdk/environment

    15. cd /opt/intel/sgxpsw/aesm

    16. ./aesm_service --no-daemon
      ./aesm_service: error while loading shared libraries: libCppMicroServices.so.4.0.0: cannot open shared object file: No such file or directory

 

 

 

config.log
@llly According to your advice, I have made some changes. Now the installation process is as follows, but there are new problems. (log file is attached)

  1. scl enable devtoolset-9 bash
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-9/root/usr --mandir=/opt/rh/devtoolset-9/root/usr/share/man --infodir=/opt/rh/devtoolset-9/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-9.1.1-20190605/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
    Thread model: posix
    gcc version 9.1.1 20190605 (Red Hat 9.1.1-2) (GCC)

  2. sudo yum groupinstall 'Development Tools' --setopt=group_package_types=mandatory,default,optional

  3. sudo yum install ocaml ocaml-ocamlbuild wget python2 openssl-devel git cmake perl 

  4. yum install autoconf automake libtool

  5. sudo yum update binutils

  6. sudo ./download_prebuilt.sh

  7. sudo cp external/toolset/{as,ld,ld.gold,objdump} /opt/rh/devtoolset-9/root/usr/bin

  8. which as ld ld.gold objdump
    /opt/rh/devtoolset-9/root/usr/bin/as
    /opt/rh/devtoolset-9/root/usr/bin/ld
    /opt/rh/devtoolset-9/root/usr/bin/ld.gold
    /opt/rh/devtoolset-9/root/usr/bin/objdump

  9. sudo make sdk
    aclocal: warning: couldn't open directory 'm4': No such file or directory
    autoreconf: configure.ac: tracing
    autoreconf: configure.ac: creating directory config
    autoreconf: running: libtoolize --copy --force
    libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, config'. libtoolize: copying file config/ltmain.sh'
    libtoolize: Consider adding AC_CONFIG_MACRO_DIR([m4])' to configure.ac and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding -I m4' to ACLOCAL_AMFLAGS in Makefile.am.
    aclocal: warning: couldn't open directory 'm4': No such file or directory
    autoreconf: running: /usr/bin/autoconf --force
    autoreconf: running: /usr/bin/autoheader --force
    autoreconf: running: automake --add-missing --copy --force-missing
    configure.ac:22: installing 'config/ar-lib'
    configure.ac:25: installing 'config/compile'
    configure.ac:10: installing 'config/config.guess'
    configure.ac:10: installing 'config/config.sub'
    configure.ac:11: installing 'config/install-sh'
    configure.ac:11: installing 'config/missing'
    Makefile.am: installing './INSTALL'
    src/Makefile.am:366: warning: whitespace following trailing backslash
    src/Makefile.am:367: warning: whitespace following trailing backslash
    src/Makefile.am: installing 'config/depcomp'
    src/Makefile.am:160: warning: variable 'libunwind_dwarf_generic_la_SOURCES' is defined but no program or
    src/Makefile.am:160: library has 'libunwind_dwarf_generic_la' as canonical name (possible typo)
    src/Makefile.am:614: warning: variable 'libunwind_x86_64_la_SOURCES' is defined but no program or
    src/Makefile.am:614: library has 'libunwind_x86_64_la' as canonical name (possible typo)
    src/Makefile.am:616: warning: variable 'libunwind_x86_64_la_LIBADD' is defined but no program or
    src/Makefile.am:616: library has 'libunwind_x86_64_la' as canonical name (possible typo)
    src/Makefile.am:163: warning: variable 'libunwind_dwarf_generic_la_LIBADD' is defined but no program or
    src/Makefile.am:163: library has 'libunwind_dwarf_generic_la' as canonical name (possible typo)
    src/Makefile.am:615: warning: variable 'libunwind_x86_64_la_LDFLAGS' is defined but no program or
    src/Makefile.am:615: library has 'libunwind_x86_64_la' as canonical name (possible typo)
    parallel-tests: installing 'config/test-driver'
    autoreconf: Leaving directory .' checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... gcc checking whether the C compiler works... no configure: error: in /home/pengfei/sgx/linux-sgx/sdk/cpprt/linux/libunwind':
    configure: error: C compiler cannot create executables
    See config.log' for more details sed: can't read include/config.h: No such file or directory make[3]: *** [libunwind] Error 2 make[3]: Leaving directory /home/pengfei/sgx/linux-sgx/sdk/cpprt'
    make[2]: *** [cpprt] Error 2
    make[2]: Leaving directory /home/pengfei/sgx/linux-sgx/sdk' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/pengfei/sgx/linux-sgx/sdk'
    make: *** [sdk] Error 2

  10. wget https://github.com/protocolbuffers/protobuf/releases/download/v3.5.1/protobuf-all-3.5.1.tar.gz

  11. https://cmake.org/download/
posted @ 2022-05-07 10:55  zJanly  阅读(256)  评论(0编辑  收藏  举报