title: Android NDK cannot cross compile SQLite - crtend_so.o: No such file or directory
body: <p>I'm trying to cross compile sqlite sources for android platform.
  This is my config for env</p>
  
  <pre><code>export NDK=/home/lukassz/android-ndk
  
  export NDK_ROOT=/home/lukassz/android-ndk
  export PATH=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$PATH
  export CC=arm-linux-androideabi-gcc
  export LD=arm-linux-androideabi-ld
  export CPPFLAGS=-I$NDK_ROOT/platforms/android-18/arch-arm/usr/include
  export CFLAGS="-nostdlib" LDFLAGS="-Wl,-rpath-link=$NDK_ROOT/platforms/android-18/arch-arm/usr/lib/ -L$NDK_ROOT/platforms/android-18/arch-arm/usr/lib"
  export LIBS="-lc"
  
  export CPP=arm-linux-androideabi-cpp
  export CC=arm-linux-androideabi-gcc
  export CXX=arm-linux-androideabi-g++
  export LD=arm-linux-androideabi-ld
  export AS=arm-linux-androideabi-as
  export AR=arm-linux-androideabi-ar
  export RANLIB=arm-linux-androideabi-ranlib
  
  
  export ANDROID_SYSROOT=$NDK_ROOT/platforms/android-18/arch-arm
  export CPPFLAGS="--sysroot=$ANDROID_SYSROOT"
  export CFLAGS="--sysroot=$ANDROID_SYSROOT"
  export CXXFLAGS="--sysroot=$ANDROID_SYSROOT"
  </code></pre>
  
  <p>Next I make <code>./configure</code> with</p>
  
  <pre><code>./configure --host=arm-linux-androideabi CC=arm-linux-androideabi-gcc LD=arm-linux-androideabi-ld CPPFLAGS="-I$NDK_ROOT/platforms/android-18/arch-arm/usr/include" CFLAGS="-nostdlib" LDFLAGS="-Wl,-rpath-link=$NDK_ROOT/platforms/android-18/arch-arm/usr/lib/ -L$NDK_ROOT/platforms/android-18/arch-arm/usr/lib" LIBS="-lc"
  </code></pre>
  
  <p>No errors, but when I type <code>make</code> I gets </p>
  
  <pre><code>libtool: link: arm-linux-androideabi-gcc -shared  -fPIC -DPIC  .libs/sqlite3.o   -L/home/lukassz/android-ndk/platforms/android-18/arch-arm/usr/lib -ldl -lc  -Wl,-rpath-link=/home/lukassz/android-ndk/platforms/android-18/arch-arm/usr/lib/   -Wl,-soname -Wl,libsqlite3.so -o .libs/libsqlite3.so
  /home/lukassz/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_so.o: No such file or directory
  /home/lukassz/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_so.o: No such file or directory
  collect2: error: ld returned 1 exit status
  Makefile:456: recipe for target 'libsqlite3.la' failed
  make: *** [libsqlite3.la] Error 1
  </code></pre>
  
  <p>Where is the problem? </p>