Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross compiling "OpenSSL" Error

I'm using the include: < openssl/md5.h > in my c code. When I compile it with "gcc" compiler I don't have any errors, but when I compile it with cross compiler "arm-linux-gnueabi-gcc" I have the following error:

/usr/include/openssl/e_os2.h:56:33: fatal error: openssl/opensslconf.h: No such file or directory 
compilation terminated.

I think that this error is because I don't have the openssl libraries in the cross compiler folder "/usr/arm-linux-gnueabi-gcc".

Can anyone say me if is this the cause of the error? And how I can install the openssl libraries for cross compiler?

I'm starting in cross-compiling, and I don't have much knowledge about this. Thanks for your time!

like image 390
user2984715 Avatar asked Nov 24 '13 21:11

user2984715


People also ask

What is cross-compiling code?

Cross-compilation is the act of compiling code for one computer system (often known as the target) on a different system, called the host. It's a very useful technique, for instance when the target system is too small to host the compiler and all relevant files.

What is host cross compile?

A cross compiler is useful to compile code for multiple platforms from one development host. Direct compilation on the target platform might be infeasible, for example on embedded systems with limited computing resources. Cross compilers are distinct from source-to-source compilers.


1 Answers

In my case, exactly the same error message (but I was compiling in 32 bits on a 64 bits machine). I solved this with installing another architecture:

apt-get install libssl-dev:i386
like image 136
Sandburg Avatar answered Sep 22 '22 04:09

Sandburg