Don't build apps?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Don't build apps?

Jeffrey Walton-3
I'm working with OpenSSL 1.0.1h. I'm configuring for android-x86.

setenv-android.sh worked fine, and exported the following:

    export MACHINE=i686
    export RELEASE=2.6.37
    export SYSTEM=android
    export ARCH=x86

    export CROSS_COMPILE="i686-linux-android-"
    export ANDROID_DEV="$ANDROID_NDK_ROOT/platforms/$_ANDROID_API/$_ANDROID_ARCH/usr"
    export HOSTCC=gcc

$ echo $ANDROID_DEV
/opt/android-ndk-r9/platforms/android-14/arch-x86/usr

The configure looks like so:

    $ ./config shared -no-ssl2 -no-ssl3 -no-comp -no-hw -no-engine
--openssldir=/usr/local/ssl/android-14/

However, compilation is failing because the programs are being
compiled (more correctly, the missing comp.h):

$ make
....
i686-linux-android-gcc -DMONOLITH -I.. -I../include  -fPIC
-DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
-DHAVE_DLFCN_H -Wa,--noexecstack -mandroid
-I/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
-B/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/lib -O3
-fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
-DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o dhparam.o dhparam.c
i686-linux-android-gcc -DMONOLITH -I.. -I../include  -fPIC
-DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
-DHAVE_DLFCN_H -Wa,--noexecstack -mandroid
-I/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
-B/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/lib -O3
-fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
-DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o enc.o enc.c
enc.c:70:26: fatal error: openssl/comp.h: No such file or directory
compilation terminated.
make[1]: *** [enc.o] Error 1
make: *** [build_apps] Error 1

How do I stop the attempt to compile the programs? What change is made
to stop building of programs during a cross-compile of, for example,
Android (arm) and iOS (arm)?

Thanks in advance.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Don't build apps?

Jeffrey Walton-3
Configuring with no-apps does not work either (even though it states
its skipping the directory):

$ ./config shared -no-ssl2 -no-ssl3 -no-comp -no-hw -no-engine
-no-apps --openssldir=/usr/local/ssl/android-14/
Operating system: i686-whatever-android
Configuring for android-x86
    no-apps         [option]   OPENSSL_NO_APPS (skip dir)
    no-comp         [option]   OPENSSL_NO_COMP (skip dir)
    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)
    no-engine       [option]   OPENSSL_NO_ENGINE (skip dir)
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
    no-hw           [option]   OPENSSL_NO_HW
...

On Wed, Jun 11, 2014 at 1:49 AM, Jeffrey Walton <[hidden email]> wrote:

> I'm working with OpenSSL 1.0.1h. I'm configuring for android-x86.
>
> setenv-android.sh worked fine, and exported the following:
>
>     export MACHINE=i686
>     export RELEASE=2.6.37
>     export SYSTEM=android
>     export ARCH=x86
>
>     export CROSS_COMPILE="i686-linux-android-"
>     export ANDROID_DEV="$ANDROID_NDK_ROOT/platforms/$_ANDROID_API/$_ANDROID_ARCH/usr"
>     export HOSTCC=gcc
>
> $ echo $ANDROID_DEV
> /opt/android-ndk-r9/platforms/android-14/arch-x86/usr
>
> The configure looks like so:
>
>     $ ./config shared -no-ssl2 -no-ssl3 -no-comp -no-hw -no-engine
> --openssldir=/usr/local/ssl/android-14/
>
> However, compilation is failing because the programs are being
> compiled (more correctly, the missing comp.h):
>
> $ make
> ....
> i686-linux-android-gcc -DMONOLITH -I.. -I../include  -fPIC
> -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
> -DHAVE_DLFCN_H -Wa,--noexecstack -mandroid
> -I/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
> -B/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/lib -O3
> -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
> -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
> -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o dhparam.o dhparam.c
> i686-linux-android-gcc -DMONOLITH -I.. -I../include  -fPIC
> -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
> -DHAVE_DLFCN_H -Wa,--noexecstack -mandroid
> -I/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
> -B/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/lib -O3
> -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
> -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
> -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o enc.o enc.c
> enc.c:70:26: fatal error: openssl/comp.h: No such file or directory
> compilation terminated.
> make[1]: *** [enc.o] Error 1
> make: *** [build_apps] Error 1
>
> How do I stop the attempt to compile the programs? What change is made
> to stop building of programs during a cross-compile of, for example,
> Android (arm) and iOS (arm)?
>
> Thanks in advance.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Don't build apps?

Stacy Devino

Hey Jeff,

You might want to look at Arne Swabe's ics-openvpn.

https://code.google.com/p/ics-openvpn/

If you are just looking for how to compile for various android chip arch's. He is using and Android.mk file which is a Make file that is specific to Android, but if you know one you can figure out the other.

He also has pretty clean code on the JNI for linking (whichever you would need in an app) .

Be sure to say thanks to him! Buy him a beer if its helpful!

Stacy Wylie
stacydevino.com
Android and Mobile Design guru

On Jun 11, 2014 1:02 AM, "Jeffrey Walton" <[hidden email]> wrote:
Configuring with no-apps does not work either (even though it states
its skipping the directory):

$ ./config shared -no-ssl2 -no-ssl3 -no-comp -no-hw -no-engine
-no-apps --openssldir=/usr/local/ssl/android-14/
Operating system: i686-whatever-android
Configuring for android-x86
    no-apps         [option]   OPENSSL_NO_APPS (skip dir)
    no-comp         [option]   OPENSSL_NO_COMP (skip dir)
    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)
    no-engine       [option]   OPENSSL_NO_ENGINE (skip dir)
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
    no-hw           [option]   OPENSSL_NO_HW
...

On Wed, Jun 11, 2014 at 1:49 AM, Jeffrey Walton <[hidden email]> wrote:
> I'm working with OpenSSL 1.0.1h. I'm configuring for android-x86.
>
> setenv-android.sh worked fine, and exported the following:
>
>     export MACHINE=i686
>     export RELEASE=2.6.37
>     export SYSTEM=android
>     export ARCH=x86
>
>     export CROSS_COMPILE="i686-linux-android-"
>     export ANDROID_DEV="$ANDROID_NDK_ROOT/platforms/$_ANDROID_API/$_ANDROID_ARCH/usr"
>     export HOSTCC=gcc
>
> $ echo $ANDROID_DEV
> /opt/android-ndk-r9/platforms/android-14/arch-x86/usr
>
> The configure looks like so:
>
>     $ ./config shared -no-ssl2 -no-ssl3 -no-comp -no-hw -no-engine
> --openssldir=/usr/local/ssl/android-14/
>
> However, compilation is failing because the programs are being
> compiled (more correctly, the missing comp.h):
>
> $ make
> ....
> i686-linux-android-gcc -DMONOLITH -I.. -I../include  -fPIC
> -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
> -DHAVE_DLFCN_H -Wa,--noexecstack -mandroid
> -I/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
> -B/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/lib -O3
> -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
> -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
> -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o dhparam.o dhparam.c
> i686-linux-android-gcc -DMONOLITH -I.. -I../include  -fPIC
> -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
> -DHAVE_DLFCN_H -Wa,--noexecstack -mandroid
> -I/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
> -B/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/lib -O3
> -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
> -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
> -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o enc.o enc.c
> enc.c:70:26: fatal error: openssl/comp.h: No such file or directory
> compilation terminated.
> make[1]: *** [enc.o] Error 1
> make: *** [build_apps] Error 1
>
> How do I stop the attempt to compile the programs? What change is made
> to stop building of programs during a cross-compile of, for example,
> Android (arm) and iOS (arm)?
>
> Thanks in advance.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Don't build apps?

Dr. Stephen Henson
In reply to this post by Jeffrey Walton-3
On Wed, Jun 11, 2014, Jeffrey Walton wrote:

> I'm working with OpenSSL 1.0.1h. I'm configuring for android-x86.
>
> setenv-android.sh worked fine, and exported the following:
>
>     export MACHINE=i686
>     export RELEASE=2.6.37
>     export SYSTEM=android
>     export ARCH=x86
>
>     export CROSS_COMPILE="i686-linux-android-"
>     export ANDROID_DEV="$ANDROID_NDK_ROOT/platforms/$_ANDROID_API/$_ANDROID_ARCH/usr"
>     export HOSTCC=gcc
>
> $ echo $ANDROID_DEV
> /opt/android-ndk-r9/platforms/android-14/arch-x86/usr
>
> The configure looks like so:
>
>     $ ./config shared -no-ssl2 -no-ssl3 -no-comp -no-hw -no-engine
> --openssldir=/usr/local/ssl/android-14/
>
> However, compilation is failing because the programs are being
> compiled (more correctly, the missing comp.h):
>
> $ make
> ....
> i686-linux-android-gcc -DMONOLITH -I.. -I../include  -fPIC
> -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
> -DHAVE_DLFCN_H -Wa,--noexecstack -mandroid
> -I/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
> -B/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/lib -O3
> -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
> -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
> -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o dhparam.o dhparam.c
> i686-linux-android-gcc -DMONOLITH -I.. -I../include  -fPIC
> -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
> -DHAVE_DLFCN_H -Wa,--noexecstack -mandroid
> -I/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
> -B/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/lib -O3
> -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
> -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
> -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM   -c -o enc.o enc.c
> enc.c:70:26: fatal error: openssl/comp.h: No such file or directory
> compilation terminated.
> make[1]: *** [enc.o] Error 1
> make: *** [build_apps] Error 1
>
> How do I stop the attempt to compile the programs? What change is made
> to stop building of programs during a cross-compile of, for example,
> Android (arm) and iOS (arm)?
>

That particular error is a bug. Fixed here:

https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=b66f59adfa281abbc

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]