How to build OpenSSL on Android/Linux ?

10,008

Solution 1

One solution is also to shorten the openssl build path, eg. from c:\code\openssl-android to just c:\ssl

Solution 2

Looks like only i had such problem. Here is a solution i found, mayby someone will figure out why this happend. Saved command line to separate file called bild_data (output from ndk-build), then removed from it g++ call, this way my build file had only list of files and needed flags. Then i just executed from cygwin arm-linux-androideabi-g++ @build_data After that i had my 'precious' libcrypto.so, ndk-build executed again with libcrypto.so alerdy builded from command line, builded openssl library. For me it looks like command line that was over 31kb did not fit to cygwin buffer :(

Solution 3

I had the same problem building on Windows (cygwin), and shortening the path to the project directory (see mango's answer) is what worked for me.

Share:
10,008

Related videos on Youtube

Marcin Waśniowski
Author by

Marcin Waśniowski

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." Albert Einstein

Updated on June 04, 2022

Comments

  • Marcin Waśniowski
    Marcin Waśniowski almost 2 years

    Hi I'm in need to build OpenSSL lib for Android NDK r5b, today it will be second day of my ... useles fight. Here is short list what i've done

    1. Downloaded: https://github.com/fries/android-external-openssl/
    2. As i found here on StackOverflow fixed .S <->.s problem
    3. Crypto gets builded... until i get this message:

    /prebuilt/windows/bin/arm-linux-androideabi- SharedLibrary : libcrypto.so arm-linux-androideabi-g++.exe: CreateProcess: No such file or directory make: * [/cygdrive/c/AndroidDev/AndroidOpenSSL/obj/local/armeabi/libcrypto.so] Error 1*

    It's 10 years when i last time used make, and i was sure it's problem with g++ path. Added some debug to toolchain, and got:

    TOOLCHAIN_NAME: arm-linux-androideabi-4.4.3 TOOLCHAIN_PREFIX: /cygdrive/c/Android_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-

    both looks fine for me, as /cygdrive/c/Android_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/ does exist, and arm-linux-androideabi-g++.exe is right there :(

    Any one ever had this same problem? I realy have no idea where to look any future :( Will be appreciative for help