title: compiling libcurl for android mips
body: <p>i've created a script that compiles curl for android for 3 platforms, well more like 4:
   1. armv5
   2. armv7
   3. x86
   4. mips</p>
  
  <p>i do it using this post in SO: <a href="https://stackoverflow.com/questions/11330180/porting-libcurl-on-android-with-ssl-support">enter link description here</a>
  for arm and x86 everything works ok (i use ndk toolchains and openssl specific library which i compiled for those same platform beforehand).
  the only problematic platform is mips. i DO get the libcrul.a,la and .so BUT when trying to compile the executable curl the linkage fails:</p>
  
  <pre><code>libtool: link: mipsel-linux-android-gcc -O2 -Wno-system-headers -o .libs/curl curl-tool_binmode.o curl-tool_bname.o curl-tool_cb_dbg.o curl-tool_cb_hdr.o curl-tool_cb_prg.o curl-tool_cb_rea.o curl-tool_cb_see.o curl-tool_cb_wrt.o curl-tool_cfgable.o curl-tool_convert.o curl-tool_dirhie.o curl-tool_doswin.o curl-tool_easysrc.o curl-tool_formparse.o curl-tool_getparam.o curl-tool_getpass.o curl-tool_help.o curl-tool_helpers.o curl-tool_homedir.o curl-tool_hugehelp.o curl-tool_libinfo.o curl-tool_main.o curl-tool_metalink.o curl-tool_mfiles.o curl-tool_msgs.o curl-tool_operate.o curl-tool_operhlp.o curl-tool_panykey.o curl-tool_paramhlp.o curl-tool_parsecfg.o curl-tool_setopt.o curl-tool_sleep.o curl-tool_urlglob.o curl-tool_util.o curl-tool_vms.o curl-tool_writeenv.o curl-tool_writeout.o curl-tool_xattr.o ../lib/curl-strtoofft.o ../lib/curl-strdup.o ../lib/curl-rawstr.o ../lib/curl-nonblock.o ../lib/curl-warnless.o  -L/usr/local/android-ndk/platforms/android-9/arch-mips/usr/lib -L/home/eyal/devel/openssl/lib ../lib/.libs/libcurl.so -lz
  /usr/local/ndk-toolchains/mipsel-linux-android-4.6/bin/../lib/gcc/mipsel-linux-android/4.6/../../../../mipsel-linux-android/bin/ld: warning: libssl.so.1.1.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)
  /usr/local/ndk-toolchains/mipsel-linux-android-4.6/bin/../lib/gcc/mipsel-linux-android/4.6/../../../../mipsel-linux-android/bin/ld: warning: libcrypto.so.1.1.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)
  ../lib/.libs/libcurl.so: undefined reference to `RAND_load_file'
  ../lib/.libs/libcurl.so: undefined reference to `SSL_CTX_use_certificate'
  ../lib/.libs/libcurl.so: undefined reference to `X509_load_crl_file'
  ../lib/.libs/libcurl.so: undefined reference to `SSL_set_fd'
  ../lib/.libs/libcurl.so: undefined reference to `SSL_set_connect_state'
  ../lib/.libs/libcurl.so: undefined reference to `SSL_CTX_free'
  ../lib/.libs/libcurl.so: undefined reference to `X509_free'
  </code></pre>
  
  <p>there are more 'undefined reference' errors, i spared u...
  the library exists, the -L paths are ok, i checked, permission seems to be fine, and again, it works for both arm and x86 for android.
  i'm using <code>--host=mipsel-linux-android</code> which might be wrong, but seems like it's the right one, the .so and .a are built so something went alright, but ld for some reason can't locate ssl and crypt once it's requested when trying to create and executable.</p>
  
  <p>Anyone has any idea ? when tryying to use the toolchain manually to compile a file using libssl i was successful!</p>
  
  <p>10x.</p>