This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem when building app in DVRRDK3.05



Hi,

I modify the mcfw demo in DVRRDK3.05 and bring in rtp send and receive. I use the ortp lib. So I need to modify the makefile for the mcfw demo. I go through the makerules and find that I just need to add something in DVRRDK_03.50.00.05\dvr_rdk\demos\mcfw_api_demos\mcfw_demo. I do as follows:

Add the include path -I/opt/ortp/include

INCLUDE+= -I$(KERNELDIR)/usr/include -I$(KERNELDIR)/arch/arm/include/ -I/opt/ortp/include

Add the lib path /opt/ortp/lib/libortp.so* -lortp

LIBS= $(LIB_DIR)/dvr_rdk_demo_mcfw_api.a $(MCFW_LIBS) $(AUDIO_LIBS) /opt/ortp/lib/libortp.so* -lortp

Then I do make -s dvr_rdk_linux_all to make the demo.  I get the error below says that could not find -lortp. But I could use "arm-none-linux-gnueabi-gcc rtprecv.c -o rtprecv_arm -lortp -L/root/ortp/lib -I/root/ortp/include" to build app successfully. So, could someone know what's the problem? Do I place "-lortp" in the wrong place?

Thanks in advance! Appreciate for your reply!

# dvr_rdk_demo_mcfw_api: ti816x-evm: Creating archive dvr_rdk_demo_mcfw_api.a
# dvr_rdk_demo_mcfw_api: ti816x-evm: Linking
/home/bboy/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lortp
collect2: ld returned 1 exit status
make[5]: *** [exe] 错误 1
make[4]: *** [apps] 错误 2
make[3]: *** [demo] 错误 2
make[2]: *** [libs] 错误 2
make[1]: *** [demo] 错误 2
make: *** [dvr_rdk_linux] 错误 2

  • by checking as below, you should follow the "definite" naming pattern

    [/DVRRDK_03.50.00.05_original] $ grep -r "AUDIO_LIBS" ./dvr_rdk/
    ./dvr_rdk/demos/mcfw_api_demos/mcfw_demo/MAKEFILE.MK:LIBS= $(LIB_DIR)/dvr_rdk_demo_mcfw_api.a $(MCFW_LIBS) $(AUDIO_LIBS)
    ...
    ./dvr_rdk/makerules/includes_a8.mk:AUDIO_LIBS=$(linuxdevkit_PATH)/usr/lib/libasound.so.2


    [/areaX/DVRRDK_03.50.00.05_original] $ ls -l ./ti_tools/linux_devkit/arm-none-linux-gnueabi/usr/lib/libasound*
    -rwxr-xr-x 1 medwin medwin    999 2013-02-06 18:10 ./ti_tools/linux_devkit/arm-none-linux-gnueabi/usr/lib/libasound.la
    lrwxrwxrwx 1 medwin medwin     18 2013-04-01 13:03 ./ti_tools/linux_devkit/arm-none-linux-gnueabi/usr/lib/libasound.so -> libasound.so.2.0.0
    lrwxrwxrwx 1 medwin medwin     18 2013-04-01 13:03 ./ti_tools/linux_devkit/arm-none-linux-gnueabi/usr/lib/libasound.so.2 -> libasound.so.2.0.0
    -rwxr-xr-x 1 medwin medwin 790296 2013-02-06 18:10 ./ti_tools/linux_devkit/arm-none-linux-gnueabi/usr/lib/libasound.so.2.0.0

     

     

  • What is -Iortp. -I option is used to specify directories where necessary header files can be found.

    Do you want to create a library out of  rtprecv.c and link that with dvr_rdk? if yes, then you should use arm-none-linux-gnueabi-ar to created librtp.a out of all dependent object files including rtprecv.o and then give path of librtp.a in LIBS

    librtp.a is just a sample name you can choose anything that is convinient to you.

  • Hi Marathe,
    Thanks for your reply! I want to use ortp lib in the dvrrdk demo. The app which use the ortp lib must use the header files and the lib files when being built. The -lortp set the lib files for build, just like the app which use pthread lib use -lpthread. I use the same build options when building app using ortp lib not within dvrrdk, and there is no problem. I check the gmake options and find that the LIBS is used to set lib files. So, I don't know what's wrong with it.

  • Hi Jack,

    I check the makerules folder and find that in file common_footer_a8.mk "$(LD) $(LD_OPTS) -o$(EXE) $(LIBS)" will do the link job and create the executable binary. The LD_OPTS defined in file common_header_a8.mk. I add -lortp to it and add -I/opt/ortp/include to the INCLUDE, /opt/ortp/lib/libortp.so* to the LIBS to set the header file path and lib file path of ortp. I think there will be no problem. 

  • hi Biu

    pls change

    LIBS= $(LIB_DIR)/dvr_rdk_demo_mcfw_api.a $(MCFW_LIBS) $(AUDIO_LIBS) /opt/ortp/lib/libortp.so* -lortp

    to

    LIBS= $(LIB_DIR)/dvr_rdk_demo_mcfw_api.a $(MCFW_LIBS) $(AUDIO_LIBS) /opt/ortp/lib/libortp.so*

     

  • Hi Jack,

    Thanks for your reply! Now the problem is solved. I do the following change:

    1. Add -lortp to LD_OPTS in file common_header_a8.mk

    2. Add -I/opt/ortp/inclue to MCFW_INC in file includes_a8.mk

    3. Add -L/opt/ortp/lib to $(LD) $(LD_OPTS) -o$(EXE) $(LIBS) in file common_footer_a8.mk