5

I have an old embedded board that supports only Debian Lenny. I need to install OpenSSL-1.0.1e on it. If I download the source code then try to compile the source code, I get this error

ts7500:/home/openssl-1.0.1e# make
making all in crypto...
make[1]: Entering directory `/home/openssl-1.0.1e/crypto'
gcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DTERMIO -O3 -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DGHASH_ASM   -c -o armcap.o armcap.c
In file included from armcap.c:8:
arm_arch.h:35:5: error: #error "unsupported ARM architecture"
make[1]: *** [armcap.o] Error 1
make[1]: Leaving directory `/home/openssl-1.0.1e/crypto'
make: *** [build_crypto] Error 1

how can I overcome that error?

Note: ts7500:/home/openssl-1.0.1e# `uname -a`
Linux ts7500 3.4.0 #83 Sun May 26 17:07:14 CEST 2013 `armv4l GNU/Linux`

ARMV4 is defined on https://github.com/joyent/node/blob/89dcf22/deps/openssl/openssl/crypto/arm_arch.h

EDIT: If I add #define __ARM_ARCH__ 4 in the beginning of the library, it suppress the problem and compiles the code without any problem. I wonder how correct what I did. I would appreciate a better solution (e.g., without modifying the library)

  • +1, just wanted to say thanks for posting your workaround here. I couldn't get the accepted answer to work in my environment (compiling for DNS-323), but the #define line seems to have done the trick. – Dominic P Oct 10 '14 at 7:54
2

You haven't passed the right options to Configure. Make sure to pass the argument linux-armv4. If you're cross-compiling, in addition to armv4, you need to pass the path to the cross-compiler, as well as include and library paths if necessary.

./Configure --cross-compiler-prefix=/opt/gcc-arm/bin/arm-linux-gnueabi- -I/opt/gcc-arm/include -L/opt/gcc-arm/lib
  • Gilles, Thanks a lot!! I wish I could upvote more, it was really useful help. – sven Jun 8 '13 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.