linphone-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-users] Linphone-desktop compilation problem


From: Sen, Nilanjan
Subject: Re: [Linphone-users] Linphone-desktop compilation problem
Date: Thu, 7 Apr 2016 15:30:30 +0000

Hi Grisez,

My previous compilation problem has been solved. Many thanks for your help. But this time, I am facing a new problem.

As I have told you earlier, I am trying to incorporate my own code into the existing source code to test my research work. For example, I have changed some part of the sal_sdp.c file under submodules/linphone/coreapi/bellesip_sal folder. Then I have modified the content of CMakeLists.txt file saved under submodules/linphone/coreapi folder to link the openssl library "libcrypto". The changes I have made are given below:

...
#Existing contents
add_definitions(  
    -DUSE_BELLESIP
    -DLIBLINPHONE_EXPORTS
)

#New contents added by me
include_directories(/usr/lib/x86_64-linux-gnu)
find_library(CRYPTO_LIBRARY libcrypto.so)

#Existing contents
set(LIBS    
    ${BCTOOLBOX_CORE_LIBRARIES}
    ${BELLESIP_LIBRARIES}
    ${MEDIASTREAMER2_LIBRARIES}
    ${XML2_LIBRARIES}function
)
...
...
if(ENABLE_SHARED)
    ...
    ...
    #Existing contents
    if(NOT ANDROID)
        # Do not version shared library on Android
        set_target_properties(linphone PROPERTIES SOVERSION ${LINPHONE_SO_VERSION})
    endif()
    add_dependencies(linphone liblinphone-git-version)

    #The content modified by me
    target_link_libraries(linphone ${LIBS} ${CRYPTO_LIBRARY})
    ...
    ...
endif()

But I am getting the following compilation error:

Linking CXX shared library liblinphone.so
/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

I have tried the same by using thecommand "target_link_libraries(linphone ${LIBS} ${CRYPTO_LIBRARY})" outside the "if(ENABLE_SHARED)" block, but has gotten the same error. If I type "target_link_libraries"command inside if(ENABLE_STATIC) block, I get "undefined reference" error for all the cryptographic functions I have used in my code. I have also tried the following options for this purpose, but still have gotten the same error:

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

 or
    
set(SOURCE_FILE bellesip_sal/sal_sdp.c)
set_source_files_properties(${SOURCE_FILE} PROPERTIES COMPILE_FLAGS "-fPIC")

I have tried it using libcrypto.a as well as libcrypto.so.1.1 also. I have also downloaded openssl source code and have compiled it separately in shared mode to generate the libcrypto libraries, but still I am getting the same compilation error.

Please help me.

Regards,

Nilanjan Sen.




From: Sen, Nilanjan
Sent: Thursday, March 24, 2016 1:32 AM
To: address@hidden
Subject: Re: [Linphone-users] Linphone-desktop compilation problem
 

Hi Grisez,

I have successfully compiled the linphone-desktop project under Ubuntu 14.04 64-bit system on a VM, but not under Ubuntu 12.04 64-bit system on VM. In Ubuntu 12.04 system, I am getting the compilation errors as: 
../libortp.so.11: undefined reference to 'clock_gettime', and
../libortp.so.11: undefined reference to 'clock_nanosleep', which I mentioned in my earlier mails. I am not sure, but most probably the Ubuntu 12.04 version is not supporting the compilation process of linphone-desktop project. 

Many thanks for your help.

Please help me regarding my next problem also that I mentioned in my previous mail. I am trying to incorporate my own code into the existing source code to test my research work. But, no change is reflected in output after modifying and re-compiling the source code. For example, I have changed some part of the sal_sdp.c file under linphone/coreapi/bellesip_sal folder. But the change is not reflected in the output after re-compiling it. Please help me in this context.

With regards,

Nilanjan Sen.




From: linphone-users-bounces+address@hidden <linphone-users-bounces+address@hidden> on behalf of Nilanjan Sen <address@hidden>
Sent: Wednesday, March 23, 2016 2:27 AM
To: address@hidden
Subject: Re: [Linphone-users] Linphone-desktop compilation problem
 
Hi Grisez,

Thanks for your suggestion. I have installed linphone-desktop in Ubuntu 14.04 system without any problem, but I am getting compilation error (I have mentioned in my earlier mail) in Ubuntu 12.04 system, which is 64-bit system also. I am using CMake for the installation, not autotools.

I have another issue. I am a doctoral student, and for my research work, I am trying to incorporate my own code into the existing source code to test my work. But, after changing the code, when I am re-compiling it, the change is not reflected in the output. For example, I have changed some part of the sal_sdp.c file under linphone/coreapi/bellesip_sal folder. But the change is not reflected in the output after recompiling it. Could you please help me in this context.

With regards,

Nilanjan Sen.


On Tuesday, 22 March 2016 4:15 AM, François Grisez <address@hidden> wrote:


Hi,
 
I installed Ubuntu 14.04 64-bit on a VM and I compiled the linphone-desktop project. All worked fine. So, I could reproduce your issue. Maybe, the problem only occurs on 32-bit systems ?
 
Personally, when I build Linphone on GNU/Linux, I build each dependency project one by one. As you told me that you succeed to build libortp, that could work for you. You should build all these projects in order:
  • git://git.linphone.org/bctoolbox
  • git://git.linphone.org/bzrtp
  • git://git.linphone.org/libmatrostka-c
  • git://git.linphone.org/ortp
  • git://git.linphone.org/mediastreamer2
  • git://git.linphone.org/belle-sip
  • git://git.linphone.org/belr
  • git://git.linphone.org/belcard
  • git://git.linphone.org/linphone
  • git://git.linphone.org/bcg729 (optional)
  • git://git.linphone.org/msopenh264 (optional, need libopenh264 on the system)
I advise you to use CMake instead of autotools

Best regards,
--
François Grisez
Software Developer
Belledonne Communications

Le mardi 15 mars 2016, 19:20:55 CET Nilanjan Sen a écrit :
Hi Grisez,

I have built project ORTP with CMake as per your instructions, and I have not encountered any problem here. But the said problem persists in linphone-desktop source code compilation. 
I am compiling the linphone-desktop source code in VM. I have compiled the same in a normal Ubuntu 14.04 desktop without any error.

Regards,
Nilanjan Sen.


On Monday, 14 March 2016 3:23 AM, François Grisez <address@hidden> wrote:


Hi,
 
Do you encounter the same problem if you built the project ortp with CMake ?
 
To do this:
git clone git://git.linphone.org/ortp
mkdir ortp/work
cd ortp/work
cmake ..
make
If the CMake build fails, can you try to build with the autotools ?
 
Best regards,
--
François Grisez
Software Developer
Belledonne Communications

Le vendredi 11 mars 2016, 22:22:52 CET Sen, Nilanjan a écrit :
Hi,

I am trying to compile the linphone-desktop source code in Ubuntu 14.04 computer. After executing prepare.py file, I have gotten MakeFile. When I am executing the 'make' command, I am getting the following errors:

/home/....../linphone-desktop/WORK/Build/ortp/src/libortp.so.11: undefined reference to 'clock_nanosleep'
/home/....../linphone-desktop/WORK/Build/ortp/src/libortp.so.11: undefined reference to 'clock_gettime'

I have successfully compiled the same in a different machine with same OS.

Do I need to install some library for that? Please help.

Thanks in advance,

Nilanjan.

 



_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users





_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]