Compile OpenSSL with the 'shared' option?

后端 未结 5 1210
逝去的感伤
逝去的感伤 2020-12-16 10:47

On CentOS 5.4, OpenSSL compiles fine without \'shared\' option. But when I passed that option the compilation fails with:

/usr/bin/ld: libcrypto.a(x86

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 11:17

    Same problem here, BUT usually Makefiles will consider environment variables for compiler or linker options.

    So, if you place the -fPIC option before calling the configure script, it should take care of it. You can do it with:

    CFLAGS=-fPIC ./config shared --prefix=/your/path
    

    or

    export CFLAGS=-fPIC
    ./config shared --prefix=/your/path
    

    It worked for me.

提交回复
热议问题