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.

Linux/TMS320DM8168: Makefile under the folder ti-ezsdk_dm816x-evm_5_03_01_15 cannot link to standard C math library

Part Number: TMS320DM8168

Tool/software: Linux

hi

when i revise the file ilclient.c under the folder /ti-ezsdk_dm816x-evm_5_03_01_15/component-sources/omx_05_02_00_30/examples/ti/omx/demos/capture_encode, it has errors:

/home/broadon/ti-ezsdk_dm816x-evm_5_03_01_15/component-sources/omx_05_02_00_30/examples/ti/omx/demos/capture_encode/src/ilclient.c:2354: undefined reference to `sqrt'

collect 2: ld returned 1 exit status

i think i should revise makefile and add "-lm" to make it link to math lib, but i don't know where should i add it.

Thank you

  • Hi,

    Yes, you have observed right, you have to add -lm to link math library.

    Just add -lm in /home/broadon/ti-ezsdk_dm816x-evm_5_03_01_15/component-sources/omx_05_02_00_30/makerules/rules_a8.mk as shown below

    #LNKFLAGS_INTERNAL_COMMON =  -lpthread -lrt -L$(CODEGEN_PATH_A8)/arm-none-linux-gnueabi/lib

    LNKFLAGS_INTERNAL_COMMON =  -lpthread -lrt -lm -L$(CODEGEN_PATH_A8)/arm-none-linux-gnueabi/lib

    Regards,

    Anuj

    Pathpartner Technology Pvt Ltd.

  • Hello,

    One more note, EZSDK 5.03 is very old version.
    I would recommend you to use the latest EZSDK version 5.05.02.

    BR
    Margarita
  • Dear Anuj
    thank you for your reply

    I have revised the rules_a8.mk, but when I make omx, it still has error:

    make[1]: Leaving directory `/home/broadon/ti-ezsdk_dm816x-evm_5_03_01_15/component-sources/omx_05_02_00_30/src'
    CCLD lib/libtiomx.so
    /home/broadon/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: : No such file: No such file or directory
    collect2: ld returned 1 exit status
    make: *** [omx] Error 1

    I am looking forward to your reply,
    thanks sincerely!

    yinxuehao
  • Hi ,

    Please check the whether you set the right path for cross compiler.

    Check value of CSTOOL_DIR and CSTOOL_PATH variable in your Rules.make.
    Go to CSTOOL_PATH path and check whether arm-none-linux-gnueabi-ld is present or not.

    Regards,
    Anuj