You are not logged in.

#1 2020-01-30 02:12:14

promach
Member
Registered: 2016-05-18
Posts: 96

intel sgx psw

According to intel sgx psw installation guide , the build process is entirely based on distro-specific procedure.

Someone told me to modify or use the files in linux/installer/common and linux/installer/bin instead of using the top-level Makefile

Could anyone advise ?

Last edited by promach (2020-01-30 03:17:21)

Offline

#2 2020-01-30 03:22:39

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: intel sgx psw

There is nothing distro-specific about the build procedure at all. The procedure after the build to create an installer is distro-specific, but who wants that anyway?

Last edited by Scimmia (2020-01-30 03:22:53)

Offline

#3 2020-01-31 02:05:54

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

make[3]: Leaving directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/external/sgx_libm'
00:00:01 29   (0   ) CodeGen.cmx                                           ONb---i- /autoreconf: running: aclocal --force 
+ /usr/bin/ocamlopt.opt -c -ccopt -fpie -o CodeGen.cmx CodeGen.ml
File "CodeGen.ml", line 374, characters 6-7:
374 |     | _                   -> (false, "")
            ^
Warning 11: this match case is unused.
File "CodeGen.ml", line 676, characters 43-59:
676 |   let func_guard = sprintf "%s_DEFINED__" (String.uppercase func_name) in 
                                                 ^^^^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.uppercase
Use String.uppercase_ascii instead.
File "CodeGen.ml", line 705, characters 40-56:
705 |   let guard_macro = sprintf "%s_U_H__" (String.uppercase ec.enclave_name) in
                                              ^^^^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.uppercase
Use String.uppercase_ascii instead.
File "CodeGen.ml", line 738, characters 40-56:
738 |   let guard_macro = sprintf "%s_T_H__" (String.uppercase ec.enclave_name) in
                                              ^^^^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.uppercase
Use String.uppercase_ascii instead.
Finished, 31 targets (0 cached) in 00:00:01.
make[3]: Leaving directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/sdk/edger8r/linux'
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: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
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:18: 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: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: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: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-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-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... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/sdk/cpprt/linux/libunwind':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
sed: can't read include/config.h: No such file or directory
make[3]: *** [Makefile:84: libunwind] Error 2
make[3]: Leaving directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/sdk/cpprt'
make[2]: *** [Makefile.source:150: cpprt] Error 2
make[2]: Leaving directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/sdk'
make[1]: *** [Makefile:58: all] Error 2
make[1]: Leaving directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/sdk'
make: *** [Makefile:73: sdk] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
[phung@archlinux intel_sgx_sdk_and_psw]$ 

When I use the following PKGBUILD, I have the above error. Why ?

Note: The error seems to be related to this configure file triggered by libunwind

PKGBUILD

# Maintainer: promach
pkgname=intel_sgx
pkgver=VERSION
pkgrel=1
pkgdesc="Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification"
arch=('i686' 'x86_64')
url="https://01.org/intel-softwareguard-extensions"
license=('GPL')
groups=()
depends=()
makedepends=('ocaml' 'ocamlbuild' 'automake' 'autoconf' 'libtool' 'wget' 'python' 'openssl' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=('git+https://github.com/intel/linux-sgx.git')
noextract=()
md5sums=('SKIP') #generate with 'makepkg -g'

build() {
  cd "$srcdir/linux-sgx"

  ./download_prebuilt.sh
  
   make clean

   make sdk DEBUG=1
   make sdk_install_pkg DEBUG=1

   make psw DEBUG=1
}

package() {
  cd "$srcdir/linux-sgx"

  make DESTDIR="$pkgdir/" install
}

Last edited by promach (2020-01-31 03:02:36)

Offline

#4 2020-01-31 06:03:54

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

When I use options=('!buildflags') in the PKGBUILD , the above libunwind error disappeared, but I have new error coming up as follows:

Note: this new cc1plus error seems to be originated from openssl package as indicated by deathholes

Generated sdk installer: ./linux/installer/bin/sgx_linux_x64_sdk_2.8.100.3.bin
make -C psw/ USE_OPT_LIBS=2
make[1]: Entering directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw'
make -C uae_service/linux/
make[2]: Entering directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/uae_service/linux'
make -C ../../../psw/ae/aesm_service/source/core/ipc
cc -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants -fstack-protector-strong -O0 -ggdb -DDEBUG -UNDEBUG -DSE_DEBUG_LEVEL=SE_TRACE_DEBUG -ffunction-sections -fdata-sections -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wconversion -Wredundant-decls -DITT_ARCH_IA64  -I. -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc/internal  -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc/internal -I/opt/intel/sgxsdk/include -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/external/epid-sdk -I../../../psw/ae/aesm_service/source/core/ipc -I../uae_wrapper/inc -I../../../psw/ae/aesm_service/source/core/ipc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/common -Werror -fPIC -c /home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/src/se_trace.c -o se_trace.o
g++ -Wnon-virtual-dtor -std=c++11 -fstack-protector-strong -O0 -ggdb -DDEBUG -UNDEBUG -DSE_DEBUG_LEVEL=SE_TRACE_DEBUG -ffunction-sections -fdata-sections -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wconversion -Wredundant-decls -DITT_ARCH_IA64 -fPIC -Werror -Wno-unused-parameter -g -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -Wno-deprecated-declarations  -I. -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc/internal  -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc/internal -I/opt/intel/sgxsdk/include -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/external/epid-sdk -I../../../psw/ae/aesm_service/source/core/ipc -I../uae_wrapper/inc -I../../../psw/ae/aesm_service/source/core/ipc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/common -c ../uae_wrapper/src/AEServicesProvider.cpp -o AEServicesProvider.o
g++ -Wnon-virtual-dtor -std=c++11 -fstack-protector-strong -O0 -ggdb -DDEBUG -UNDEBUG -DSE_DEBUG_LEVEL=SE_TRACE_DEBUG -ffunction-sections -fdata-sections -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wconversion -Wredundant-decls -DITT_ARCH_IA64 -fPIC -Werror -Wno-unused-parameter -g -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -Wno-deprecated-declarations  -I. -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc/internal  -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc/internal -I/opt/intel/sgxsdk/include -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/external/epid-sdk -I../../../psw/ae/aesm_service/source/core/ipc -I../uae_wrapper/inc -I../../../psw/ae/aesm_service/source/core/ipc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/common -c ../uae_wrapper/src/uae_api.cpp -o uae_api.o
g++ -Wnon-virtual-dtor -std=c++11 -fstack-protector-strong -O0 -ggdb -DDEBUG -UNDEBUG -DSE_DEBUG_LEVEL=SE_TRACE_DEBUG -ffunction-sections -fdata-sections -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wconversion -Wredundant-decls -DITT_ARCH_IA64 -fPIC -Werror -Wno-unused-parameter -g -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -Wno-deprecated-declarations  -I. -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc/internal  -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc/internal -I/opt/intel/sgxsdk/include -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/external/epid-sdk -I../../../psw/ae/aesm_service/source/core/ipc -I../uae_wrapper/inc -I../../../psw/ae/aesm_service/source/core/ipc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/common -c /home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/common/se_sig_rl.cpp -o se_sig_rl.o
g++ -Wnon-virtual-dtor -std=c++11 -fstack-protector-strong -O0 -ggdb -DDEBUG -UNDEBUG -DSE_DEBUG_LEVEL=SE_TRACE_DEBUG -ffunction-sections -fdata-sections -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wconversion -Wredundant-decls -DITT_ARCH_IA64 -fPIC -Werror -Wno-unused-parameter -g -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -Wno-deprecated-declarations  -I. -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc/internal  -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc/internal -I/opt/intel/sgxsdk/include -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/external/epid-sdk -I../../../psw/ae/aesm_service/source/core/ipc -I../uae_wrapper/inc -I../../../psw/ae/aesm_service/source/core/ipc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/common -c ../sgx_uae_service.cpp -o sgx_uae_service.o
g++ -Wnon-virtual-dtor -std=c++11 -fstack-protector-strong -O0 -ggdb -DDEBUG -UNDEBUG -DSE_DEBUG_LEVEL=SE_TRACE_DEBUG -ffunction-sections -fdata-sections -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wconversion -Wredundant-decls -DITT_ARCH_IA64 -fPIC -Werror -Wno-unused-parameter -g -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -Wno-deprecated-declarations  -I. -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc/internal  -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc/internal -I/opt/intel/sgxsdk/include -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/external/epid-sdk -I../../../psw/ae/aesm_service/source/core/ipc -I../uae_wrapper/inc -I../../../psw/ae/aesm_service/source/core/ipc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/common -c ../uae_service_assert.cpp -o uae_service_assert.o
g++ -Wnon-virtual-dtor -std=c++11 -fstack-protector-strong -O0 -ggdb -DDEBUG -UNDEBUG -DSE_DEBUG_LEVEL=SE_TRACE_DEBUG -ffunction-sections -fdata-sections -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type -Waddress -Wsequence-point -Wformat-security -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow -Wcast-align -Wconversion -Wredundant-decls -DITT_ARCH_IA64 -fPIC -Werror -Wno-unused-parameter -g -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -Wno-deprecated-declarations  -I. -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/common/inc/internal  -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/common -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/inc/internal -I/opt/intel/sgxsdk/include -I/home/phung/Dmake[3]: Entering directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/core/ipc'
ownloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/external/epid-sdk -I../../../psw/ae/aesm_service/source/core/ipc -I../uae_wrapper/inc -I../../../psw/ae/aesm_service/source/core/ipc -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source -I/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/common -c epid_version.cpp -o epid_version.o
cc1: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]
cc1plus: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]
cc1plus: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]
cc1plus: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]
cc1plus: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]
cc1plus: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]
cc1plus: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:178: epid_version.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[2]: *** [Makefile:180: se_trace.o] Error 1
protoc  messages.proto --cpp_out=.
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:178: se_sig_rl.o] Error 1
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:178: uae_service_assert.o] Error 1
make[3]: Leaving directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/ae/aesm_service/source/core/ipc'
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:178: sgx_uae_service.o] Error 1
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:178: uae_api.o] Error 1
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:178: AEServicesProvider.o] Error 1
make[2]: Leaving directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw/uae_service/linux'
make[1]: *** [Makefile:49: uae_service] Error 2
make[1]: Leaving directory '/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/src/linux-sgx/psw'
make: *** [Makefile:70: psw] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
[phung@archlinux intel_sgx_sdk_and_psw]$ 

Last edited by promach (2020-01-31 06:13:55)

Offline

#5 2020-01-31 13:09:03

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: intel sgx psw

   make sdk_install_pkg DEBUG=1

Does that not only create a tar ball that is not installed?

cc1: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]

Which would explain why /opt/intel/sgxsdk/include does not exist.
Edit:
missing makedepends 'cmake' 'protobuf'

Last edited by loqs (2020-02-01 00:11:50)

Offline

#6 2020-02-01 09:51:02

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

@loqs

And how would I install the sdk then after building the tar ?

I suppose I already had package() in my PKGBUILD ?

Offline

#7 2020-02-01 11:55:55

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: intel sgx psw

Have a look at sgxsdk_1.0.orig.tar.gz in linux-sgx/linux/installer/common/sdk/output

Offline

#8 2020-02-02 04:45:30

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

@loqs

but sgxsdk_1.0.orig.tar.gz is still not a valid package to be installed by pacman

Offline

#9 2020-02-02 05:29:17

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: intel sgx psw

Yes you would need to extract the contents of the archive to some path under "$pkgdir/" in the package function.

Last edited by loqs (2020-02-02 05:29:38)

Offline

#10 2020-02-02 08:00:45

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

[phung@archlinux ~]$ cd Downloads/intel_sgx/intel_sgx_sdk_and_psw/
[phung@archlinux intel_sgx_sdk_and_psw]$ ls
linux-sgx  pkg	PKGBUILD  src
[phung@archlinux intel_sgx_sdk_and_psw]$ cd src/linux-sgx/linux/installer/common/sdk/output/
[phung@archlinux output]$ ls
Makefile  package  SampleCode  scripts	sgxsdk_1.0.orig.tar.gz
[phung@archlinux output]$ tar -zxvf s
scripts/                sgxsdk_1.0.orig.tar.gz  
[phung@archlinux output]$ tar -zxvf sgxsdk_1.0.orig.tar.gz 
Makefile
package/
package/bin/
package/bin/sgx-gdb
package/bin/x64/
package/bin/x64/sgx_config_cpusvn
package/bin/x64/sgx_encrypt
package/bin/x64/sgx_edger8r
package/bin/x64/sgx_sign
package/licenses/
package/licenses/License.txt
package/lib64/
package/lib64/gdb-sgx-plugin/
package/lib64/gdb-sgx-plugin/gdb_sgx_plugin.py
package/lib64/gdb-sgx-plugin/readelf.py
package/lib64/gdb-sgx-plugin/sgx_emmt.py
package/lib64/gdb-sgx-plugin/load_symbol_cmd.py
package/lib64/gdb-sgx-plugin/gdb_sgx_cmd
package/lib64/libsgx_trts_sim.a
package/lib64/libsgx_urts_sim.so
package/lib64/libsgx_capable.a
package/lib64/libsgx_tservice_sim.a
package/lib64/libsgx_pthread.a
package/lib64/libsgx_tswitchless.a
package/lib64/libsgx_ukey_exchange.a
package/lib64/libsgx_ptrace.so
package/lib64/libsgx_launch_sim.so
package/lib64/libsgx_quote_ex.so
package/lib64/libc++_Changes_SGX.txt
package/lib64/libsgx_launch.so
package/lib64/libsgx_tprotected_fs.a
package/lib64/libsgx_tkey_exchange.a
package/lib64/libsgx_epid.so
package/lib64/libsgx_uae_service_sim.so
package/lib64/libsgx_tcrypto.a
package/lib64/libsgx_quote_ex_sim.so
package/lib64/libsgx_tcxx.a
package/lib64/libsgx_uae_service.so
package/lib64/libsgx_capable.so
package/lib64/libsgx_uswitchless.a
package/lib64/libsgx_tservice.a
package/lib64/libsgx_tcmalloc.a
package/lib64/libsgx_omp.a
package/lib64/libsgx_pcl.a
package/lib64/libsgx_pclsim.a
package/lib64/libsgx_urts.so
package/lib64/libsgx_epid_sim.so
package/lib64/libsgx_tstdc.a
package/lib64/libsgx_uprotected_fs.a
package/lib64/libsgx_trts.a
package/SampleCode/
package/SampleCode/Cxx11SGXDemo/
package/SampleCode/Cxx11SGXDemo/App/
package/SampleCode/Cxx11SGXDemo/App/TrustedLibrary/
package/SampleCode/Cxx11SGXDemo/App/TrustedLibrary/Libcxx.cpp
package/SampleCode/Cxx11SGXDemo/App/App.cpp
package/SampleCode/Cxx11SGXDemo/App/App.h
package/SampleCode/Cxx11SGXDemo/.cproject
package/SampleCode/Cxx11SGXDemo/.settings/
package/SampleCode/Cxx11SGXDemo/.settings/language.settings.xml
package/SampleCode/Cxx11SGXDemo/Enclave/
package/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/
package/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/Libcxx.cpp
package/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/Libcxx.edl
package/SampleCode/Cxx11SGXDemo/Enclave/Enclave_private.pem
package/SampleCode/Cxx11SGXDemo/Enclave/Enclave.edl
package/SampleCode/Cxx11SGXDemo/Enclave/Enclave.cpp
package/SampleCode/Cxx11SGXDemo/Enclave/Enclave_debug.lds
package/SampleCode/Cxx11SGXDemo/Enclave/Enclave.config.xml
package/SampleCode/Cxx11SGXDemo/Enclave/Enclave.h
package/SampleCode/Cxx11SGXDemo/Enclave/Enclave.lds
package/SampleCode/Cxx11SGXDemo/.project
package/SampleCode/Cxx11SGXDemo/README.txt
package/SampleCode/Cxx11SGXDemo/Makefile
package/SampleCode/PowerTransition/
package/SampleCode/PowerTransition/Common/
package/SampleCode/PowerTransition/Common/types.h
package/SampleCode/PowerTransition/App/
package/SampleCode/PowerTransition/App/ErrorSupport.h
package/SampleCode/PowerTransition/App/ErrorSupport.cpp
package/SampleCode/PowerTransition/App/rwlock.cpp
package/SampleCode/PowerTransition/App/App.cpp
package/SampleCode/PowerTransition/App/rwlock.h
package/SampleCode/PowerTransition/.cproject
package/SampleCode/PowerTransition/.settings/
package/SampleCode/PowerTransition/.settings/language.settings.xml
package/SampleCode/PowerTransition/Enclave/
package/SampleCode/PowerTransition/Enclave/Enclave_private.pem
package/SampleCode/PowerTransition/Enclave/Enclave.edl
package/SampleCode/PowerTransition/Enclave/Enclave.cpp
package/SampleCode/PowerTransition/Enclave/Enclave.config.xml
package/SampleCode/PowerTransition/Enclave/Enclave.lds
package/SampleCode/PowerTransition/.project
package/SampleCode/PowerTransition/README.txt
package/SampleCode/PowerTransition/Makefile
package/SampleCode/SealUnseal/
package/SampleCode/SealUnseal/App/
package/SampleCode/SealUnseal/App/ErrorSupport.h
package/SampleCode/SealUnseal/App/ErrorSupport.cpp
package/SampleCode/SealUnseal/App/App.cpp
package/SampleCode/SealUnseal/Enclave_Unseal/
package/SampleCode/SealUnseal/Enclave_Unseal/Enclave_Unseal.lds
package/SampleCode/SealUnseal/Enclave_Unseal/Enclave_Unseal.cpp
package/SampleCode/SealUnseal/Enclave_Unseal/Enclave_Unseal.config.xml
package/SampleCode/SealUnseal/Enclave_Unseal/Enclave_Unseal.edl
package/SampleCode/SealUnseal/Enclave_Seal/
package/SampleCode/SealUnseal/Enclave_Seal/Enclave_Seal.config.xml
package/SampleCode/SealUnseal/Enclave_Seal/Enclave_private.pem
package/SampleCode/SealUnseal/Enclave_Seal/Enclave_Seal.edl
package/SampleCode/SealUnseal/Enclave_Seal/Enclave_Seal.lds
package/SampleCode/SealUnseal/Enclave_Seal/Enclave_Seal.cpp
package/SampleCode/SealUnseal/README.txt
package/SampleCode/SealUnseal/Makefile
package/SampleCode/LocalAttestation/
package/SampleCode/LocalAttestation/EnclaveResponder/
package/SampleCode/LocalAttestation/EnclaveResponder/ReadMe.txt
package/SampleCode/LocalAttestation/EnclaveResponder/Utility_E2.cpp
package/SampleCode/LocalAttestation/EnclaveResponder/EnclaveResponder.lds
package/SampleCode/LocalAttestation/EnclaveResponder/EnclaveResponder.config.xml
package/SampleCode/LocalAttestation/EnclaveResponder/EnclaveResponder.edl
package/SampleCode/LocalAttestation/EnclaveResponder/Utility_E2.h
package/SampleCode/LocalAttestation/EnclaveResponder/datatypes.h
package/SampleCode/LocalAttestation/EnclaveResponder/EnclaveResponder_private.pem
package/SampleCode/LocalAttestation/EnclaveResponder/EnclaveMessageExchange.h
package/SampleCode/LocalAttestation/EnclaveResponder/Makefile
package/SampleCode/LocalAttestation/EnclaveResponder/EnclaveResponder.cpp
package/SampleCode/LocalAttestation/EnclaveResponder/EnclaveMessageExchange.cpp
package/SampleCode/LocalAttestation/EnclaveInitiator/
package/SampleCode/LocalAttestation/EnclaveInitiator/ReadMe.txt
package/SampleCode/LocalAttestation/EnclaveInitiator/EnclaveInitiator.config.xml
package/SampleCode/LocalAttestation/EnclaveInitiator/EnclaveInitiator.edl
package/SampleCode/LocalAttestation/EnclaveInitiator/Utility_E1.cpp
package/SampleCode/LocalAttestation/EnclaveInitiator/EnclaveInitiator.lds
package/SampleCode/LocalAttestation/EnclaveInitiator/EnclaveInitiator_private.pem
package/SampleCode/LocalAttestation/EnclaveInitiator/EnclaveInitiator.cpp
package/SampleCode/LocalAttestation/EnclaveInitiator/EnclaveMessageExchange.h
package/SampleCode/LocalAttestation/EnclaveInitiator/Makefile
package/SampleCode/LocalAttestation/EnclaveInitiator/Utility_E1.h
package/SampleCode/LocalAttestation/EnclaveInitiator/EnclaveMessageExchange.cpp
package/SampleCode/LocalAttestation/App/
package/SampleCode/LocalAttestation/App/UntrustedEnclaveMessageExchange.h
package/SampleCode/LocalAttestation/App/App.cpp
package/SampleCode/LocalAttestation/App/UntrustedEnclaveMessageExchange.cpp
package/SampleCode/LocalAttestation/App/Makefile
package/SampleCode/LocalAttestation/util/
package/SampleCode/LocalAttestation/util/fifo.cpp
package/SampleCode/LocalAttestation/AppResponder/
package/SampleCode/LocalAttestation/AppResponder/Queue.h
package/SampleCode/LocalAttestation/AppResponder/ReadMe.txt
package/SampleCode/LocalAttestation/AppResponder/CPServer.h
package/SampleCode/LocalAttestation/AppResponder/CPServer.cpp
package/SampleCode/LocalAttestation/AppResponder/Thread.h
package/SampleCode/LocalAttestation/AppResponder/App.cpp
package/SampleCode/LocalAttestation/AppResponder/CPTask.h
package/SampleCode/LocalAttestation/AppResponder/CPTask.cpp
package/SampleCode/LocalAttestation/AppResponder/Makefile
package/SampleCode/LocalAttestation/AppResponder/Thread.cpp
package/SampleCode/LocalAttestation/Include/
package/SampleCode/LocalAttestation/Include/fifo_def.h
package/SampleCode/LocalAttestation/Include/datatypes.h
package/SampleCode/LocalAttestation/Include/cpdef.h
package/SampleCode/LocalAttestation/Include/dh_session_protocol.h
package/SampleCode/LocalAttestation/Include/error_codes.h
package/SampleCode/LocalAttestation/AppInitiator/
package/SampleCode/LocalAttestation/AppInitiator/UntrustedEnclaveMessageExchange.h
package/SampleCode/LocalAttestation/AppInitiator/App.cpp
package/SampleCode/LocalAttestation/AppInitiator/datatypes.h
package/SampleCode/LocalAttestation/AppInitiator/UntrustedEnclaveMessageExchange.cpp
package/SampleCode/LocalAttestation/AppInitiator/Makefile
package/SampleCode/LocalAttestation/README.txt
package/SampleCode/LocalAttestation/buildenv.mk
package/SampleCode/LocalAttestation/Makefile
package/SampleCode/SampleEnclavePCL/
package/SampleCode/SampleEnclavePCL/README.md
package/SampleCode/SampleEnclavePCL/App/
package/SampleCode/SampleEnclavePCL/App/TrustedLibrary/
package/SampleCode/SampleEnclavePCL/App/TrustedLibrary/Libcxx.cpp
package/SampleCode/SampleEnclavePCL/App/TrustedLibrary/Libc.cpp
package/SampleCode/SampleEnclavePCL/App/TrustedLibrary/Thread.cpp
package/SampleCode/SampleEnclavePCL/App/Edger8rSyntax/
package/SampleCode/SampleEnclavePCL/App/Edger8rSyntax/Pointers.cpp
package/SampleCode/SampleEnclavePCL/App/Edger8rSyntax/Functions.cpp
package/SampleCode/SampleEnclavePCL/App/Edger8rSyntax/Arrays.cpp
package/SampleCode/SampleEnclavePCL/App/Edger8rSyntax/Types.cpp
package/SampleCode/SampleEnclavePCL/App/App.cpp
package/SampleCode/SampleEnclavePCL/App/App.h
package/SampleCode/SampleEnclavePCL/Include/
package/SampleCode/SampleEnclavePCL/Include/user_types.h
package/SampleCode/SampleEnclavePCL/Seal/
package/SampleCode/SampleEnclavePCL/Seal/Seal.config.xml
package/SampleCode/SampleEnclavePCL/Seal/Seal.edl
package/SampleCode/SampleEnclavePCL/Seal/Seal.cpp
package/SampleCode/SampleEnclavePCL/Seal/Seal.lds
package/SampleCode/SampleEnclavePCL/Seal/Seal_private.pem
package/SampleCode/SampleEnclavePCL/Enclave/
package/SampleCode/SampleEnclavePCL/Enclave/TrustedLibrary/
package/SampleCode/SampleEnclavePCL/Enclave/TrustedLibrary/Libcxx.cpp
package/SampleCode/SampleEnclavePCL/Enclave/TrustedLibrary/Libcxx.edl
package/SampleCode/SampleEnclavePCL/Enclave/TrustedLibrary/Libc.edl
package/SampleCode/SampleEnclavePCL/Enclave/TrustedLibrary/Thread.edl
package/SampleCode/SampleEnclavePCL/Enclave/TrustedLibrary/Libc.cpp
package/SampleCode/SampleEnclavePCL/Enclave/TrustedLibrary/Thread.cpp
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/Types.edl
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/Pointers.edl
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/Pointers.cpp
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/Functions.edl
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/Arrays.edl
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/Functions.cpp
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/Arrays.cpp
package/SampleCode/SampleEnclavePCL/Enclave/Edger8rSyntax/Types.cpp
package/SampleCode/SampleEnclavePCL/Enclave/Enclave_private.pem
package/SampleCode/SampleEnclavePCL/Enclave/Enclave.edl
package/SampleCode/SampleEnclavePCL/Enclave/Enclave.cpp
package/SampleCode/SampleEnclavePCL/Enclave/Enclave.config.xml
package/SampleCode/SampleEnclavePCL/Enclave/Enclave.h
package/SampleCode/SampleEnclavePCL/Enclave/Enclave.lds
package/SampleCode/SampleEnclavePCL/Makefile
package/SampleCode/SampleEnclavePCL/debug_mock_key.bin
package/SampleCode/Switchless/
package/SampleCode/Switchless/App/
package/SampleCode/Switchless/App/App.cpp
package/SampleCode/Switchless/App/App.h
package/SampleCode/Switchless/Enclave/
package/SampleCode/Switchless/Enclave/Enclave_private.pem
package/SampleCode/Switchless/Enclave/Enclave.edl
package/SampleCode/Switchless/Enclave/Enclave.cpp
package/SampleCode/Switchless/Enclave/Enclave.config.xml
package/SampleCode/Switchless/Enclave/Enclave.h
package/SampleCode/Switchless/Enclave/Enclave.lds
package/SampleCode/Switchless/README.txt
package/SampleCode/Switchless/Makefile
package/SampleCode/SampleCommonLoader/
package/SampleCode/SampleCommonLoader/App/
package/SampleCode/SampleCommonLoader/App/enclave_entry.S
package/SampleCode/SampleCommonLoader/App/sample.cpp
package/SampleCode/SampleCommonLoader/Include/
package/SampleCode/SampleCommonLoader/Include/enclave_entry.h
package/SampleCode/SampleCommonLoader/Include/sgx_enclave_blob.h
package/SampleCode/SampleCommonLoader/Include/sgx_enclave_ss.h
package/SampleCode/SampleCommonLoader/Include/linux-regs.h
package/SampleCode/SampleCommonLoader/README.txt
package/SampleCode/SampleCommonLoader/Makefile
package/SampleCode/SampleEnclave/
package/SampleCode/SampleEnclave/App/
package/SampleCode/SampleEnclave/App/TrustedLibrary/
package/SampleCode/SampleEnclave/App/TrustedLibrary/Libcxx.cpp
package/SampleCode/SampleEnclave/App/TrustedLibrary/Libc.cpp
package/SampleCode/SampleEnclave/App/TrustedLibrary/Thread.cpp
package/SampleCode/SampleEnclave/App/Edger8rSyntax/
package/SampleCode/SampleEnclave/App/Edger8rSyntax/Pointers.cpp
package/SampleCode/SampleEnclave/App/Edger8rSyntax/Functions.cpp
package/SampleCode/SampleEnclave/App/Edger8rSyntax/Arrays.cpp
package/SampleCode/SampleEnclave/App/Edger8rSyntax/Types.cpp
package/SampleCode/SampleEnclave/App/App.cpp
package/SampleCode/SampleEnclave/App/App.h
package/SampleCode/SampleEnclave/Include/
package/SampleCode/SampleEnclave/Include/user_types.h
package/SampleCode/SampleEnclave/.cproject
package/SampleCode/SampleEnclave/.settings/
package/SampleCode/SampleEnclave/.settings/language.settings.xml
package/SampleCode/SampleEnclave/Enclave/
package/SampleCode/SampleEnclave/Enclave/TrustedLibrary/
package/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libcxx.cpp
package/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libcxx.edl
package/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libc.edl
package/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Thread.edl
package/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libc.cpp
package/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Thread.cpp
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Types.edl
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.edl
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.cpp
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Functions.edl
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Arrays.edl
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Functions.cpp
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Arrays.cpp
package/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Types.cpp
package/SampleCode/SampleEnclave/Enclave/Enclave_private.pem
package/SampleCode/SampleEnclave/Enclave/config.03.xml
package/SampleCode/SampleEnclave/Enclave/Enclave.edl
package/SampleCode/SampleEnclave/Enclave/config.04.xml
package/SampleCode/SampleEnclave/Enclave/Enclave.cpp
package/SampleCode/SampleEnclave/Enclave/Enclave.config.xml
package/SampleCode/SampleEnclave/Enclave/Enclave.h
package/SampleCode/SampleEnclave/Enclave/config.02.xml
package/SampleCode/SampleEnclave/Enclave/config.01.xml
package/SampleCode/SampleEnclave/Enclave/Enclave.lds
package/SampleCode/SampleEnclave/.project
package/SampleCode/SampleEnclave/README.txt
package/SampleCode/SampleEnclave/Makefile
package/SampleCode/RemoteAttestation/
package/SampleCode/RemoteAttestation/.cproject
package/SampleCode/RemoteAttestation/.settings/
package/SampleCode/RemoteAttestation/.settings/language.settings.xml
package/SampleCode/RemoteAttestation/isv_enclave/
package/SampleCode/RemoteAttestation/isv_enclave/isv_enclave_private.pem
package/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.edl
package/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.cpp
package/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.lds
package/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.config.xml
package/SampleCode/RemoteAttestation/service_provider/
package/SampleCode/RemoteAttestation/service_provider/network_ra.h
package/SampleCode/RemoteAttestation/service_provider/service_provider.cpp
package/SampleCode/RemoteAttestation/service_provider/ecp.cpp
package/SampleCode/RemoteAttestation/service_provider/service_provider.h
package/SampleCode/RemoteAttestation/service_provider/ecp.h
package/SampleCode/RemoteAttestation/service_provider/remote_attestation_result.h
package/SampleCode/RemoteAttestation/service_provider/network_ra.cpp
package/SampleCode/RemoteAttestation/service_provider/ias_ra.cpp
package/SampleCode/RemoteAttestation/service_provider/ias_ra.h
package/SampleCode/RemoteAttestation/isv_app/
package/SampleCode/RemoteAttestation/isv_app/sample_messages.h
package/SampleCode/RemoteAttestation/isv_app/isv_app.cpp
package/SampleCode/RemoteAttestation/.project
package/SampleCode/RemoteAttestation/README.txt
package/SampleCode/RemoteAttestation/sample_libcrypto/
package/SampleCode/RemoteAttestation/sample_libcrypto/sample_libcrypto.h
package/SampleCode/RemoteAttestation/sample_libcrypto/libsample_libcrypto.so
package/SampleCode/RemoteAttestation/Makefile
package/pkgconfig/
package/pkgconfig/libsgx_quote_ex.pc
package/pkgconfig/libsgx_launch.pc
package/pkgconfig/libsgx_urts.pc
package/pkgconfig/libsgx_epid_sim.pc
package/pkgconfig/libsgx_uae_service.pc
package/pkgconfig/libsgx_uae_service_sim.pc
package/pkgconfig/libsgx_quote_ex_sim.pc
package/pkgconfig/libsgx_urts_sim.pc
package/pkgconfig/libsgx_launch_sim.pc
package/pkgconfig/libsgx_epid.pc
package/include/
package/include/sgx_urts.h
package/include/sgx_capable.h
package/include/sgx_pthread.edl
package/include/sgx_tcrypto.h
package/include/sgx_attributes.h
package/include/sgx_uae_epid.h
package/include/sgx_cpuid.h
package/include/libcxx/
package/include/libcxx/cmath
package/include/libcxx/set
package/include/libcxx/exception
package/include/libcxx/stdbool.h
package/include/libcxx/random
package/include/libcxx/initializer_list
package/include/libcxx/deque
package/include/libcxx/ios
package/include/libcxx/__mutex_base
package/include/libcxx/__functional_03
package/include/libcxx/typeinfo
package/include/libcxx/shared_mutex
package/include/libcxx/cassert
package/include/libcxx/stdexcept
package/include/libcxx/regex
package/include/libcxx/ctime
package/include/libcxx/limits
package/include/libcxx/codecvt
package/include/libcxx/__tuple
package/include/libcxx/cfloat
package/include/libcxx/forward_list
package/include/libcxx/stack
package/include/libcxx/cinttypes
package/include/libcxx/__split_buffer
package/include/libcxx/__refstring
package/include/libcxx/strstream
package/include/libcxx/__config
package/include/libcxx/__tree
package/include/libcxx/complex.h
package/include/libcxx/typeindex
package/include/libcxx/iomanip
package/include/libcxx/__bit_reference
package/include/libcxx/fstream
package/include/libcxx/__sso_allocator
package/include/libcxx/ciso646
package/include/libcxx/cctype
package/include/libcxx/cstddef
package/include/libcxx/cstdarg
package/include/libcxx/cstdio
package/include/libcxx/atomic
package/include/libcxx/__debug
package/include/libcxx/cstdbool
package/include/libcxx/chrono
package/include/libcxx/__sgx
package/include/libcxx/locale
package/include/libcxx/__locale
package/include/libcxx/__functional_base
package/include/libcxx/type_traits
package/include/libcxx/__std_stream
package/include/libcxx/algorithm
package/include/libcxx/clocale
package/include/libcxx/__undef___deallocate
package/include/libcxx/cstdlib
package/include/libcxx/istream
package/include/libcxx/sstream
package/include/libcxx/support/
package/include/libcxx/support/sgx/
package/include/libcxx/support/sgx/sgx_invoke
package/include/libcxx/support/sgx/__sgx_mutex_base
package/include/libcxx/support/sgx/sgx_condition_variable
package/include/libcxx/support/sgx/sgx_mutex
package/include/libcxx/numeric
package/include/libcxx/scoped_allocator
package/include/libcxx/complex
package/include/libcxx/ctgmath
package/include/libcxx/cwctype
package/include/libcxx/new
package/include/libcxx/system_error
package/include/libcxx/map
package/include/libcxx/ccomplex
package/include/libcxx/cwchar
package/include/libcxx/ostream
package/include/libcxx/iostream
package/include/libcxx/csignal
package/include/libcxx/unordered_map
package/include/libcxx/future
package/include/libcxx/__functional_base_03
package/include/libcxx/cstring
package/include/libcxx/__undef_min_max
package/include/libcxx/streambuf
package/include/libcxx/tuple
package/include/libcxx/vector
package/include/libcxx/utility
package/include/libcxx/experimental/
package/include/libcxx/experimental/set
package/include/libcxx/experimental/dynarray
package/include/libcxx/experimental/deque
package/include/libcxx/experimental/__memory
package/include/libcxx/experimental/filesystem
package/include/libcxx/experimental/regex
package/include/libcxx/experimental/forward_list
package/include/libcxx/experimental/string_view
package/include/libcxx/experimental/__config
package/include/libcxx/experimental/memory_resource
package/include/libcxx/experimental/chrono
package/include/libcxx/experimental/optional
package/include/libcxx/experimental/type_traits
package/include/libcxx/experimental/algorithm
package/include/libcxx/experimental/system_error
package/include/libcxx/experimental/map
package/include/libcxx/experimental/unordered_map
package/include/libcxx/experimental/tuple
package/include/libcxx/experimental/vector
package/include/libcxx/experimental/utility
package/include/libcxx/experimental/ratio
package/include/libcxx/experimental/propagate_const
package/include/libcxx/experimental/functional
package/include/libcxx/experimental/string
package/include/libcxx/experimental/unordered_set
package/include/libcxx/experimental/list
package/include/libcxx/experimental/any
package/include/libcxx/experimental/iterator
package/include/libcxx/iosfwd
package/include/libcxx/ratio
package/include/libcxx/queue
package/include/libcxx/ext/
package/include/libcxx/ext/hash_set
package/include/libcxx/ext/hash_map
package/include/libcxx/ext/__hash
package/include/libcxx/tgmath.h
package/include/libcxx/functional
package/include/libcxx/bitset
package/include/libcxx/string
package/include/libcxx/inttypes.h
package/include/libcxx/csetjmp
package/include/libcxx/thread
package/include/libcxx/unordered_set
package/include/libcxx/__nullptr
package/include/libcxx/list
package/include/libcxx/valarray
package/include/libcxx/array
package/include/libcxx/mutex
package/include/libcxx/__hash_table
package/include/libcxx/cstdint
package/include/libcxx/condition_variable
package/include/libcxx/__threading_support
package/include/libcxx/cerrno
package/include/libcxx/iterator
package/include/libcxx/climits
package/include/libcxx/memory
package/include/libcxx/cfenv
package/include/sgx_thread.h
package/include/sgx_tswitchless.edl
package/include/sgx_tkey_exchange.h
package/include/sgx_ecp_types.h
package/include/sgx_utils.h
package/include/sgx_uswitchless.h
package/include/sgx_trts.h
package/include/sgx_dh.h
package/include/sgx_error.h
package/include/sgx_tkey_exchange.edl
package/include/tlibc/
package/include/tlibc/stdbool.h
package/include/tlibc/stddef.h
package/include/tlibc/wchar.h
package/include/tlibc/stdio.h
package/include/tlibc/float.h
package/include/tlibc/ctype.h
package/include/tlibc/stdlib.h
package/include/tlibc/limits.h
package/include/tlibc/unistd.h
package/include/tlibc/stdarg.h
package/include/tlibc/string.h
package/include/tlibc/math.h
package/include/tlibc/setjmp.h
package/include/tlibc/mbusafecrt.h
package/include/tlibc/endian.h
package/include/tlibc/pthread.h
package/include/tlibc/stdint.h
package/include/tlibc/assert.h
package/include/tlibc/time.h
package/include/tlibc/sys/
package/include/tlibc/sys/cdefs.h
package/include/tlibc/sys/limits.h
package/include/tlibc/sys/_types.h
package/include/tlibc/sys/endian.h
package/include/tlibc/sys/types.h
package/include/tlibc/sys/stdint.h
package/include/tlibc/inttypes.h
package/include/tlibc/errno.h
package/include/tlibc/iso646.h
package/include/tlibc/wctype.h
package/include/sgx_key.h
package/include/sgx_uae_quote_ex.h
package/include/sgx_uae_service.h
package/include/sgx_enclave_common.h
package/include/sgx_report.h
package/include/sgx_trts_exception.h
package/include/sgx_lfence.h
package/include/sgx_defs.h
package/include/sgx_uae_launch.h
package/include/sgx_key_exchange.h
package/include/sgx_secure_align.h
package/include/sgx_edger8r.h
package/include/sgx_ukey_exchange.h
package/include/sgx_tprotected_fs.h
package/include/sgx_pcl_guid.h
package/include/sgx_intrin.h
package/include/sgx.h
package/include/stdc++/
package/include/stdc++/exception
package/include/stdc++/typeinfo
package/include/stdc++/new
package/include/stdc++/linux/
package/include/stdc++/linux/exception
package/include/stdc++/linux/typeinfo
package/include/sgx_secure_align_api.h
package/include/sgx_quote.h
package/include/sgx_spinlock.h
package/include/ipp/
package/include/ipp/sgx_ippcp.h
package/include/ipp/ippcpdefs.h
package/include/ipp/ippcp.h
package/include/ipp/ippversion.h
package/include/sgx_tstdc.edl
package/include/sgx_eid.h
package/include/sgx_tprotected_fs.edl
package/include/sgx_tseal.h
SampleCode/
SampleCode/LocalAttestation/
SampleCode/LocalAttestation/EnclaveInitiator/
SampleCode/LocalAttestation/EnclaveInitiator/datatypes.h
scripts/
scripts/installConfig
scripts/install.sh
[phung@archlinux output]$

I am not sure if that will give /opt/intel/sgxsdk/include ?

Offline

#11 2020-02-02 14:21:17

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: intel sgx psw

  install -dm 755 "$pkgdir/opt/intel/sgxsdk"
  bsdtar -xf linux/installer/common/sdk/output/sgxsdk_1.0.orig.tar.gz -C "$pkgdir/opt/intel/sgxsdk" --strip-components 1 --no-same-owner package

Will place everything from the package directory of the archive under $pkgdir/opt/intel/sgxsdk

Offline

#12 2020-02-02 14:32:17

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

I have modified the PKGBUILD to be as follows, but same error still pops up

cc1plus: error: /opt/intel/sgxsdk/include: No such file or directory [-Werror=missing-include-dirs]

# Maintainer: promach
pkgname=intel_sgx
pkgver=VERSION
pkgrel=1
pkgdesc="Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification"
arch=('i686' 'x86_64')
url="https://01.org/intel-softwareguard-extensions"
license=('GPL')
groups=()
depends=()
makedepends=('cmake' 'protobuf' 'libunwind' 'ocaml' 'ocamlbuild' 'automake' 'autoconf' 'libtool' 'wget' 'python' 'openssl' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!buildflags')
install=
changelog=
source=('git+https://github.com/intel/linux-sgx.git')
noextract=()
md5sums=('SKIP') #generate with 'makepkg -g'

build() {
  cd "$srcdir/linux-sgx"

  ./download_prebuilt.sh
  
   make clean

   make sdk DEBUG=1
   make sdk_install_pkg DEBUG=1

   make psw DEBUG=1
}

package() {
  cd "$srcdir/linux-sgx"

  make DESTDIR="$pkgdir/opt/intel/sgxsdk" install

  install -dm 755 "$pkgdir/opt/intel/sgxsdk"
  bsdtar -xf linux/installer/common/sdk/output/sgxsdk_1.0.orig.tar.gz -C "$pkgdir/opt/intel/sgxsdk" --strip-components 1 --no-same-owner package
}

Last edited by promach (2020-02-02 14:33:14)

Offline

#13 2020-02-02 23:35:50

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: intel sgx psw

The error is from build()

   make psw DEBUG=1

The code in package extracts the sgxsdk archive so that the resulting package would have those files under /opt.
That does not help if you want to call `make psw` in the same PKGBUILD as

   make sdk DEBUG=1

then you probably need to change the value of SGX_SDK used by https://github.com/intel/linux-sgx/blob … uildenv.mk
so the sgxsdk can be found in its build location rather than its install location.

Last edited by loqs (2020-02-02 23:36:10)

Offline

#14 2020-02-03 01:50:06

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

@loqs

Change value of SGX_SDK to .... what, to be exact ?

All the following modifications do not work.

 SGX_SDK ?= $pkgdir/opt/intel/sgxsdk 
 SGX_SDK ?= ../../pkg/opt/intel/sgxsdk 
 make sdk DEBUG=1 SGX_SDK=$srcdir/linux-sgx/opt/intel/sgxsdk 
 make sdk_install_pkg DEBUG=1 SGX_SDK=$srcdir/linux-sgx/opt/intel/sgxsdk 

I have even used absolute path in the following PKGBUILD :

# Maintainer: promach
pkgname=intel_sgx
pkgver=VERSION
pkgrel=1
pkgdesc="Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification"
arch=('i686' 'x86_64')
url="https://01.org/intel-softwareguard-extensions"
license=('GPL')
groups=()
depends=()
makedepends=('cmake' 'protobuf' 'libunwind' 'ocaml' 'ocamlbuild' 'automake' 'autoconf' 'libtool' 'wget' 'python' 'openssl' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!buildflags')
install=
changelog=
source=('git+https://github.com/intel/linux-sgx.git')
noextract=()
md5sums=('SKIP') #generate with 'makepkg -g'

build() {
  cd "$srcdir/linux-sgx"

  grep -rl '/opt/intel/sgxsdk' ./ | xargs -i@ sed -i 's+/opt/intel/sgxsdk+/home/phung/Downloads/intel_sgx/intel_sgx_sdk_and_psw/pkg/opt/intel/sgxsdk+g' @
  ./download_prebuilt.sh
  
   make clean

   make sdk DEBUG=1
   make sdk_install_pkg DEBUG=1

   make psw DEBUG=1
}

package() {
  cd "$srcdir/linux-sgx"

  make DESTDIR="$pkgdir/opt/intel/sgxsdk" install

  install -dm 755 "$pkgdir/opt/intel/sgxsdk"
  bsdtar -xf linux/installer/common/sdk/output/sgxsdk_1.0.orig.tar.gz -C "$pkgdir/opt/intel/sgxsdk" --strip-components 1 --no-same-owner package
}

Last edited by promach (2020-02-03 07:19:33)

Offline

#15 2020-02-04 06:17:04

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

@loqs

I need to perform this step ./src/linux-sgx/linux/installer/bin/sgx_linux_x64_sdk_2.8.100.3.bin before running make psw DEBUG=1 , but I suppose this SDK installing step is handled by package() in PKGBUILD itself.

Any idea ?

Last edited by promach (2020-02-04 06:49:25)

Offline

#16 2020-02-05 09:11:48

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

I managed to install both SDK and PSW using two separate PKGBUILD,

However, I could not source ${sgx-sdk-install-path}/environment which is not found inside directory /opt/intel/sgxsdk

Could anyone advise ?

PKGBUILD for SDK

# Maintainer: promach
pkgname=linux-sgx-sdk
pkgver=r300.9ddec08f
pkgrel=1
pkgdesc="Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification"
arch=('i686' 'x86_64')
url="https://01.org/intel-softwareguard-extensions"
license=('GPL')
groups=()
depends=()
makedepends=('cmake' 'protobuf' 'libunwind' 'ocaml' 'ocamlbuild' 'automake' 'autoconf' 'libtool' 'wget' 'python' 'openssl' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!buildflags')
install=
changelog=
source=('git+https://github.com/intel/linux-sgx.git')
noextract=()
md5sums=('SKIP') #generate with 'makepkg -g'

build() {
   cd "$srcdir/linux-sgx"

   ./download_prebuilt.sh
  
   make clean

   make sdk DEBUG=1
   make sdk_install_pkg DEBUG=1
}

pkgver() {
	cd "$srcdir/linux-sgx"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/linux-sgx"

  #echo "no\n/opt/intel/sgxsdk\n" > ./sgx_linux_x64_sdk_*.bin

  #make DESTDIR="$pkgdir/opt/intel/sgxsdk" install

  install -dm 755 "$pkgdir/opt/intel/sgxsdk"
  bsdtar -xf linux/installer/common/sdk/output/sgxsdk_1.0.orig.tar.gz -C "$pkgdir/opt/intel/sgxsdk" --strip-components 1 --no-same-owner package
}

PKGBUILD for PSW

# Maintainer: promach
pkgname=linux-sgx-psw
pkgver=r300.9ddec08f
pkgrel=1
pkgdesc="Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification"
arch=('i686' 'x86_64')
url="https://01.org/intel-softwareguard-extensions"
license=('GPL')
groups=()
depends=()
makedepends=('cmake' 'protobuf' 'libunwind' 'ocaml' 'ocamlbuild' 'automake' 'autoconf' 'libtool' 'wget' 'python' 'openssl' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!buildflags')
install=
changelog=
source=('git+https://github.com/intel/linux-sgx.git')
noextract=()
md5sums=('SKIP') #generate with 'makepkg -g'

build() {
   cd "$srcdir/linux-sgx"

   ./download_prebuilt.sh
  
   make clean

   make psw DEBUG=1
   make psw_install_pkg DEBUG=1
}

pkgver() {
	cd "$srcdir/linux-sgx"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/linux-sgx"

  install -dm 755 "$pkgdir/opt/intel/sgxpsw"
  bsdtar -xf linux/installer/common/psw/output/sgxpsw_1.0.orig.tar.gz -C "$pkgdir/opt/intel/sgxpsw" --strip-components 1 --no-same-owner package
}

Last edited by promach (2020-02-05 10:27:30)

Offline

#17 2020-02-05 13:29:19

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: intel sgx psw

https://github.com/intel/linux-sgx/blob … .tmpl#L179

It appears the file is only added to ./linux/installer/bin/sgx_linux_x64_sdk_2.8.100.3.bin not to the .tar.gz

Offline

#18 2020-02-06 03:00:22

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

@loqs

In this case, how shall I modify the PKGBUILD for SDK ?

When I try to use the following PKGBUILD, I just have the following error:

sed: can't read /home/phung/Downloads/intel_sgx/intel_sgx_sdk/pkg/linux-sgx-sdk/opt/intel/sgxsdk/sgxsdk/pkgconfig/libsgx_uae_service_sim.pc: No such file or directory
make: *** [Makefile:89: update_pkgconfig] Error 2

I found the actual location of the above file at src/opt/intel/sgxsdk/sgxsdk/pkgconfig/libsgx_uae_service_sim.pc:Name: libsgx_uae_service_sim

# Maintainer: promach
pkgname=linux-sgx-sdk
pkgver=r300.9ddec08f
pkgrel=1
pkgdesc="Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification"
arch=('i686' 'x86_64')
url="https://01.org/intel-softwareguard-extensions"
license=('GPL')
groups=()
depends=()
makedepends=('cmake' 'protobuf' 'libunwind' 'ocaml' 'ocamlbuild' 'automake' 'autoconf' 'libtool' 'wget' 'python' 'openssl' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!buildflags')
install=
changelog=
source=('git+https://github.com/intel/linux-sgx.git')
noextract=()
md5sums=('SKIP') #generate with 'makepkg -g'

build() {
   cd "$srcdir/linux-sgx"

   ./download_prebuilt.sh
  
   make clean

   make sdk DEBUG=1
   make sdk_install_pkg DEBUG=1
}

pkgver() {
	cd "$srcdir/linux-sgx"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/linux-sgx/linux/installer/bin"

  install -dm 755 "$pkgdir/opt/intel/sgxsdk"
  #echo -e "no\n$pkgdir/opt/intel/sgxsdk\n" | ./sgx_linux_x64_sdk_*.bin

  printf '%s\n' no "$pkgdir/opt/intel/sgxsdk" | ./sgx_linux_x64_sdk_*.bin

  #make DESTDIR="$pkgdir/opt/intel/sgxsdk" install

  #bsdtar -xf linux/installer/common/sdk/output/sgxsdk_1.0.orig.tar.gz -C "$pkgdir/opt/intel/sgxsdk" --strip-components 1 --no-same-owner package
}

Last edited by promach (2020-02-06 07:38:02)

Offline

#19 2020-02-07 07:02:14

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

#Intel SGX SDK /opt/intel/sgxpsw/lib64/
export SGX_SDK=/opt/intel/sgxsdk
export PATH=$PATH:$SGX_SDK/bin:$SGX_SDK/bin/x64
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$SGX_SDK/pkgconfig
if [ -z "$LD_LIBRARY_PATH" ]; then
     export LD_LIBRARY_PATH=$SGX_SDK/lib64:/usr/lib/x86_64-linux-gnu
else
     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SGX_SDK/lib64:/usr/lib/x86_64-linux-gnu
fi

I used the above environment script together with the two PKGBUILD in the previous post

However, I have problem running the sgx software demo which gave the following error:

[phung@archlinux HelloEnclave]$ ./app
Please use the correct uRTS library from PSW package.
Error: Unexpected error occurred.
Enter a character before exit ...

[phung@archlinux HelloEnclave]$

When I searched for relevant solution, I found that I do not have this file /usr/lib/libsgx_urts.so installed

Last edited by promach (2020-02-07 07:06:27)

Offline

#20 2020-02-13 21:08:07

huck
Member
Registered: 2020-02-13
Posts: 4

Re: intel sgx psw

I've used the PKGBUILDs and am using the same environment on 4.19.98-1-MANJARO. I have the same issue, but have gotten code to run after some messing around.

/usr/lib/libsgx_urts.so is located at both /opt/intel/sgxpsw/lib64/libsgx_urts.so and /opt/intel/sgxsdk/lib64/libsgx_urts.so.

If you are running a simulated build you should use the sgxsdk version. A simulated build can be made with make SGX_MODE=SIM.
If you are running a regular build you are expected to use the sgxpsw version.

Also note that some of the sample code from the software demos you are running are out of date and will fail to link.
HelloWorld should work fine though.

Offline

#21 2020-02-14 01:57:38

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

@huck

Could you please paste your PKGBUILDs here in plain text ?

That will help a lot of people in the future.

Offline

#22 2020-02-15 03:02:58

huck
Member
Registered: 2020-02-13
Posts: 4

Re: intel sgx psw

I used the same ones that you posted, but after installing them I created some symlinks and load against the psw libraries first. This is clearly not the correct method to install and I would not recommend others to follow.

I'm not very familiar with arch PKGBUILD.
It seems like there are a lot of symlinks that are made when make install is run, but it is not clear to me how to incorporate these into the PKGBUILD.

The exact commands I used to get stuff working were

sudo ln /opt/intel/sgxpsw/lib64/libsgx_enclave_common.so /opt/intel/sgxpsw/lib64/libsgx_enclave_common.so.1
export LD_LIBRARY_PATH=/opt/intel/sgxpsw/lib64:/opt/intel/sgxsdk/lib64:/usr/lib/x86_64-linux-gnu

Offline

#23 2020-02-15 03:19:01

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

I used the same ones that you posted, but after installing them I created some symlinks and load against the psw libraries first.

I posted a few PKGBUILD in multiple posts scattered in this thread, which PKGBUILD to be exact ?

Offline

#24 2020-02-15 03:47:39

huck
Member
Registered: 2020-02-13
Posts: 4

Re: intel sgx psw

To consolidate all the information into one post here are the PKGBUILDs I used

# Maintainer: promach
pkgname=linux-sgx-sdk
pkgver=r300.9ddec08f
pkgrel=1
pkgdesc="Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification"
arch=('i686' 'x86_64')
url="https://01.org/intel-softwareguard-extensions"
license=('GPL')
groups=()
depends=()
makedepends=('cmake' 'protobuf' 'libunwind' 'ocaml' 'ocamlbuild' 'automake' 'autoconf' 'libtool' 'wget' 'python' 'openssl' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!buildflags')
install=
changelog=
source=('git+https://github.com/intel/linux-sgx.git')
noextract=()
md5sums=('SKIP') #generate with 'makepkg -g'

build() {
   cd "$srcdir/linux-sgx"

   ./download_prebuilt.sh
  
   make clean

   make sdk DEBUG=1
   make sdk_install_pkg DEBUG=1
}

pkgver() {
	cd "$srcdir/linux-sgx"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/linux-sgx"

  #echo "no\n/opt/intel/sgxsdk\n" > ./sgx_linux_x64_sdk_*.bin

  #make DESTDIR="$pkgdir/opt/intel/sgxsdk" install

  install -dm 755 "$pkgdir/opt/intel/sgxsdk"
  bsdtar -xf linux/installer/common/sdk/output/sgxsdk_1.0.orig.tar.gz -C "$pkgdir/opt/intel/sgxsdk" --strip-components 1 --no-same-owner package
}
# Maintainer: promach
pkgname=linux-sgx-psw
pkgver=r300.9ddec08f
pkgrel=1
pkgdesc="Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification"
arch=('i686' 'x86_64')
url="https://01.org/intel-softwareguard-extensions"
license=('GPL')
groups=()
depends=()
makedepends=('cmake' 'protobuf' 'libunwind' 'ocaml' 'ocamlbuild' 'automake' 'autoconf' 'libtool' 'wget' 'python' 'openssl' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!buildflags')
install=
changelog=
source=('git+https://github.com/intel/linux-sgx.git')
noextract=()
md5sums=('SKIP') #generate with 'makepkg -g'

build() {
   cd "$srcdir/linux-sgx"

   ./download_prebuilt.sh
  
   make clean

   make psw DEBUG=1
   make psw_install_pkg DEBUG=1
}

pkgver() {
	cd "$srcdir/linux-sgx"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/linux-sgx"

  install -dm 755 "$pkgdir/opt/intel/sgxpsw"
  bsdtar -xf linux/installer/common/psw/output/sgxpsw_1.0.orig.tar.gz -C "$pkgdir/opt/intel/sgxpsw" --strip-components 1 --no-same-owner package
}

Here are the commands I ran afterwards:

sudo ln /opt/intel/sgxpsw/lib64/libsgx_enclave_common.so /opt/intel/sgxpsw/lib64/libsgx_enclave_common.so.1
export LD_LIBRARY_PATH=/opt/intel/sgxpsw/lib64:/opt/intel/sgxsdk/lib64:/usr/lib/x86_64-linux-gnu

It seems like the sdk is properly installed, but the psw needs to move the .so files to the /usr/lib directory. The makefiles have a lot of symlinking and moving of .so files.
To anyone who just found this thread: the commands posted here are NOT a recommended installation method.

Last edited by huck (2020-02-15 03:51:03)

Offline

#25 2020-02-15 04:13:08

promach
Member
Registered: 2016-05-18
Posts: 96

Re: intel sgx psw

It seems like the sdk is properly installed, but the psw needs to move the .so files to the /usr/lib directory. The makefiles have a lot of symlinking and moving of .so files.

The two commands you posted above did not move the .so files to the /usr/lib directory though.

Did you miss anything ?
Did you miss any other commands ?

Offline

Board footer

Powered by FluxBB