Hi!<br>  There already exist libssl.so and libcrypto.so in Android (in /system/lib/ of my device),<br>but my snappy/libspicec.so got only SEGFAULT if using them,I hope someone has time to check why.<br>  Besides these. All the functions in snappy/libspicec.so works well with all my built libs.<br>
  .eg. I use this cmd to start qemu to fore the use pixman/jpeg/zlib/openssl:<br><i>#sudo qemu-system-x86_64 ... -spice port=5900,password=gnoll,\<br>jpeg-wan-compression=always,\<br>zlib-glz-wan-compression=always<br>   On the device:<br>
#LD_LIBRARY_PATH=./lib ./snappy -h 192.168.1.31 -p 5900 -w gnoll -o ahoo.ppm<br>(snappy:3157): GSpice-DEBUG: spice-session.c:803 session: disconnecting 0<br>(snappy:3157): GSpice-DEBUG: spice-channel.c:127 main-1:0: spice_channel_constructed<br>
(snappy:3157): GSpice-DEBUG: spice-channel.c:1400 Open coroutine starting 0x22018<br>(snappy:3157): GSpice-DEBUG: spice-channel.c:1257 Started background coroutine 0x22044<br>(snappy:3157): GSpice-DEBUG: spice-session.c:900 Resolving host 192.168.1.31 5900<br>
(snappy:3157): GSpice-DEBUG: spice-session.c:913 Trying one socket<br>(snappy:3157): GSpice-DEBUG: spice-session.c:864 Socket pending<br>(snappy:3157): GSpice-DEBUG: spice-session.c:879 Finally connected<br>(snappy:3157): GSpice-DEBUG: spice-channel.c:931 main-1:0: spice_channel_recv_link_msg: 0 caps<br>
(snappy:3157): GSpice-DEBUG: spice-channel.c:793 main-1:0: channel up, state 5<br>(snappy:3157): GSpice-DEBUG: spice-session.c:1015 set mm time: 25115964<br>(snappy:3157): GSpice-DEBUG: spice-channel.c:127 cursor-4:0: spice_channel_constructed<br>
(snappy:3157): GSpice-DEBUG: spice-channel.c:127 display-2:0: spice_channel_constructed<br>(snappy:3157): GSpice-DEBUG: spice-channel.c:127 inputs-3:0: spice_channel_constructed<br>(snappy:3157): GSpice-DEBUG: spice-channel.c:1400 Open coroutine starting 0x2a000<br>
(snappy:3157): GSpice-DEBUG: spice-channel.c:1257 Started background coroutine 0x2a02c<br>(snappy:3157): GSpice-DEBUG: spice-session.c:900 Resolving host 192.168.1.31 5900<br>(snappy:3157): GSpice-DEBUG: spice-session.c:913 Trying one socket<br>
(snappy:3157): GSpice-DEBUG: spice-session.c:864 Socket pending<br>(snappy:3157): GSpice-DEBUG: spice-session.c:879 Finally connected<br>(snappy:3157): GSpice-DEBUG: spice-channel.c:931 display-2:0: spice_channel_recv_link_msg: 0 caps<br>
(snappy:3157): GSpice-DEBUG: spice-channel.c:793 display-2:0: channel up, state 5<br>(snappy:3157): GSpice-DEBUG: channel-display.c:522 display: create primary canvas<br>(snappy:3157): GSpice-DEBUG: snappy.c:44 primary_create: 640x480, format 32<br>
wrote screen shot to ahoo.ppm<br></i>  Best Rgrds.<br><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 3:17 PM, Shuxiang Lim <span dir="ltr">&lt;<a href="mailto:shohyanglim@gmail.com">shohyanglim@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>All the files bz2ed.<div><div></div><div class="h5"><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 2:58 PM, Shuxiang Lim <span dir="ltr">&lt;<a href="mailto:shohyanglim@gmail.com" target="_blank">shohyanglim@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
amakefile attathed.<div><div></div><div><br><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 2:41 PM, Shuxiang Lim <span dir="ltr">&lt;<a href="mailto:shohyanglim@gmail.com" target="_blank">shohyanglim@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,guys!<br>   This is my instructions and patches for porting snappy/libspicec-glib.so extracted from spicec-gtk-0.5 onto Android-ARM.<br>   It&#39;s still nascent and raw though, more hacking is needed!<br>   These are my steps, suppose you&#39;re familiar with cross compiling.<br>





<br>1.I use the android NDK provided by Mozzila which has nearly full C++ support:<br><span style="font-size: medium;"><span style="color: rgb(0, 0, 255);"><span style="color: rgb(136, 136, 136);"><span style="color: rgb(0, 0, 0);"></span></span></span></span><a href="http://ftp.mozilla.org/pub/mozilla.org/mobile/source/android-ndk-r4c-0moz3.tar.bz2" target="_blank">http://ftp.mozilla.org/pub/mozilla.org/mobile/source/android-ndk-r4c-0moz3.tar.bz2</a><br>









and I have modified <span><span>Andrew Ross&#39;s perl script:agcc to extract and use the toolchain from this NDK (attached)<br>2. Then I cross compile glib2.28.1 onto Android in this order:<br></span></span><span><span>1)</span></span><span><span>libiconv-1.13.1.tar.gz: <br>



configured by:<br><i>CC=agcc CXX=agcc LD=arm-eabi-ld RANLIB=arm-eabi-ranlib \<br>



PKG_CONFIG_LIBDIR=/data/local/lib/pkgconfig:/data/local/share/pkgconfig/ \<br>    ./configure \<br>    --prefix=/data/local \<br>    --host=arm-eabi-linux \</i></span></span><span><span></span></span><br>
<span><span><i>    --enable-shared \</i><br> 2)gettext-0.18.1.1.tar.gz<br>configured by:<br>
<i>CC=agcc CPPFLAGS=&quot;-I/data/local/include&quot; LDFLAGS=&quot;-L/data/local/lib&quot; CXX=agcc LD=arm-eabi-ld RANLIB=arm-eabi-ranlib \<br>PKG_CONFIG_LIBDIR=/data/local/lib/pkgconfig:/data/local/share/pkgconfig/ \<br>







    ./configure \<br>    --prefix=/data/local \<br>    --host=arm-eabi-linux \<br>    --enable-shared \<br>    --cache-file=arm.cache \<br>    --without-included-regex \<br>   
--disable-java --disable-openmp --without-libiconv-prefix
--without-libintl-prefix --without-libglib-2.0-prefix
--without-libcroco-0.6-prefix --with-included-libxml
--without-libncurses-prefix --without-libtermcap-prefix
--without-libcurses-prefix --without-libexpat-prefix --without-emacs<br>

  </i> But the build of gettext will not fully succeed,never mind, I need only libintl.so so just make install.<br><br>3)  glib-2.28.1.tar.gz<br></span></span><span><span>1st, do patching with my attached file<br><i>#patch -p0 &lt; </i></span></span><i><span><span> glib-android.patch</span></span></i><br>





<span><span>

 2nd, write this into the cache file arm.cache:<br></span></span><span style="color: blue;" lang="EN-US"><font face="Times New Roman"><font size="3"><font size="2"><i>#cat &gt; arm.cache<br>ac_cv_android_arm=yes<br>glib_cv_stack_grows=no<br>



</i></font></font></font></span><font size="2"><i><span style="color: blue;" lang="EN-US"><font face="Times New Roman">



glib_cv_uscore=no</font></span></i></font><br><font size="2"><i><span style="color: blue;" lang="EN-US"></span><span style="color: blue;" lang="EN-US"><font face="Times New Roman">ac_cv_func_posix_getpwuid_r=no</font></span><br>



<span style="color: blue;" lang="EN-US"><font face="Times New Roman">ac_cv_func_posix_getgrgid_r=no</font></span></i></font><br>ctrl-D<br>


<span><span></span></span><span><span>3rd, make sure you have the tools such as glib-genmarshaller of right vision in your host machine(you may need to first install glib on your host machine)<br></span></span><span><span>4th, autoconf;</span></span><span><span>then configured  the same </span></span><span><span>as libiconv.</span></span><br>



5td, make;make install<br>


<br><span><span>3. Also I have to port pixman and openssl and jpeg onto android.<br></span></span><span><span>1)pixman-0.20.0,jpeg-6b: config. make;make install same as libiconv</span></span><br><span><span>2)openssl-1.0.0: config by:<br>






</span></span>./config no-asm shared --prefix=/data/local/<br><span><span>then modify the Makefile:gcc--&gt;agcc remove the -m64..etc.<br>make;make install<br><br>4. for snappy and libspicec-glib.so<br>1).tar xf spice-gtk-0.5.tar.gz<br>



2).#patch -p0 &lt; snappy-android.patch (file attached)<br>3</span></span><span><span>)</span></span><span><span>.ensure to succeed in the normal ./configure and make on the current host machine to generate config.h and some other files.<br>



<i>#CC=gcc \<br>./configure \<br>--prefix=/usr/local/mylocal \<br>--enable-shared \<br>--cache-file=arm.cache \<br>--with-coroutine=gthread<br>#make<br><br></i>4</span></span><span><span>)</span></span><span><span>.#cd gtk/<br>



5</span></span><span><span>)</span></span><span><span>. you may use or reference my attached file :amakfile<br>  #make clean -f amakefile<br>  #</span></span><span><span>make -f amakefile</span></span><br>6) put the lib*.so files and exec. file snappy onto android device and run.<br>



<i>#LD_LIBRARY_PATH=/system/lib:/data/local/lib ./snappy -h 192.168.1.31 -p 5900 -o ahoo.ppm</i><br><br>You may have check my snapped image ahoo.jpeg&lt;--ahoo.ppm and run-logs in my blogs:<br><a href="http://blog.csdn.net/rozenix/archive/2011/03/25/6277742.aspx" target="_blank">http://blog.csdn.net/rozenix/archive/2011/03/25/6277742.aspx</a><br>



<a href="http://blog.csdn.net/rozenix/archive/2011/03/25/6277647.aspx" target="_blank">http://blog.csdn.net/rozenix/archive/2011/03/25/6277647.aspx</a><br><br><span><span>That&#39;s it! Mail me if you&#39;ve got any problem!<br>


Happy hacking!<br>
</span></span><span><span><br><br> </span></span><br>   <br>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>