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.

Linking VIDANALYTICS library

I have a codec engine server.

I have included my codec that inherits ti.sdo.ce.vidanalytics.IVIDANALYTICS.

I dynamically load a .so that has a VIDANALYTICS call into my executable and it complains about undefined symbol: VIDANALYTICS_delete.

Shouldn't including my codec automatically tell the server build that it needs to include the VIDANALYTICS library?

Or has it included the library but I need to add a linking flag so the dynamic load can find the symbols?

I had to add -rdynamic to my executable build so the dynamic .so library could find it's symbols in the dynamic symbol table.

Any ideas how the VIDANALYTICS library gets pulled in?

Edit:

Well adding my codec does add vidanalytics.av5t library to my linker.cmd.

I just need to work out how to make my server build allow dynamic symbol look up?!?

Matt

  • Matt,

    You do need to link in the vidanalytics library into your app. You can do this by adding the following line to your app's .cfg file:

    /* To add VIDANALYTICS_ supplying libs to the executable... */
    xdc.loadPackage('ti.sdo.ce.vidanalytics');

    If you were using Engine.createFromServer() in your app's .cfg file, the vidanalytics library would get pulled in automatically.

    Which version of Codec Engine is this?

    Regards,

        Janet

     

  • Janet,

    I'm using codec engine 2.24.

    It's not the linking of the library that is the problem.  I have done that correctly in my alg_server.cfg (Appro Framework).  It automatically works out that my codec (which is based on ti.sdo.ce.vidanalytics) needs the vidanalytics library so includes it for the inclusion.

    In the Appro framework the alg_server.cfg is ran through xs xdc.tools.configuro and is then built into alg_config_x470.o470.

    Somehow this codec server is rolled up into the av_server.out executable.

    If I do a symbol lookup on av_server.out (arm_v5t_le-nm) I can see the VIDENC1_* calls in there.

    I put some dummy VIDANALYTICS_* calls in the av_server code, the VIDANALYTICS_* calls are pulled in correctly from the library.

    The problem is that my .so plugin that has VIDANALYTICS_* calls in it, when loaded (through dlopen()) cannot find the symbols for the VIDANALYTICS_* calls.

    If I include some dummy calls to VIDANALYTICS_* in my av_server code (the executable that loads the .so) the symbols will be found as the linking has included the symbols.

    Is there anyway I can force the inclusion of the symbols?

    Thanks,

     

    Matt

  • Matt,

    I don't know of any way to force those symbols into your av_server code, short of adding dummy calls or putting them into a table. Maybe there's a linker directive to force a symbol to be referenced, depending on the code gen tools you are using.

    Best regards,

        Janet

     

  • Thanks Janet,

    I think man ld will be my friend here.