Michsh / ics-openvpn

Automatically exported from code.google.com/p/ics-openvpn
0 stars 0 forks source link

Can't enable static_engine #255

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.Edit openssl.config: remove no-static_engine, add some needed sources (see 
attachment).
2.Import openssl: ./import_openssl.sh import openssl-1.0.1g.tar.gz (* there are 
some aditional steps before: a) remove word "external" in import_openssl.sh; b) 
unpack && config && make openssl-1.0.1g and then compress again, otherwise 
build will fail even with no-static_engine parameter; c) make directories 
engines and util in openssl folder, otherwise import script will fail).
3.Build: ./misc/build-native.sh

What is the expected output? What do you see instead?

Normal build is expected but I have:

android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/.
./lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: 
./obj/local/armeabi-v7a/objs/crypto/crypto/engine/eng_all.o: in function 
ENGINE_load_builtin_engines:openssl/crypto/engine/eng_all.c:114: error:
error: undefined reference to 'ENGINE_load_4758cca'
...
error: undefined reference to 'ENGINE_load_aep'
...
...
error:  undefined reference to 'ENGINE_load_gost'

Please provide any additional information below.

When I make all with no-static_engine parameter all works like a charm.

Original issue reported on code.google.com by serj.kon...@gmail.com on 15 Jun 2014 at 11:17

Attachments:

GoogleCodeExporter commented 9 years ago
That may all be true. I am no expert with the OpenSSL build system. But I guess 
that what you did is not enough to make that work. You probably also need to 
modify the other makefiles to include the files which define the ENGINE_* 
symbols.

Original comment by arne@rfc2549.org on 16 Jun 2014 at 8:10

GoogleCodeExporter commented 9 years ago
Ok, I fix it. Just edit openssl.config and add:
a) engines and engines/ccgost to OPENSSL_CRYPTO_INCLUDES
b) all *.c files from engines and ccgost folders to OPENSSL_CRYPTO_SOURCES.
Then, ./import_openssl.sh again.
Also, there may be an error when importing like "file not exists: 
crypto/aes/asm/crypto/bsaes-armv7.pl". Just add it to openssl archive from 
ics-openvpn/main/openssl/crypto/aes/asm/crypto/ foler. 

Original comment by serj.kon...@gmail.com on 16 Jun 2014 at 12:57

GoogleCodeExporter commented 9 years ago
I try to stay as a close as possible to the Google OpenSSL for Android 
repository as possible. Therefore the openssl directory in ics-openvpn has only 
the changes needed to build with ndk-build instead of together with AOSP.

The errors you are talking about are also in the upstream.

Original comment by arne@rfc2549.org on 16 Jun 2014 at 1:00

GoogleCodeExporter commented 9 years ago
See also https://github.com/schwabe/platform_external_openssl/commits/icsopenvpn

Original comment by arne@rfc2549.org on 16 Jun 2014 at 1:01

GoogleCodeExporter commented 9 years ago
Ok, thanks

Original comment by serj.kon...@gmail.com on 16 Jun 2014 at 1:15

GoogleCodeExporter commented 9 years ago

Original comment by arne@rfc2549.org on 2 Jul 2014 at 1:14