title: Android Studio NDK : 'gnu/stubs.h' file not found
body: <p>I'm using Android Studio to create a JNI module, here's my CMakeList.txt:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.5.1)
  
  SET(CMAKE_CXX_FLAGS "-fPIC -std=c++11")
  
  # include deps headers
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/src
                      ${CMAKE_CURRENT_LIST_DIR}/src/3rdparty/re2
                      /usr/include)
  
  # JNI Support
  INCLUDE_DIRECTORIES(/jdk1.8.0_111/include
                      /jdk1.8.0_111/include/linux)
  
  file(GLOB_RECURSE MY_SRC  "src/mypackage/*.cpp")
  
  ADD_LIBRARY(my_target SHARED api.cpp ${MY_SRC})
  </code></pre>
  
  <h3>/usr/include</h3>
  
  <p>The first clue is, this program can't find system headers itself, I need to include <code>/usr/include</code> with <code>INCLUDE_DIRECTORIES</code>. e.g. it can't find <code>boost/version.hpp</code> unless I include <code>/usr/include</code>.</p>
  
  <h3>Problem</h3>
  
  <p>This program turns out a fatal error : <code>Error:(391, 10) fatal error: 'gnu/stubs.h' file not found</code>. It's so wired, I never uses <code>stubs.h</code>. </p>
  
  <p>Then I found there is a <code>stub.h</code> in <code>/usr/include/x86_64-linux-gnu</code>, so I include it as well, but then there's a <code>Error:(7, 11) fatal error: 'gnu/stubs-32.h' file not found</code> and I don't have it in my system. How can I deal with these kind of problem, and I never uses <code>stubs-32.h</code> in my program, shouldn't it be packaged into boost library (if it is required by boost)?</p>