title: boost for android building boost log
body: <p>I am trying to build boost 1.54 for android. I am able to do it for date_time, filesystem, regex, program_options, signals, system and thread libraries of boost. But if I add boost log library among these, build fails as saying 'failed updating 8 targets'.</p>
  
  <p>I appended following lines to my user-config.jam</p>
  
  <pre><code>import os ;
  
  androidNDKRoot = C:/android-ndk-r8e ; # put the relevant path
   using gcc : android :
       $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-g++ :
       &lt;compileflags&gt;--sysroot=$(androidNDKRoot)/platforms/android-8/arch-arm
       &lt;compileflags&gt;-mthumb
       &lt;compileflags&gt;-Os
       &lt;compileflags&gt;-fno-strict-aliasing
       &lt;compileflags&gt;-O2
       &lt;compileflags&gt;-DNDEBUG
       &lt;compileflags&gt;-g
       &lt;compileflags&gt;-lstdc++
       &lt;compileflags&gt;-I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.7/include
       &lt;compileflags&gt;-I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi/include
       &lt;compileflags&gt;-D__GLIBC__
       &lt;compileflags&gt;-D_GLIBCXX__PTHREADS
       &lt;compileflags&gt;-D__arm__
       &lt;compileflags&gt;-D_REENTRANT
       &lt;archiver&gt;$(androidNDKRoot)/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-ar
       &lt;ranlib&gt;$(androidNDKRoot)/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-ranlib
           ;
  </code></pre>
  
  <p>I also changed libs/filesystem/src/operations.cpp file in order to compile threading libraries. You can find the necessary change <a href="https://svn.boost.org/trac/boost/ticket/8816#no1" rel="nofollow">here</a>.</p>
  
  <p>My build command is as following</p>
  
  <pre><code>set CXXFLAGS="-I%ANDROID_NDK%/platforms/android-8/arch-arm/usr/include -I%ANDROID_NDK%/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I%ANDROID_NDK%/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include "
  set TOOLSET=gcc-android
  
  .\b2 --toolset=%TOOLSET% --user-config=./user-config-android.jam cxxflags=%CXXFLAGS% threadapi=pthread --prefix=..\boost_android_arm --builddir=./ target-os=linux --with-date_time --with-filesystem --with-regex --with-log define=BOOST_FILESYSTEM_VERSION=3 --with-program_options --with-signals --with-system --with-thread link=static runtime-link=shared threading=multi install
  </code></pre>
  
  <p>As I already told before, it does compile if I don't type <code>--with-log</code> at build command.</p>
  
  <p>Here are couple of lines from output,</p>
  
  <pre><code>gcc.compile.c++ bin.v2\libs\log\build\gcc-android\release\build-no\link-static\log-api-unix\target-os-linux\threadapi-pthread\threading-multi\attribute_name.o
  In file included from libs\log\src\attribute_name.cpp:32:0:
  ./boost/log/detail/light_rw_mutex.hpp:131:5: error: 'pthread_rwlock_t' does not name a type
  ./boost/log/detail/light_rw_mutex.hpp: In constructor 'boost::log::v2s_mt_posix::aux::light_rw_mutex::light_rw_mutex()':
  ./boost/log/detail/light_rw_mutex.hpp:136:30: error: 'm_Mutex' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp:136:43: error: 'pthread_rwlock_init' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp: In destructor 'boost::log::v2s_mt_posix::aux::light_rw_mutex::~light_rw_mutex()':
  ./boost/log/detail/light_rw_mutex.hpp:140:33: error: 'm_Mutex' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp:140:40: error: 'pthread_rwlock_destroy' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp: In member function 'void boost::log::v2s_mt_posix::aux::light_rw_mutex::lock_shared()':
  ./boost/log/detail/light_rw_mutex.hpp:144:32: error: 'm_Mutex' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp:144:39: error: 'pthread_rwlock_rdlock' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp: In member function 'void boost::log::v2s_mt_posix::aux::light_rw_mutex::unlock_shared()':
  ./boost/log/detail/light_rw_mutex.hpp:148:32: error: 'm_Mutex' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp:148:39: error: 'pthread_rwlock_unlock' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp: In member function 'void boost::log::v2s_mt_posix::aux::light_rw_mutex::lock()':
  ./boost/log/detail/light_rw_mutex.hpp:152:32: error: 'm_Mutex' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp:152:39: error: 'pthread_rwlock_wrlock' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp: In member function 'void boost::log::v2s_mt_posix::aux::light_rw_mutex::unlock()':
  ./boost/log/detail/light_rw_mutex.hpp:156:32: error: 'm_Mutex' was not declared in this scope
  ./boost/log/detail/light_rw_mutex.hpp:156:39: error: 'pthread_rwlock_unlock' was not declared in this scope
  </code></pre>
  
  <p>It includes many lines like these, but these are the first error that it gave.</p>
  
  <p>Can someone see what I did wrong or what should I change?</p>
  
  <p>Thanks</p>