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.

Library only package fails to build in codec server

Other Parts Discussed in Thread: DM3730

I have created an algorithm package from scratch using the gencodec package wizard.
Without modifications, xdc release creates a zip I can extract in my codec server. When building the codec server with this package, the codec library is rebuilt from source, 
and everything is fine.

The trouble is, if I edit package.bld to set :

Pkg.attrs.exportSrc = false;

The package building is fine, but when I use the generated zip to build my codec server, it fails with :

undefined symbol    first referenced in file
---------                                ----------------
_EDGE_XCAM_IDMA3 package/cfg/bin/cs_x64P.o64P
_EDGE_XCAM_IEDGE package/cfg/bin/cs_x64P.o64P

How can I make a package without adding the sources ?

 

  • Could you tell me what version of Codec Engine you are using ?

  • Version 2.26.02.11 which is part of the dvsdk v4.03 for dm3730.

    I can provide codec source code if you want.

  • I don't see why not including the sources, would cause missing symbols if your codec is already built properly.

    When you build your server, does it show you a line (during build) where it pulls in the codec lib ? Something like:-

        will link with <vendor>.<module>:lib/release/<module>.a64P


  • Yes, the lib are present in the archive, and pulled by the build system.
    I noticed the unresolved symbol are present in the library, and are in the far section. Here is the package without sources

     2273.xcam_edge_nosrc.zip

    When using the package with sources, the lib is still present in the package archive, but I can see the codec server build system recompiling it from sources.

    3617.xcam_edge.zip 

  • Warnings that were in the build log :

    Warning: target ti.targets.C64P doesn't know how to create 'package/lib/lib/debug/edge/edge.o64P'; can't find source file for 'edge'
    Warning: target ti.targets.C64P doesn't know how to create 'package/lib/lib/whole_program_debug/edge/edge.o64P'; can't find source file for 'edge'
    Warning: target ti.targets.C64P doesn't know how to create 'package/lib/lib/release/edge/edge.o64P'; can't find source file for 'edge'
    Warning: target ti.targets.C64P doesn't know how to create 'package/lib/lib/profile/edge/edge.o64P'; can't find source file for 'edge'
    Warning: target ti.targets.C64P doesn't know how to create 'package/lib/lib/coverage/edge/edge.o64P'; can't find source file for 'edge'
    Warning: target ti.targets.C64P doesn't know how to create 'package/lib/lib/whole_program/edge/edge.o64P'; can't find source file for 'edge'

  • I see that you have shared the codec .zip with me. Instead of this, could you share the server package that gets created by gencodecserver wizard ? Maybe both versions (one that uses the codec w/ sources and the one without).

  • Here is the codec source as generate by gencodecpkg wizard. To build without source, I modify only the package.bld file, as mentionned in my first post.

    0027.edge.tar.gz

    Here is the patch to the codec server config in order to include my codec :

    Index: b/codecs-omap3530_4_02_00_00/packages/ti/sdo/server/cs/codec.cfg
    ===================================================================
    --- a/codecs-omap3530_4_02_00_00/packages/ti/sdo/server/cs/codec.cfg
    +++ b/codecs-omap3530_4_02_00_00/packages/ti/sdo/server/cs/codec.cfg
    @@ -156,7 +156,7 @@
             MPEG4ENC.alg.dynamicCodeLoadSection = undefined;
             MPEG4ENC.alg.dynamicCodeRunSection = undefined;
     
    -
    +	var EDGE = xdc.useModule('xcam.edge.EDGE');
     
     /*
      * The array of algorithms this server can serve up.  This array also
    @@ -224,5 +224,10 @@
             groupId : 0,
         },
     
    +    {name: "edge", mod: EDGE , threadAttrs: {
    +        stackMemId: 0, priority: Server.MINPRI + 1},
    +        groupId : 0,
    +    },
    +
     ];
    I tried to attach it as a .txt file but it failed
  • Bandini,

    Isn't this still the codec .zip ?

    I was looking for a .zip of the codec server that you generated. The one that had the failing build. I wanted to look at all the files generated in the server package, to try and understand why it would be trying to re-build the codec (I don't believe it should).

  • Sorry, the only wizard I used was the codec generating one. I am using the codec server provided by the codecs-omap3530_4_02 part of my dvdsdk. However, you were right and lead me to the solution :

    The codecs-omap3530 contains a top-level Makefile that rebuilds recursively all packages in the packages directory. Without sources, my codec is not rebuildable. So I modified this Makefile to build only the ti provided packages. When the codec server package is built, it now correctly finds my codec library, because the build system did not try to clean it and rebuild it.

    The fix is the following :

    Index: b/codecs-omap3530_4_02_00_00/Makefile
    ===================================================================
    --- a/codecs-omap3530_4_02_00_00/Makefile
    +++ b/codecs-omap3530_4_02_00_00/Makefile
    @@ -9,7 +9,7 @@
     
     # set the location for package directory which contains the codec and
     # server xdc packages
    -PACKAGE_DIR  = packages
    +PACKAGE_DIR  = packages/ti
     
     # Set XDCPATH to contain necessary repositories.
     # Please do not modify anything below
    

    However, I still have a question : is there a an RTSC packaged version of the imglib64p and VLIB libraries. I initially didn't care to provide the sources for my codec. The reason I don't want my codec to be rebuilt, is that I will have to include all the necessary header in my codec sources because the build system is unable to find include files if they are not provided by an RTSC package.

  • Okay. Since you didn't state it, I assumed that you were using the wizards to generate the codec, as well as the server. In my experiments, the gencodecserver wizard doesn't attempt to rebuild the codec, that was confusing me.

    Sorry, I don't know the details regarding the imglib/VLIB libraries. Hopefully someone else on the forum can answer that one.

    But regardless, I don't see a good reason to rebuild your codec if you have already properly built it the first time.