[erlang-questions] Is it possible to compile crypto app with _static_ libcrypto

Maxim Treskin zerthurd@REDACTED
Fri Apr 22 11:06:37 CEST 2011


Seems option --disable-dynamic-ssl-lib has no effect for crypto application
in OTP. Bug?

On 22 April 2011 14:45, Max Lapshin <max.lapshin@REDACTED> wrote:

> I've downloaded debian source package and decided to rebuild it with
> --disable-dynamic-ssl-lib
>
> As a result, I've finished with:
>
> x86_64-linux-gnu-gcc -c -o ../priv/obj/x86_64-pc-linux-gnu/crypto.o
> -Wall -Wstrict-prototypes -Wmissing-prototypes
> -Wdeclaration-after-statement  -DUSE_THREADS -D_THREAD_SAFE
> -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -g -O2
> -fno-strict-aliasing
> -I/var/tmp/erlang/erlang-14.b.2-dfsg/erts/x86_64-pc-linux-gnu
> -fno-tree-copyrename  -D_GNU_SOURCE -fPIC -I/usr/include
> -I/var/tmp/erlang/erlang-14.b.2-dfsg/erts/emulator/beam
> -I/var/tmp/erlang/erlang-14.b.2-dfsg/erts/include
> -I/var/tmp/erlang/erlang-14.b.2-dfsg/erts/include/x86_64-pc-linux-gnu
> -I/var/tmp/erlang/erlang-14.b.2-dfsg/erts/include/internal
>
> -I/var/tmp/erlang/erlang-14.b.2-dfsg/erts/include/internal/x86_64-pc-linux-gnu
> -I/var/tmp/erlang/erlang-14.b.2-dfsg/erts/emulator/sys/unix crypto.c
> /usr/bin/install -c -d ../priv/lib/x86_64-pc-linux-gnu
> x86_64-linux-gnu-gcc  -shared -Wl,-Bsymbolic -o
> ../priv/lib/x86_64-pc-linux-gnu/crypto.so
> ../priv/obj/x86_64-pc-linux-gnu/crypto.o  /usr/lib64/libcrypto.a
> /usr/bin/ld: /usr/lib64/libcrypto.a(cryptlib.o): relocation
> R_X86_64_32 against `OPENSSL_ia32cap_P' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib64/libcrypto.a: could not read symbols: Bad value
>
>
>
> I want to do it because I want to make release that has no
> dependencies on system packages and libcrypto seems to be the only
> one.
> Or it would be better to copy libcrypto.so to release folder?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 
Maxim Treskin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110422/64f8d7ac/attachment.htm>


More information about the erlang-questions mailing list