<div dir="ltr">Hey all,<div><br></div><div>I finally compiled the OpenSSL for Android, the problem was with the Setenv-android.sh scritp. After fixed it I can compile using the following command line:</div><div><br></div><div>./config shared no-ssl2 no-ssl3 no-comp no-hw no-engine --openssldir=/home/ec2-user/android-openssl/android-12 --prefix=/home/ec2-user/android-openssl/android-12<br></div><div><br></div><div>With OpenSSL 1.1.0c, if I use only --openssldir the make install mess with my system libs. I have to use --prefix together to install in a different path.</div><div><br></div><div>But, now I'm trying to compile another program, using the OpenSSL compiled lib, and I'm getting the following message:</div><div><br></div><div><div>checking openssl/ssl.h usability... yes</div><div>checking openssl/ssl.h presence... yes</div><div>checking for openssl/ssl.h... yes</div><div>checking for library containing SSL_library_init... no</div><div>configure: error: libfko needs ssl</div></div><div><br></div><div>Is it a problem with the compiled OpenSSL lib?</div><div><br>Thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 20, 2016 at 4:09 PM, Leo Goldim <span dir="ltr"><<a href="mailto:goldim@gmail.com" target="_blank">goldim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm trying to compile OpenSSL for Android, after looking at Google I found this page:</div><div><br></div><div><a href="https://wiki.openssl.org/index.php/Android" target="_blank">https://wiki.openssl.org/<wbr>index.php/Android</a><br></div><div><br></div><div>I followed step by step but when I verified my lib (readelf -h ./libcrypto.a | grep -i 'class\|machine' | head -2) I realized that the lib was created for my machine (x86_64) not Android (arm).</div><div><br></div><div>So, I changed the configure command to:</div><div><br></div><div>./Configure android --openssldir=/home/ec2-user/<wbr>android-openssl/android-12<br></div><div><br></div><div>And I got the following error:</div><div><br></div><div><div>make[2]: Entering directory `/home/ec2-user/android-<wbr>openssl/openssl-1.1.0c'</div><div>LD_LIBRARY_PATH=: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSLDIR="/home/ec2-user/<wbr>android-openssl/android-12" -DENGINESDIR="/usr/local/lib/<wbr>engines-1.1" -Wall -O3 -pthread -mandroid -fPIC --sysroot= -Wa,--noexecstack -fPIC -DOPENSSL_USE_NODELETE -Wl,-znodelete -shared -Wl,-Bsymbolic -Wl,-soname=libcrypto.so.1.1 -o ./libcrypto.so.1.1 -Wl,--whole-archive,--version-<wbr>script=crypto.map ./libcrypto.a -Wl,--no-whole-archive -ldl</div><div>/usr/bin/ld: cannot find crtbegin_so.o: No such file or directory</div><div>collect2: error: ld returned 1 exit status</div><div>make[2]: *** [link_shlib.linux-shared] Error 1</div><div>make[2]: Leaving directory `/home/ec2-user/android-<wbr>openssl/openssl-1.1.0c'</div><div>make[1]: *** [libcrypto.so] Error 2</div><div>make[1]: Leaving directory `/home/ec2-user/android-<wbr>openssl/openssl-1.1.0c'</div><div>make: *** [all] Error 2</div></div><div><br></div><div>Someone already compiled the OpenSSL version 1.1.0c for Android and can help me?</div><div><br></div><div>Thanks</div></div>
</blockquote></div><br></div>