[Android] a13x4nd3r:
Error compiling libcxx

Hi guys, i'm currently trying to compile aosp for my samsung note 4. There were some few errors before but luckily i managed to fix it until this one.. Here's the log..

FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-2812033/bin/clang++	-I system/media/camera/include -I system/core/base/include/android-base -I device/samsung/trelte-common/camera -I out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates -I out/target/product/treltexx/gen/SHARED_LIBRARIES/camera.universal5433_intermediates -I libnativehelper/include/nativehelper \$(cat out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem out/target/product/treltexx/obj/include -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm -c -fno-exceptions -Wno-multichar -msoft-float -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a15 -D__ARM_FEATURE_LPAE=1 -mfloat-abi=softfp -mfpu=neon -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -fdebug-prefix-map=/proc/self/cwd= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -DNDEBUG -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc -target arm-linux-androideabi -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -fvisibility-inlines-hidden -Wsign-promo -Wno-inconsistent-missing-override -nostdlibinc -target arm-linux-androideabi -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -fPIC -D_USING_LIBCXX -DANDROID_STRICT -std=gnu++14 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates/CameraWrapper.d -o out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates/CameraWrapper.o device/samsung/trelte-common/camera/CameraWrapper.cpp ) && (cp out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates/CameraWrapper.d out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates/CameraWrapper.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates/CameraWrapper.d >> out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates/CameraWrapper.P; rm -f out/target/product/treltexx/obj/SHARED_LIBRARIES/camera.universal5433_intermediates/CameraWrapper.d )"
In file included from device/samsung/trelte-common/camera/CameraWrapper.cpp:29:
In file included from system/core/include/cutils/log.h:1:
In file included from system/core/include/log/log.h:34:
In file included from bionic/libc/include/time.h:33:
In file included from bionic/libc/include/sys/time.h:37:
In file included from bionic/libc/include/sys/select.h:33:
In file included from bionic/libc/include/signal.h:152:
In file included from bionic/libc/include/android/legacy_signal_inlines.h:34:
In file included from bionic/libc/include/string.h:41:
In file included from system/core/base/include/android-base/strings.h:20:
In file included from external/libcxx/include/sstream:174:
In file included from external/libcxx/include/ostream:138:
In file included from external/libcxx/include/ios:215:
external/libcxx/include/iosfwd:100:1: error: templates must have C++ linkage
template<class _CharT> struct _LIBCPP_TYPE_VIS_ONLY char_traits;
^~~~~~~~~~~~~~~~~~~~~~
external/libcxx/include/iosfwd:101:1: error: templates must have C++ linkage
template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY allocator;
^~~~~~~~~~~~~~~~~~~
external/libcxx/include/iosfwd:103:41: error: unknown type name 'char_traits'
template <class _CharT, class _Traits = char_traits<_CharT> >
^
external/libcxx/include/iosfwd:103:52: error: expected ',' or '>' in template-parameter-list
template <class _CharT, class _Traits = char_traits<_CharT> >

the rest of the error are caused by that first 2 error.. "templates must have C++ linkage". my C++ knowledge just doesn't suffice here... :crying:

Any help would be appreciated! THANKS