Cryptopp: Android compiling doesn't seem to work with NDK r15c

Created on 8 Sep 2017  Â·  17Comments  Â·  Source: weidai11/cryptopp

Trying to compile the latest source (as of b6f79af) for Android with NDK r15c doesn't seem to work when following the directions on the wiki page.

Environment (incorporates fix from #490):

export ANDROID_NDK_ROOT=/home/[username]/android-ndk-r15c
export AOSP_API=android-21
// edit AOSP_STL_INC in setenv-android.sh to be AOSP_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/include" for llvm
./setenv-android.sh arm64-v8a llvm

Compile attempt on WIndows Ubuntu subsystem command line:

make -f GNUmakefile-cross clean
$ make -f GNUmakefile-cross
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c cryptlib.cpp
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c cpu.cpp
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c integer.cpp
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c 3way.cpp
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c adler32.cpp
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c algebra.cpp
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c algparam.cpp
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c arc4.cpp
g++ -DNDEBUG -g2 -O3 -fPIC -pipe -c aria-simd.cpp
In file included from aria-simd.cpp:18:0:
/usr/lib/gcc/x86_64-linux-gnu/5/include/tmmintrin.h: In function ‘void CryptoPP::ARIA_ProcessAndXorBlock_Xor_SSSE3(const byte*, CryptoPP::byte*, const byte*, CryptoPP::word32*)’:
/usr/lib/gcc/x86_64-linux-gnu/5/include/tmmintrin.h:136:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi8(__m128i, __m128i)’: target specific option mismatch
 _mm_shuffle_epi8 (__m128i __X, __m128i __Y)
 ^
aria-simd.cpp:127:18: error: called from here
  _mm_storeu_si128(reinterpret_cast<__m128i*>(outBlock),
                  ^
In file included from aria-simd.cpp:18:0:
/usr/lib/gcc/x86_64-linux-gnu/5/include/tmmintrin.h:136:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi8(__m128i, __m128i)’: target specific option mismatch
 _mm_shuffle_epi8 (__m128i __X, __m128i __Y)
 ^
aria-simd.cpp:127:18: error: called from here
  _mm_storeu_si128(reinterpret_cast<__m128i*>(outBlock),
                  ^
In file included from aria-simd.cpp:18:0:
/usr/lib/gcc/x86_64-linux-gnu/5/include/tmmintrin.h:136:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi8(__m128i, __m128i)’: target specific option mismatch
 _mm_shuffle_epi8 (__m128i __X, __m128i __Y)
 ^
aria-simd.cpp:127:18: error: called from here
  _mm_storeu_si128(reinterpret_cast<__m128i*>(outBlock),
                  ^
GNUmakefile-cross:327: recipe for target 'aria-simd.o' failed
make: *** [aria-simd.o] Error 1

This appears to have something to do with the SSSE3 code? Adding -mssse3 to CXXFLAGS in GNUmakefile-cross did not appear to help (see here and here).

Bug android

All 17 comments

Thanks @Deadpikle.

Yeah, that's a bug on our part. We should not be in an x86 code path unless you are building for a x86 phone or tablet.

Here's the offending code from aria-simd.cpp:

#if (CRYPTOPP_SSSE3_AVAILABLE)
# include "tmmintrin.h"
#endif

CRYPTOPP_SSSE3_AVAILABLE is set in confg.h. It looks like something is a little bent. It should not set it in a cross-compile environment.

If you have a moment, can you provide the _full_ output of ./setenv-android.sh arm64-v8a llvm? It will tell me the tools it found.

I should have something checked in shortly. I need to setup a Ubuntu/Android test rig.

@noloader Here you go! Note that I'm using the integrated Ubuntu bash terminal in Windows 10...thing. Whatever you call it.

$ ./setenv-android.sh arm64-v8a llvm
ANDROID_NDK_ROOT: /home/[username]/android-ndk-r15c
AOSP_TOOLCHAIN_PATH: /home/[username]/android-ndk-r15c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin
AOSP_ABI: arm64-v8a
AOSP_API: android-21
AOSP_SYSROOT: /home/[username]/android-ndk-r15c/platforms/android-21/arch-arm64
AOSP_FLAGS: -funwind-tables -fexceptions -frtti
AOSP_STL_INC: /home/[username]/android-ndk-r15c/sources/cxx-stl/llvm-libc++/include
AOSP_STL_LIB: /home/[username]/android-ndk-r15c/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so

*******************************************************************************
It looks the the environment is set correctly. Your next step is build
the library with 'make -f GNUmakefile-cross'. You can create a versioned
shared object using 'HAS_SOLIB_VERSION=1 make -f GNUmakefile-cross'
*******************************************************************************

@Deadpikle, Thanks again.

After you run ./setenv-android.sh, can you performs the following from the terminal:

$(CXX) -dumpmachine

I suspect we picked up the host compiler (i686 or x86_64), and not the target compiler (ARM). That selection occurs in setenv-android.sh. Using the host compiler this activated from config.h : 390 or so:

#if (defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__)) && !CRYPTOPP_BOOL_X32
    #define CRYPTOPP_BOOL_X86 1
#endif

#if (defined(_M_X64) || defined(__x86_64__)) && !CRYPTOPP_BOOL_X32
    #define CRYPTOPP_BOOL_X64 1
#endif

And then we went down the rabbit hole.

@noloader Is this what you're looking for? I see the x86_64 that you mentioned.

$ gcc -dumpmachine
x86_64-linux-gnu

Edit: Here's gcc -v in case it's helpful:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

Is this what you're looking for? I see the x86_64 that you mentioned.

Yes, that's what I was looking for if you ran it using $(CXX) (literally) after setenv-android.sh was run. If you are literally typing gcc, then no; its not helpful.

Instead, try this... from a command prompt enter:

$   echo "$CXX"

You should see something like:

.../toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/arm-androideabi-g++

Then, perform the following. Make the shell interpret $(CXX):

$  $(CXX) -dumpmachine

@noloader Oh, whoops, yeah, I definitely misunderstood you and outright did the wrong thing. My apologies.

Looks like I can't just do ./setenv-android arm64-v8a llvm,because otherwise the variables aren't exported to the current bash session. (See SO post here.) If I instead do . ./setenv-android arm64-v8a llvm, I obtain the following results:

$ echo "$CXX"
aarch64-linux-android-g++
$ $(CXX) -dumpmachine
CXX: command not found
-dumpmachine: command not found

Which makes sense given the $CXX output. (Is this an error in the setenv-android.sh script?) If I navigate manually to that version of g++, I get...

$ ../android-ndk-r15c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -dumpmachine
aarch64-linux-android

Given the new issue of the environment variables not being set in my bash session properly in my initial bug report, I tried re-calling make GNU-makefile-cross again and got the following error:

cpu.cpp:22:27: fatal error: cpu-features.h: No such file or directory

...which is caused by my own PR. If I then comment out that #include, I of course get errors that android_getCpuFeatures() isn't found. Hmmm....Going to post now as this is getting long and continue investigating.

Edit: in re-reading the wiki, I see that "Notice the leading dot" in the setenv call is in bold and I still missed it. My apologies again. 😓

OK. Sorry for the multiple posts, but I'm trying to keep things clear while I research.

cpu-features.h is in the folder [ndk root]/sources/android/cpufeatures, so adding CXXFLAGS += -I$(ANDROID_NDK_ROOT)/sources/android/cpufeatures to GNUmakefile-cross fixes that immediate issue.

Then I get errors with NEON items, so I added -DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_AESNI to the CXXFLAGS as well in following what works for ndk-build. This lets things compile until this line:

arm-linux-androideabi-g++ -o cryptest.exe -DNDEBUG -g2 -O3 -fPIC -pipe -march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -Wl,--fix-cortex-a8 -funwind-tables -fexceptions -frtti -DANDROID --sysroot=/home/[username]/android-ndk-r15c/platforms/android-21/arch-arm -Wa,--noexecstack -I/home/[username]/android-ndk-r15c/sources/cxx-stl/llvm-libc++/include -I/home/mbabienco/android-ndk-r15c/sources/android/cpufeatures -DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_AESNI adhoc.o test.o bench1.o bench2.o validat0.o validat1.o validat2.o validat3.o datatest.o regtest1.o regtest2.o regtest3.o fipsalgt.o dlltest.o ./libcryptopp.a  /home/[username]/android-ndk-r15c/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so
cpu.cpp:398: error: undefined reference to 'android_getCpuFeatures'

I'm guessing this is ultimately a linker error since the include dir is there? I've run out of time to work on this today, but I think if we also got -I$(ANDROID_NDK_ROOT)/sources/android/cpufeatures\cpu-features.c compiling we'd be in OK shape. However, for the record, I did get a libcryptopp.a file generated, so things are working more than they did before.

tl;dr: Looks like the initial error this report was made for was user error (sorry), but the use of cpu-features.h means the GNUmakefile-cross file needs to be tweaked to at least add the include directory for cpu-features.h.

in re-reading the wiki, I see that "Notice the leading dot" in the setenv call is in bold and I still missed it.

I'm going to have to change it. Several people have had problems with it. It is a trend that points to gaps in our documentation.

I'll switch to the source command. It should make it a little harder to omit the command.


> $ $(CXX) -dumpmachine
> CXX: command not found
> -dumpmachine: command not found

This was wrong. the command does not need the parenthesis:

$  $CXX -dumpmachine
arm-linux-androideabi

Then I get errors with NEON items, so I added -DCRYPTOPP_DISABLE_ASM-DCRYPTOPP_DISABLE_SSSE3 -DCRYPTOPP_DISABLE_AESNI` to the CXXFLAGS

We should never need DCRYPTOPP_DISABLE_ASM. Its a safety valve in case things go horribly wrong.

Something is broke and we need to identify it and fix it.


I think if we also got -I$(ANDROID_NDK_ROOT)/sources/android/cpufeatures\cpu-features.c compiling we'd be in OK shape.

Think in terms of SYSROOT, not NDK_ROOT. On you desktop, you are used to SYSROOT being /. Headers are in SYSROOT/usr/include (which is /usr/include), and libraries are in are in SYSROOT/usr/lib (which is /usr/lib).

We set AOSP_SYSROOT, so you will find headers at AOSP_SYSROOT/usr/include and libraries at AOSP_SYSROOT/usr/lib.

We pass the sysroot we want to use to the compiler with --sysroot=$AOSP_SYSROOT. The compiler knows exactly where to find headers and libraries.


but the use of cpu-features.h means the GNUmakefile-cross file needs to be tweaked to at least add the include directory for cpu-features.h.

Usually you just add the subdirectory prefix. In this case, Commit b255bf26ec404d23 added machine:

#include <machine/cpu-features.h>

Now I am seeing:

cryptopp$ make -f GNUmakefile-cross
arm-linux-androideabi-g++ -DNDEBUG -g2 -O3 -fPIC -pipe -march=armv5te -mtune=xscale -mthumb -msoft-float -funwind-tables -fexceptions -frtti -DANDROID --sysroot=/opt/android-ndk/platforms/android-21/arch-arm -Wa,--noexecstack -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -c cpu.cpp
In file included from cpu.cpp:26:0:
/opt/android-ndk/platforms/android-21/arch-arm/usr/include/machine/cpu-features.h:52:6: error: #error Unknown or unsupported ARM architecture
 #    error Unknown or unsupported ARM architecture
      ^
cpu.cpp: In function 'bool CryptoPP::CPU_QueryNEON()':
cpu.cpp:402:29: error: 'android_getCpuFeatures' was not declared in this scope
  if (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON)
                             ^
cpu.cpp:402:33: error: 'ANDROID_CPU_ARM_FEATURE_NEON' was not declared in this scope
  if (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON)
                                 ^
make: *** [cpu.o] Error 1

This looks like arm, not armeabi: -march=armv5te -mtune=xscale -mthumb.

@Deadpikle,

We added some logic to setenv-android.sh to copy cpu-features.h and cpu-features.c to PWD. Then GNUmakefile-cross builds it in place and adds it to libcryptopp.a.

Also see Commit 6e1a07025c0b.

@noloader Excellent! I hadn't had the chance to get back to looking at this. I'll attempt to verify that ndkbuild still works with the machine/cpu-features.h include when I get a chance, but I don't see why it wouldn't work. Thanks again!

@Deadpikle,

GCC works are expected, I believe.

I'm having trouble finding the Clang option to enable Aarch64. According to Android docs at Working with Clang | Clang targets with ARM, it looks like Clang only supports 32-bit ARM, and not 64-bit ARM.

The lack of 64-bit support results in the following error:

aarch64-linux-android-g++ -o cryptest.exe -DNDEBUG -g2 -O3 -fPIC -pipe -funwind-tables -fexceptions -frtti -DANDROID --sysroot=/opt/android-ndk/platforms/android-21/arch-arm64 -Wa,--noexecstack -I/opt/android-ndk/sources/cxx-stl/llvm-libc++/include adhoc.o test.o bench1.o bench2.o validat0.o validat1.o validat2.o validat3.o datatest.o regtest1.o regtest2.o regtest3.o fipsalgt.o dlltest.o ./libcryptopp.a  /opt/android-ndk/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so
./libcryptopp.a(crc.o): In function `CryptoPP::CRC32C::Update(unsigned char const*, unsigned long)':
/home/jwalton/cryptopp/crc.cpp:309: undefined reference to `CryptoPP::CRC32C_Update_ARMV8(unsigned char const*, unsigned long, unsigned int&)'
./libcryptopp.a(crc.o): In function `CryptoPP::CRC32::Update(unsigned char const*, unsigned long)':
/home/jwalton/cryptopp/crc.cpp:143: undefined reference to `CryptoPP::CRC32_Update_ARMV8(unsigned char const*, unsigned long, unsigned int&)'
./libcryptopp.a(gcm.o): In function `CryptoPP::GCM_Base::AuthenticateBlocks(unsigned char const*, unsigned long)':
/home/jwalton/cryptopp/gcm.cpp:377: undefined reference to `CryptoPP::GCM_AuthenticateBlocks_PMULL(unsigned char const*, unsigned long, unsigned char const*, unsigned char*)'
./libcryptopp.a(gcm.o): In function `CryptoPP::GCM_Base::ReverseHashBufferIfNeeded()':
/home/jwalton/cryptopp/gcm.cpp:291: undefined reference to `CryptoPP::GCM_ReverseHashBufferIfNeeded_PMULL(unsigned char*)'
/home/jwalton/cryptopp/gcm.cpp:291: undefined reference to `CryptoPP::GCM_ReverseHashBufferIfNeeded_PMULL(unsigned char*)'
./libcryptopp.a(gcm.o): In function `CryptoPP::GCM_Base::SetKeyWithoutResync(unsigned char const*, unsigned long, CryptoPP::NameValuePairs const&)':
/home/jwalton/cryptopp/gcm.cpp:176: undefined reference to `CryptoPP::GCM_SetKeyWithoutResync_PMULL(unsigned char const*, unsigned char*, unsigned int)'
./libcryptopp.a(rijndael.o): In function `CryptoPP::Rijndael::Enc::AdvancedProcessBlocks(unsigned char const*, unsigned char const*, unsigned char*, unsigned long, unsigned int) const':
/home/jwalton/cryptopp/rijndael.cpp:1147: undefined reference to `CryptoPP::Rijndael_Enc_AdvancedProcessBlocks_ARMV8(unsigned int const*, unsigned long, unsigned char const*, unsigned char const*, unsigned char*, unsigned long, unsigned int)'
./libcryptopp.a(rijndael.o): In function `CryptoPP::Rijndael::Dec::AdvancedProcessBlocks(unsigned char const*, unsigned char const*, unsigned char*, unsigned long, unsigned int) const':
/home/jwalton/cryptopp/rijndael.cpp:1214: undefined reference to `CryptoPP::Rijndael_Dec_AdvancedProcessBlocks_ARMV8(unsigned int const*, unsigned long, unsigned char const*, unsigned char const*, unsigned char*, unsigned long, unsigned int)'
./libcryptopp.a(sha.o): In function `CryptoPP::SHA1::HashMultipleBlocks(unsigned int const*, unsigned long)':
/home/jwalton/cryptopp/sha.cpp:188: undefined reference to `CryptoPP::SHA1_HashMultipleBlocks_ARMV8(unsigned int*, unsigned int const*, unsigned long, CryptoPP::ByteOrder)'
./libcryptopp.a(sha.o): In function `CryptoPP::SHA256::HashMultipleBlocks(unsigned int const*, unsigned long)':
/home/jwalton/cryptopp/sha.cpp:688: undefined reference to `CryptoPP::SHA256_HashMultipleBlocks_ARMV8(unsigned int*, unsigned int const*, unsigned long, CryptoPP::ByteOrder)'
./libcryptopp.a(sha.o): In function `CryptoPP::SHA224::HashMultipleBlocks(unsigned int const*, unsigned long)':
/home/jwalton/cryptopp/sha.cpp:737: undefined reference to `CryptoPP::SHA256_HashMultipleBlocks_ARMV8(unsigned int*, unsigned int const*, unsigned long, CryptoPP::ByteOrder)'
./libcryptopp.a(sha.o): In function `CryptoPP::SHA1::Transform(unsigned int*, unsigned int const*)':
/home/jwalton/cryptopp/sha.cpp:165: undefined reference to `CryptoPP::SHA1_HashMultipleBlocks_ARMV8(unsigned int*, unsigned int const*, unsigned long, CryptoPP::ByteOrder)'
./libcryptopp.a(sha.o): In function `CryptoPP::SHA256::Transform(unsigned int*, unsigned int const*)':
/home/jwalton/cryptopp/sha.cpp:657: undefined reference to `CryptoPP::SHA256_HashMultipleBlocks_ARMV8(unsigned int*, unsigned int const*, unsigned long, CryptoPP::ByteOrder)'
collect2: error: ld returned 1 exit status
make: *** [cryptest.exe] Error 1

When I add -march=arm64, then it results in:

default.cpp:1:0: error: unknown value 'arm64' for -march
 // default.cpp - originally written and placed in the public domain by Wei Dai
 ^
Assembler messages:
Error: unknown architecture `arm64'

Error: unrecognized option -march=arm64

@Deadpikle,

You might want to pickup Commit 8d984173064b360a. It adds additional compiler options for Aarch32 and Aarch64. git pull is probably the easiest rather than cherry-picking.

The procedures on the wiki were changed to use source setenv-android.sh instead of . setenv-android.sh. I changed it for all build procedures, including Android, iOS, ARM Embedded and ARM bare-metal. I hope it makes it harder to omit the step. Also see Android (Command Line).

Finally, now open in the AOSP Tracker: Issue 65641866, Dirty compile when compiling cpu-feature.c with C++ compiler.

@noloader Sorry, I haven't had the chance to look at things yet! 😅 I'm still planning to do so -- perhaps as late as this coming Sunday, but it is on my TODO! (The wiki change for source instead of . will surely save many people like me time!)

@noloader Finally had some time today to recheck things on my end. nkd-build works perfectly and as expected.

GNUmakefile-cross no longer works due to commit 3e237540fe63183d0e85b7bc160c7e148c5dc6ff, but it does work at commit a835443b3435801068286148702ed9468a485220. The error is as follows:

aarch64-linux-android-g++ -DNDEBUG -g2 -O3 -fPIC -pipe -funwind-tables -fexceptions -frtti -DANDROID --sysroot=/home/mbabienco/android-ndk-r15c//platforms/android-21/arch-arm64 -Wa,--noexecstack -I/home/mbabienco/android-ndk-r15c//sources/cxx-stl/llvm-libc++/include -c cpu.cpp
cpu.cpp: In function 'void CryptoPP::DetectArmFeatures()':
cpu.cpp:609:28: error: '_SC_LEVEL1_DCACHE_LINESIZE' was not declared in this scope
  g_cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
                            ^
GNUmakefile-cross:363: recipe for target 'cpu.o' failed

It seems as though that SHOULD be defined somewhere (see bionic sources here as well as the fact that several sysconf.h files have it defined in the NDK).

Would an acceptable fix be to change this:

#if defined(__linux__)
        g_cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
#endif

to this:

#if defined(__linux__) && defined(_SC_LEVEL1_DCACHE_LINESIZE)
        g_cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
#endif

And similar changes elsewhere where that #define is used in cpu.cpp.

> #if defined(__linux__) && defined(_SC_LEVEL1_DCACHE_LINESIZE)
>         g_cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
> #endif

Oh, sorry about that.

Yeah, that makes sense. Do you want to make a PR? Or do you want me to push it?

@noloader Sure, I'll PR in a moment. I just checked in the proper AOSP_SYSROOT sysconf.h for the failure case above (platforms\android-21\arch-arm64\usr\include\sys), and indeed, _SC_LEVEL1_DCACHE_LINESIZE is not defined there. shrug

See #507

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noloader picture noloader  Â·  6Comments

noloader picture noloader  Â·  9Comments

c0ff picture c0ff  Â·  8Comments

smessmer picture smessmer  Â·  9Comments

MarcelRaad picture MarcelRaad  Â·  12Comments