Hi Grisez,
Thanks for your reply. As per your instruction, I compiled the source code after using only "ctypto" to find_library as find_library(CRYPTO_LIBRARY crypto) but got the same error. Then I compiled it using "make VERBOSE=1" command and got the following text
related with crypto in WORK/Build/linphone/coreapi/CMakeFiles/linphone.dir/link.txt file:
... /home/nilanjan/neel/linphone-desktop/WORK/Build/belcard/src/libbelcard.so.1 -Wl,-Bstatic -lcrypto -Wl,-Bdynamic /home/nilanjan/neel/linphone-desktop/OUTPUT/lib/libantlr3c.so ...
In this file, all the linked libraries are with extension .so except crypto, and "-Bstatic" flag is used for -lcrypto library. May be for this reason I am getting the following compilation error:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcrypto.a(bn_lib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcrypto.a: error adding symbols: Bad value
That means, CMake links liblinphone.so with the static version of libcrypto, though libcrypto.so is installed on my system. Could you please help me to solve this problem?
With regards,
Nilanjan Sen.
From: Linphone-users <linphone-users-bounces+address@hidden> on behalf of François Grisez <address@hidden>
Sent: Friday, April 8, 2016 7:24:33 PM
To: address@hidden
Subject: Re: [Linphone-users] Linphone-desktop compilation problem
Hi Nilanjan,
First, you should add VERBOSE=1 after your make command to have more details on what flags have been passed to gcc while linking of liblinphone.so.
It seems CMake tried to link liblinphone.so with the static version of libcrypto although you passed libcrypto.so in the find_library function. Is libcrypto.so is installed on your system ? If yes, you may try to only pass the string "crypto" to find_library.
Best regards,
--
François Grisez
Software Developer
Belledonne Communications
|