0

I'm building parquet-cpp project on Ubuntu for Android using cmake 3.10 (by following tutorials "Cross Compiling for Android with a Standalone Toolchain" in this link). I got this error:

In file included from /usr/include/errno.h:28:
/usr/include/features.h:391:10: fatal error: 'gnu/stubs.h' file not found
#include <gnu/stubs.h>

I checked compiling command and found an argument -isystem /usr/include. I tried to exclude /usr/include from search paths but I failed. This is the full command:

<standalone_toolchain>/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=<standalone_toolchain> --sysroot=<standalone_toolchain>/sysroot -DBOOST_ALL_DYN_LINK -DBOOST_TEST_DYN_LINK -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Dthriftz_EXPORTS -I<source_dir>/parquet-cpp/build/thrift_ep-prefix/src/thrift_ep-build/lib/cpp -I<source_dir>/parquet-cpp/build/thrift_ep-prefix/src/thrift_ep/lib/cpp -I<source_dir>/parquet-cpp/build/thrift_ep-prefix/src/thrift_ep-build -I<source_dir>/parquet-cpp/build/thrift_ep-prefix/src/thrift_ep/lib/cpp/src -isystem /usr/include -isystem <standalone_toolchain>/sysroot/usr/include -isystem <standalone_toolchain>/include/c++/4.9.x -isystem <standalone_toolchain>/include/c++/4.9.x/arm-linux-androideabi/bits -march=armv7-a -marm -mfpu=neon -mfloat-abi=softfp -funwind-tables -no-canonical-prefixes --sysroot <standalone_toolchain>/sysroot -Qunused-arguments -ggdb -O0 -g -fPIC -Wno-variadic-macros -Wno-long-long -Wno-c++11-long-long -Wno-deprecated-register -pthread -g -fPIC -std=c++11 -o CMakeFiles/thriftz.dir/src/thrift/transport/TZlibTransport.cpp.o -c <source_dir>/parquet-cpp/build/thrift_ep-prefix/src/thrift_ep/lib/cpp/src/thrift/transport/TZlibTransport.cpp

I've tried lots of ways I found out when googling (i.e. here and here) but nothing works.

Can anyone here help me? Note that I'm a newbie to cross compiling :(

thamht4190
  • 11
  • 5

1 Answers1

-1

if you mean by exclude is to delete: then type this in the terminal --> sudo gksu nautilus a new file manager window will open were you can access all files as root, now reach you file then delete it.

Mohamed Abdou
  • 441
  • 3
  • 11
  • 1
    No, I meant I want to exclude "-isystem /usr/include" from the compiling command generated by cmake :) – thamht4190 Mar 30 '18 at 09:26
  • I observed the same issue with cmake v3.17. For earlier version such as v3.4 this issue is not present. Try older version of cmake. – Rohan Ghige Jan 18 '21 at 12:57