[erlang-questions] Is it possible to compile crypto app with _static_ libcrypto
Sverker Eriksson
sverker@REDACTED
Tue Apr 26 15:02:16 CEST 2011
Option --disable-dynamic-ssl-lib will link crypto with a static
libcrypto.a instead of a dynamic libcrypto.so. But crypto itself
(crypto.so) is still a dynamic library loaded by the emulator.
I think the problem is with libcrypto.a. It was not built to be part of
a dynamic library. I would recommend downloading openssl and rebuild it
yourself.
/Sverker, Erlang/OTP Ericsson
Maxim Treskin wrote:
> 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
>>
>>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list