title: Thrift cross compiling for ARM
body: <p>I have configured and installed thrift package in my Linux machine. Now am trying to cross compile thrift for ARM.</p>
  
  <p>The steps I followed are :</p>
  
  <ol>
  <li>Untar the thrift package</li>
  <li>Configure using <code>./configure --host=arm-linux-gnueabi --without-java --without-python --with-c_glib --with-cpp</code> <br/>
  But when I am doing this, I get the following error </li>
  </ol>
  
  <blockquote>
  <pre><code>checking for boostlib &gt;= 1.54.0... yes
  checking for libevent &gt;= 1.0... configure: error: in '/home/deeraj/arm_thrift':
  configure: error: cannot run test program while cross compiling
  See 'config.log' for more details
  </code></pre>
  </blockquote>
  
  <p>To over come this, I replaced <code>AC_RUN_IFELSE</code> with <code>AC_LINK_IFELSE</code> in the files <code>aclocal/ax_lib_event.m4</code> and <code>aclocal/ax_lib_zlib.m4</code>. After this, I ran the <code>autoconf</code></p>
  
  <p>When I ran the <code>./configure --host=arm-linux-gnueabi --without-java --without-python --with-c_glib --with-cpp</code> again, I got the following error :</p>
  
  <pre><code>checking for setsockopt in -lsocket... no
  checking for BN_init in -lcrypto... no
  configure: error: "Error: libcrypto required."
  </code></pre>
  
  <p>I have already installed <code>libssl-dev</code>, but its not removing the error.</p>
  
  <p>How can we solve this issue and cross compile and install thrift for ARM?</p>