OpenSSL building errors in CentOS 6.02 64 bit OS

c++, centos, linux, openssl

Solution

It's a problem with the addressing in the assembly code. (32 bit vs 64 bit addressing.) There was a bug filed for this.

For a quick fix try recompiling with the `no-asm` option.

cd <openssl-source-directory>
./config no-asm
make && make install

EDIT: To resolve the errors caused by not having the -fPIC flag: do a `make clean`, change the line for `./config no-asm` to `./config no-asm -fPIC`, and run `make && make install`.

Problem

I am facing some problems in building openssl in CentOS 6.02 64 bit OS. Whenever I try to build it I face the errors followings:- ``` md5-x86_64.s:41: Error: 0xd76aa478 out range of signed 32bit displacement md5-x86_64.s:50: Error: 0xe8c7b756 out range of signed 32bit displacement md5-x86_64.s:68: Error: 0xc1bdceee out range of signed 32bit displacement md5-x86_64.s:77: Error: 0xf57c0faf out range of signed 32bit displacement md5-x86_64.s:95: Error: 0xa8304613 out range of signed 32bit displacement Many more errors like this. ```

Original source