You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building snmalloc for use within enclaves, we get the following compile error on ARM:
export CCACHE_CPP2=true && /usr/bin/ccache /usr/bin/aarch64-linux-gnu-g++ -I3rdparty/optee/libutee/liboeutee -g -Wall -Werror -Wpointer-arith -Wconversion -Wextra -Wno-missing-field-initializers -fno-strict-aliasing -Wno-type-limits -I/home/anakrish/openenclave_qemu/sdk/include -I/home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include -I/home/anakrish/openenclave_qemu/build/output/include/openenclave/libc -Wno-conversion -ftls-model=local-exec -nostdinc++ -fPIE -ffreestanding -DARM64=1 -D__LP64__=1 -mstrict-align -nostdinc -nostdlib -nodefaultlibs -nostartfiles -fno-builtin-memcpy -fno-builtin-memset -funwind-tables -fpie -fPIC -gdwarf -fno-exceptions -fvisibility=hidden -std=c++14 -std=c++17 -MD -MT 3rdparty/snmalloc/CMakeFiles/oesnmalloc.dir/allocator.cpp.o -MF 3rdparty/snmalloc/CMakeFiles/oesnmalloc.dir/allocator.cpp.o.d -o 3rdparty/snmalloc/CMakeFiles/oesnmalloc.dir/allocator.cpp.o -c /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/allocator.cpp
In file included from /home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/ostream:140:0,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/istream:164,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/iostream:40,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/../ds/../aal/aal_arm.h:15,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/../ds/../aal/aal.h:104,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/../ds/bits.h:8,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/../ds/helpers.h:3,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/globalalloc.h:3,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/slowalloc.h:1,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/malloc.cc:1,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/allocator.cpp:30:
/home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/locale: In function ‘_Tp std::__1::__num_get_signed_integral(const char*, const char*, std::__1::ios_base::iostate&, int)’:
/home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/locale:740:26: error: there are no arguments to ‘strtoll_l’ that depend on a template parameter, so a declaration of ‘strtoll_l’ must be available [-fpermissive]
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
^~~~~~~~~
The error seems to be due to the use of <iostream> in aal_arm.h:
When building snmalloc for use within enclaves, we get the following compile error on ARM:
export CCACHE_CPP2=true && /usr/bin/ccache /usr/bin/aarch64-linux-gnu-g++ -I3rdparty/optee/libutee/liboeutee -g -Wall -Werror -Wpointer-arith -Wconversion -Wextra -Wno-missing-field-initializers -fno-strict-aliasing -Wno-type-limits -I/home/anakrish/openenclave_qemu/sdk/include -I/home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include -I/home/anakrish/openenclave_qemu/build/output/include/openenclave/libc -Wno-conversion -ftls-model=local-exec -nostdinc++ -fPIE -ffreestanding -DARM64=1 -D__LP64__=1 -mstrict-align -nostdinc -nostdlib -nodefaultlibs -nostartfiles -fno-builtin-memcpy -fno-builtin-memset -funwind-tables -fpie -fPIC -gdwarf -fno-exceptions -fvisibility=hidden -std=c++14 -std=c++17 -MD -MT 3rdparty/snmalloc/CMakeFiles/oesnmalloc.dir/allocator.cpp.o -MF 3rdparty/snmalloc/CMakeFiles/oesnmalloc.dir/allocator.cpp.o.d -o 3rdparty/snmalloc/CMakeFiles/oesnmalloc.dir/allocator.cpp.o -c /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/allocator.cpp
In file included from /home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/ostream:140:0,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/istream:164,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/iostream:40,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/../ds/../aal/aal_arm.h:15,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/../ds/../aal/aal.h:104,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/../ds/bits.h:8,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/../ds/helpers.h:3,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/globalalloc.h:3,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/../mem/slowalloc.h:1,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/./snmalloc/src/override/malloc.cc:1,
from /home/anakrish/openenclave_qemu/sdk/3rdparty/snmalloc/allocator.cpp:30:
/home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/locale: In function ‘_Tp std::__1::__num_get_signed_integral(const char*, const char*, std::__1::ios_base::iostate&, int)’:
/home/anakrish/openenclave_qemu/sdk/3rdparty/libcxx/libcxx/include/locale:740:26: error: there are no arguments to ‘strtoll_l’ that depend on a template parameter, so a declaration of ‘strtoll_l’ must be available [-fpermissive]
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
^~~~~~~~~
The error seems to be due to the use of
<iostream>
inaal_arm.h
:snmalloc/src/aal/aal_arm.h
Line 15 in 87dfd41
Removing
iostream
and replacing it withstdint.h
fixes the compilation errors.Can we avoid a dependency on iostreams?
The text was updated successfully, but these errors were encountered: