[Toybox] What am I doing wrong with ndk-r20?

Rob Landley rob at landley.net
Mon Oct 7 12:40:11 PDT 2019


When I do this it fails:

$ CC=clang CROSS_COMPILE=~/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android16-
LDFLAGS=--static make distclean defconfig toybox
In file included from ./toys.h:9:
./lib/portability.h:290:10: fatal error: 'processgroup/sched_policy.h' file not found
#include <processgroup/sched_policy.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~

The header says:

// libprocessgroup is an Android platform library not included in the NDK.
#if defined(__BIONIC__) && !defined(__ANDROID_NDK__)
#include <processgroup/sched_policy.h>
#else
static inline int get_sched_policy(int tid, void *policy) {return 0;}
static inline char *get_sched_policy_name(int policy) {return "unknown";}
#endif

The android NDK is not defining __ANDROID_NDK__?

$ cd ~/android-ndk-r20/
$ grep -r __ANDROID_NDK__
$

Apparently not.

Rob




More information about the Toybox mailing list