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

Build error on Ubuntu 24.10 #1066

Open
hector-cao opened this issue Oct 15, 2024 · 1 comment
Open

Build error on Ubuntu 24.10 #1066

hector-cao opened this issue Oct 15, 2024 · 1 comment

Comments

@hector-cao
Copy link

I have this build error on Ubuntu 24.10

sdk/Makefile.source

In the target:

  $(MAKE) -C tlibc/ -j$(shell nproc) 2> /dev/null                                                             

The build error:

time/strptime.c:92:1: error: type defaults to 'int' in declaration of 'DEF_WEAK' [-Wimplicit-int]
time/strptime.c:92:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
time/strptime.c: In function '_strptime':

Gcc version

gcc (Ubuntu 14.2.0-4ubuntu2) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The build flags:

g++ -Wnon-virtual-dtor -std=c++17 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -UDEBUG -DNDEBUG -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 -ffreestanding -nostdinc -fvisibility=hidden -fpie -fno-strict-overflow -fno-delete-null-pointer-checks -B/usr/local/bin -mindirect-branch-register -fcf-protection=none -mfunction-return=thunk-extern -fno-plt -Wa,-mlfence-after-load=yes -Wa,-mlfence-before-indirect-branch=memory -Wa,-mlfence-before-ret=shl -nostdinc++ -fno-exceptions -fno-rtti -I. -I/src/common/inc -I/src/common/inc/tlibc -I/src/common/inc/internal -I/src/sdk/trts -I./string/asm -I./gdtoa -c tstdc_version.cpp -o tstdc_version.o
@VuillaumeXB
Copy link

VuillaumeXB commented Jan 13, 2025

  1. You need to add the following lines to the macro DEF_WEAK in the file ./linux-sgx/sdk/tlibc/time/strptime.c

#if 0
DEF_WEAK(strptime);
#endif

  1. To compile SGX SDK for linux, you also need to delete the options '-V -qversion -version' in the file ./linux-sgx/sdk/cpprt/linux/libunwind/configure (this file should be generated by running ./autogen.sh first)

for ac_option in --version -v -V -qversion -version; do (line 4799)
for ac_option in --version -v -V -qversion; do (line 5765)

  1. Modify the file ./linux-sgx/psw/enclave_common/sgx_enclave_common.cpp to add the following header: #include

#include
#include
#include
#include "sgx_enclave_common.h"

  1. Modify the file ./linux-sgx/psw/ae/aesm_service/source/CMakeLists.txt to make it compatible withh C++17 standard

set(CMAKE_CXX_STANDARD 17)

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