Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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)

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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
share|improve this answer
    
Gilles, Thanks a lot!! I wish I could upvote more, it was really useful help. –  sven Jun 8 '13 at 22:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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