[Galaxy Note 10.1 (2014 Edition) Original Android D] franzli:
Building trouble

Hi and thanks a lot for your work on getting CM14.1 to the P600!

I'm having regular trouble with one particular bluetooth keyboard that lags on any CM ROM (on any device I've tested so far), but not on AOSP ROMs. Seeing that there is no modern AOSP version for the P600, I'm trying to play around with the sources to see if I can figure out the problem, or patch the issue somehow (it's very much playing around as I don't have much of a clue).

I've been trying to compile CM14.1 from source usingthe exynos5420 device trees etc., but my build breaks with the error given below. If anyone could give any advice as to what may be going wrong, that would be great!

...
[ 41% 13993/34127] target thumb C++: libandroid_run.../base/core/jni/android/graphics/pdf/PdfRenderer.cpp
In file included from frameworks/base/core/jni/android/graphics/Bitmap.h:24:0,
from frameworks/base/core/jni/android/graphics/GraphicsJNI.h:4,
from frameworks/base/core/jni/android/graphics/pdf/PdfRenderer.cpp:19:
external/libcxx/include/memory: In member function 'FX_BOOL CPDF_SyntaxParser::IsEncrypted()':
external/libcxx/include/memory:3016:1: note: candidate 1: bool std::__1::operator!=(const std::__1::unique_ptr<_Tp, _Dp>&, std::nullptr_t) [with _T1 = CPDF_CryptoHandler; _D1 = std::__1::default_delete<CPDF_CryptoHandler>; std::nullptr_t = std::nullptr_t]
operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
^
In file included from bionic/libc/include/stdio.h:48:0,
from bionic/libc/include/wchar.h:32,
from external/libcxx/include/iosfwd:90,
from external/libcxx/include/iterator:346,
from external/libcxx/include/memory:606,
from frameworks/base/core/jni/android/graphics/Bitmap.h:24,
from frameworks/base/core/jni/android/graphics/GraphicsJNI.h:4,
from frameworks/base/core/jni/android/graphics/pdf/PdfRenderer.cpp:19:
external/pdfium/core/include/fpdfapi/fpdf_parser.h:286:54: note: candidate 2: operator!=(int, int) <built-in>
FX_BOOL IsEncrypted() { return m_pCryptoHandler != NULL; }
^
[ 41% 14106/34127] target thumb C++: libui <= frameworks/native/libs/ui/Gralloc1On0Adapter.cpp
FAILED: /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I device/samsung/n1awifi/include -I frameworks/native/libs/ui -I /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates -I /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/gen/SHARED_LIBRARIES/libui_intermediates -I libnativehelper/include/nativehelper \$(cat /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem hardware/ril/include -isystem /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/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 -isystem bionic/libm/include -isystem bionic/libm/include/arm -c -fno-exceptions -Wno-multichar -DCAMERA_SNUMINTS=28 -DDISABLE_HW_ID_MATCH_CHECK -DSAMSUNG_CAMERA_HARDWARE -DSAMSUNG_DVFS -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 -mfpu=neon-vfpv4 -D__ARM_FEATURE_LPAE=1 -mfloat-abi=softfp -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -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 -std=gnu++14 -std=c++1y -Weverything -Werror -Wno-exit-time-destructors -Wno-global-constructors -Wno-c++98-compat-pedantic -Wno-four-char-constants -Wno-padded -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates/Gralloc1On0Adapter.d -o /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates/Gralloc1On0Adapter.o frameworks/native/libs/ui/Gralloc1On0Adapter.cpp ) && (cp /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates/Gralloc1On0Adapter.d /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates/Gralloc1On0Adapter.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates/Gralloc1On0Adapter.d >> /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates/Gralloc1On0Adapter.P; rm -f /media/georg/minischloider/dev/cm-14.1/out/target/product/n1awifi/obj/SHARED_LIBRARIES/libui_intermediates/Gralloc1On0Adapter.d )"
In file included from frameworks/native/libs/ui/Gralloc1On0Adapter.cpp:21:
device/samsung/n1awifi/include/hardware/gralloc.h:417:36: error: use of old-style cast [-Werror,-Wold-style-cast]
GRALLOC_HARDWARE_GPU0, (struct hw_device_t**)device);
^ ~~~~~~
1 error generated.
[ 41% 14106/34127] target thumb C++: libui <= frameworks/native/libs/ui/GraphicBufferMapper.cpp
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/media/georg/minischloider/dev/cm-14.1'

#### make failed to build some targets (02:05:39 (hh:mm:ss)) ####

I'm building on Debian testing with jdk 8. I have been able to build an AOSP ROM for the Galaxy Tab S (and various marshmallow CM ROMs), so I assume that my building environment is set up alright.