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.

undefined referenced to 'MP4VENC_TI_IMP4VENC'

After compiling the lsp(ti-davinci) succesfully, I compile the dvsdk,but get the follow errors:

/opt/dvsdk_1_30_01_41/demos/dm355/decode/decode_config/package/cfg/decode_x470MV.o470MV(.data.rel+0xc0):undefined reference to 'MP4VENC_TI_IMP4VENC

/opt/dvsdk_1_30_01_41/demos/dm355/decode/decode_config/package/cfg/decode_x470MV.o470MV(.data.rel+0xc0):undefined reference to 'MP4VENC_TI_IDMA3'

/opt/dvsdk_1_30_01_41/demos/dm355/decode/decode_config/package/cfg/decode_x470MV.o470MV(.data.rel+0xc0):undefined reference to 'MP4VDEC_TI_IMP4VDEC'

/opt/dvsdk_1_30_01_41/demos/dm355/decode/decode_config/package/cfg/decode_x470MV.o470MV(.data.rel+0xc0):undefined reference to 'MP4VDEC_TI_IDMA3'

Thanks for your answer.

  • This sounds like a path issue.  When building the entire DVSDK tree per Getting Started Guide, the file to analyze is your Rules.make.  Make sure all the paths defined in your Rules.make are valid.  If you like, you can post your Rules.make and we can have a look over it.

  • Thanks your answer. I have checked Rules.make, but find no errors. here is the contents in the file:

    #
    # This make variable must be set before the demos or examples
    # can be built.  It must be set to either dm355 or dm6446
    #
    PLATFORM=dm355
    ifndef PLATFORM
       $(error PLATFORM must be set in Rules.make to dm355 or dm6446 before building the demos)
    endif


    # The installation directory of the DVSDK  dvsdk_1_30_01_41.
    #DVSDK_INSTALL_DIR=$(HOME)/dvsdk_1_30_01_41
    DVSDK_INSTALL_DIR=/opt/dvsdk_1_30_01_41

    # For backwards compatibility
    DVEVM_INSTALL_DIR=$(DVSDK_INSTALL_DIR)

    # Where the Codec Engine package is installed.
    CE_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/codec_engine_2_00_01

    # Where the XDAIS package is installed.
    XDAIS_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/xdais_6_00_01

    # Where the DSP Link package is installed.
    LINK_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/dsplink_140-05p1

    # Where the CMEM (contiguous memory allocator) package is installed.
    CMEM_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/cmem_2_00_01

    # Where the codec servers are installed (dm6446) or codecs (dm355)
    ifneq ($(PLATFORM),dm355)
       CODEC_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/dm6446_dvsdk_combos_1_35
    else
       CODEC_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/dm355_codecs_1_12_003
    endif

    # Where the RTSC tools package is installed.
    #XDC_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/xdc_3_00_02
    XDC_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/xdc_3_05

    # Where Framework Components product is installed
    FC_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/framework_components_2_00_01

    # Where DSP/BIOS is installed
    BIOS_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/bios_5_31_08

    # The directory that points to your kernel source directory.
    #LINUXKERNEL_INSTALL_DIR=$(HOME)/lsp/ti-davinci
    LINUXKERNEL_INSTALL_DIR=/workdir/lsp/ti-davinci

    # The prefix to be added before the GNU compiler tools (optionally including
    # path), i.e. "arm_v5t_le-" or "/opt/bin/arm_v5t_le-".
    #MVTOOL_DIR=/db/toolsrc/library/vendors2005/mvl/arm/mvl4.0.1-root-new//montavista/pro/devkit/arm/v5t_le
    MVTOOL_DIR=/opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le
    MVTOOL_PREFIX=$(MVTOOL_DIR)/bin/arm_v5t_le-

    # Where to copy the resulting executables and data to (when executing 'make
    # install') in a proper file structure. This EXEC_DIR should either be visible
    # from the target, or you will have to copy this (whole) directory onto the
    # target filesystem.
    #EXEC_DIR=$(HOME)/workdir/filesys/opt/dvsdk/$(PLATFORM)
    EXEC_DIR=/workdir/filesys/opt/dvsdk/$(PLATFORM)

  • Here is the output when I compile dvsdk:

    [root@localhost ti-davinci]# cd /opt/dvsdk_1_30_01_41/
    [root@localhost dvsdk_1_30_01_41]# ls
    biosutils_1_00_02     dm355_1_30_01_release_notes.html   docs              examples                      mapdmaq           Rules.make.bak
    cmem_2_00_01          dm355_codecs_1_12_003              dsplink_140-05p1  framework_components_2_00_01  PSP_01_20_00_014  uninstall
    codec_engine_2_00_01  dm6446_1_30_01_release_notes.html  dvtb_1_13_000     kernel_binaries               quilt             xdais_6_00_01
    demos                 dm6446_dvsdk_combos_1_35           dvtb_1_24_000     Makefile                      Rules.make        xdc_3_05
    [root@localhost dvsdk_1_30_01_41]# make

    Making all in subdirectory /opt/dvsdk_1_30_01_41/cmem_2_00_01/packages/ti/sdo/linuxutils/cmem/src/module...
    make[1]: Entering directory '/opt/dvsdk_1_30_01_41/cmem_2_00_01/packages/ti/sdo/linuxutils/cmem/src/module'
    make -C /workdir/lsp/ti-davinci M='pwd' ARCH=arm CROSS_COMPILE=/opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le- \
            EXTRA_CFLAGS="-DUSE_UDEV=1 -DMAX_POOLS=128" modules
    make[2]: Entering directory '/workdir/lsp/ti-davinci'
      CC [M]  /opt/dvsdk_1_30_01_41/cmem_2_00_01/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.o
      Building modules, stage 2.
      MODPOST
      CC      /opt/dvsdk_1_30_01_41/cmem_2_00_01/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.mod.o
      LD [M]  /opt/dvsdk_1_30_01_41/cmem_2_00_01/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko
    make[2]: Leaving directory '/workdir/lsp/ti-davinci'
    make[1]: Leaving directory '/opt/dvsdk_1_30_01_41/cmem_2_00_01/packages/ti/sdo/linuxutils/cmem/src/module'

    Making all in subdirectory demos/dm355...
    make[1]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355'

    Making all in subdirectory utils...
    make[2]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils'

    Making all in subdirectory msp430lib...
    make[3]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/msp430lib'
    Compiling debug/msp430lib.o from msp430lib.c..

    Archiving ../lib/msp430libd.a from debug/msp430lib.o..
    Installing headers...

    Compiling release/msp430lib.o from msp430lib.c..

    Archiving ../lib/msp430lib.a from release/msp430lib.o..

    make[3]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/msp430lib'

    Making all in subdirectory simplewidget...
    make[3]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/simplewidget'
    Compiling debug/font.o from font.c..
    Compiling debug/gfx.o from gfx.c..
    Compiling debug/jpeg.o from jpeg.c..
    Compiling debug/png.o from png.c..
    Compiling debug/simplewidget.o from simplewidget.c..

    Archiving ../lib/simplewidgetd.a from debug/font.o debug/gfx.o debug/jpeg.o debug/png.o debug/simplewidget.o..
    Installing headers...

    Compiling release/font.o from font.c..
    Compiling release/gfx.o from gfx.c..
    Compiling release/jpeg.o from jpeg.c..
    Compiling release/png.o from png.c..
    Compiling release/simplewidget.o from simplewidget.c..

    Archiving ../lib/simplewidget.a from release/font.o release/gfx.o release/jpeg.o release/png.o release/simplewidget.o..

    make[3]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/simplewidget'

    Making all in subdirectory fifoutil...
    make[3]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/fifoutil'
    Installing headers...
    make[3]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/fifoutil'

    Making all in subdirectory rendezvous...
    make[3]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/rendezvous'
    Installing headers...
    make[3]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/rendezvous'

    Making all in subdirectory timerutil...
    make[3]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/timerutil'
    Installing headers...
    make[3]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/timerutil'

    Making all in subdirectory smooth...
    make[3]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/smooth'
    Compiling debug/smooth.o from smooth.c..

    Archiving ../lib/smoothd.a from debug/smooth.o..
    Installing headers...

    Compiling release/smooth.o from smooth.c..

    Archiving ../lib/smooth.a from release/smooth.o..

    make[3]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/smooth'

    Making all in subdirectory pause...
    make[3]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/pause'
    Installing headers...
    make[3]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/pause'

    Making all in subdirectory rszcopy...
    make[3]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/rszcopy'
    Compiling debug/rszcopy.o from rszcopy.c..

    Linking ../lib/rszcopyd.a from debug/rszcopy.o..
    Installing headers...

    Compiling release/rszcopy.o from rszcopy.c..

    Linking ../lib/rszcopy.a from release/rszcopy.o..

    make[3]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils/rszcopy'
    make[2]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/utils'

    Making all in subdirectory decode...
    make[2]: Entering directory '/opt/dvsdk_1_30_01_41/demos/dm355/decode'

    ======== Building decode ========
    Configuring application using decode.cfg

    XDCPATH="../g711;/opt/dvsdk_1_30_01_41/dm355_codecs_1_12_003/packages;/opt/dvsdk_1_30_01_41/codec_engine_2_00_01/packages;/opt/dvsdk_1_30_01_41/dsplink_140-05p1/packages;/opt/dvsdk_1_30_01_41/xdais_6_00_01/packages;/opt/dvsdk_1_30_01_41/cmem_2_00_01/packages;/opt/dvsdk_1_30_01_41/framework_components_2_00_01/packages" /opt/dvsdk_1_30_01_41/xdc_3_05/xs xdc.tools.configuro -c /opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le -o decode_config -t gnu.targets.MVArm9 -p ti.platforms.evmDM6446 decode.cfg
    making package.mak (because of package.bld) ...
    generating interfaces for package decode_config (because package/package.xdc.xml is older than package.xdc) ...
    configuring decode.x470MV from package/cfg/decode_x470MV.cfg ...
    ti.sdo.ce.osal.close() ...
    ti.sdo.ce.osal.validate() ...
        will link with ti.sdo.ce.speech:lib/speech.a470MV
        will link with ti.sdo.ce.audio:lib/audio.a470MV
        will link with ti.sdo.ce.video1:lib/viddec1.a470MV;lib/videnc1.a470MV
        will link with ti.sdo.ce.video2:lib/viddec2.a470MV
        will link with ti.sdo.ce:lib/ce.a470MV
        will link with ti.sdo.ce.alg:lib/Algorithm_noOS.a470MV;lib/alg.a470MV
        will link with ti.sdo.ce.osal:lib/osal_posix_470.a470MV
        will link with ti.sdo.fc.acpy3:acpy3.a470MV
        will link with ti.sdo.ce.utils.xdm:lib/XdmUtils.a470MV
        will link with ti.sdo.utils.trace:lib/gt.a470MV
        will link with ti.sdo.fc.dman3:dman3Cfg.a470MV
        will link with ti.xdais.dm.examples.g711:lib/g711.a470MV
        will link with ti.sdo.linuxutils.cmem:lib/cmem.a
    cl470MV package/cfg/decode_x470MV.c ...
    Compiling debug/audio.o from audio.c..
    Compiling debug/ctrl.o from ctrl.c..
    Compiling debug/display.o from display.c..
    Compiling debug/loader.o from loader.c..
    Compiling debug/main.o from main.c..
    Compiling debug/speech.o from speech.c..
    speech.c: In function 'initSoundDevice':
    speech.c:196: warning: unused variable 'mixerFd'
    Compiling debug/ui.o from ui.c..
    Compiling debug/video1.o from video1.c..

    Linking debug/decoded from debug/audio.o debug/ctrl.o debug/display.o debug/loader.o debug/main.o debug/speech.o debug/ui.o debug/video1.o..
    /opt/dvsdk_1_30_01_41/demos/dm355/decode/decode_config/package/cfg/decode_x470MV.o470MV(.data.rel+0xc0): undefined reference to 'MP4VENC_TI_IMP4VENC'
    /opt/dvsdk_1_30_01_41/demos/dm355/decode/decode_config/package/cfg/decode_x470MV.o470MV(.data.rel+0xc4): undefined reference to 'MP4VENC_TI_IDMA3'
    /opt/dvsdk_1_30_01_41/demos/dm355/decode/decode_config/package/cfg/decode_x470MV.o470MV(.data.rel+0xe8): undefined reference to 'MP4VDEC_TI_IMP4VDEC'
    /opt/dvsdk_1_30_01_41/demos/dm355/decode/decode_config/package/cfg/decode_x470MV.o470MV(.data.rel+0xec): undefined reference to 'MP4VDEC_TI_IDMA3'
    collect2: ld returned 1 exit status
    make[2]: *** [debug/decoded] Error 1
    make[2]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355/decode'
    make[1]: *** [decode] Error 2
    make[1]: Leaving directory '/opt/dvsdk_1_30_01_41/demos/dm355'
    make: *** [demos/dm355] Error 2
    [root@localhost dvsdk_1_30_01_41]#

  • Based on your log, it appears there is some packages missing, my sucessful build looks as follows

    ======== Building decode ========
    Configuring application using decode.cfg

    XDCPATH="../g711;/home/user/dm355/dvsdk_1_30_00_40/dvsdk/dm355_codecs_1_12_000/packages;/home/user/dm355/dvsdk_1_30_00_40/dvsdk/codec_engine_2_00_01/packages;/home/user/dm355/dvsdk_1_30_00_40/dvsdk/dsplink_140-05p1/packages;/home/user/dm355/dvsdk_1_30_00_40/dvsdk/xdais_6_00_01/packages;/home/user/dm355/dvsdk_1_30_00_40/dvsdk/cmem_2_00_01/packages;/home/user/dm355/dvsdk_1_30_00_40/dvsdk/framework_components_2_00_01/packages" /home/user/dm355/dvsdk_1_30_00_40/dvsdk/xdc_3_00_04/xs xdc.tools.configuro -c /home/user/dm355/dvsdk_1_30_00_40/dvsdk/../arm_toolchain/montavista/pro/devkit/arm/v5t_le -o decode_config -t gnu.targets.MVArm9 -p ti.platforms.evmDM6446 decode.cfg
    making package.mak (because of package.bld) ...
    generating interfaces for package decode_config (because package/package.xdc.xml is older than package.xdc) ...
    configuring decode.x470MV from package/cfg/decode_x470MV.cfg ...
    ti.sdo.ce.osal.close() ...
    ti.sdo.ce.osal.validate() ...
        will link with ti.sdo.ce.speech:lib/speech.a470MV
        will link with ti.sdo.ce.audio:lib/audio.a470MV
        will link with ti.sdo.ce.video1:lib/viddec1.a470MV;lib/videnc1.a470MV
        will link with ti.sdo.ce.video2:lib/viddec2.a470MV
        will link with ti.sdo.ce:lib/ce.a470MV
        will link with ti.sdo.ce.alg:lib/Algorithm_noOS.a470MV;lib/alg.a470MV
        will link with ti.sdo.ce.osal:lib/osal_posix_470.a470MV
        will link with ti.sdo.fc.acpy3:acpy3.a470MV
        will link with ti.sdo.ce.utils.xdm:lib/XdmUtils.a470MV
        will link with ti.sdo.utils.trace:lib/gt.a470MV
        will link with ti.sdo.fc.dman3:dman3Cfg.a470MV
        will link with ti.xdais.dm.examples.g711:lib/g711.a470MV
        will link with ti.sdo.codecs.mpeg4enc.dm355:lib/libmp4enc.a
        will link with ti.sdo.codecs.mpeg4dec.dm355:lib/libmp4dec.a
        will link with ti.catalog.hwa.imcop:lib/libcosl.a;lib/libimx.a;lib/libdm355mm.a;lib/libimcopcsl.a
        will link with ti.sdo.linuxutils.cmem:lib/cmem.a
    cl470MV package/cfg/decode_x470MV.c ...
    Compiling debug/audio.o from audio.c..
    Compiling debug/ctrl.o from ctrl.c..
    Compiling debug/display.o from display.c..
    Compiling debug/loader.o from loader.c..
    Compiling debug/main.o from main.c..
    Compiling debug/speech.o from speech.c..
    speech.c: In function `initSoundDevice':
    speech.c:196: warning: unused variable `mixerFd'
    Compiling debug/ui.o from ui.c..
    Compiling debug/video1.o from video1.c..

    Linking debug/decoded from debug/audio.o debug/ctrl.o debug/display.o debug/loader.o debug/main.o debug/speech.o debug/ui.o debug/video1.o..

    Compiling release/audio.o from audio.c..
    Compiling release/ctrl.o from ctrl.c..
    Compiling release/display.o from display.c..
    Compiling release/loader.o from loader.c..
    Compiling release/main.o from main.c..
    Compiling release/speech.o from speech.c..
    speech.c: In function `initSoundDevice':
    speech.c:196: warning: unused variable `mixerFd'
    Compiling release/ui.o from ui.c..
    Compiling release/video1.o from video1.c..

    Linking release/decode from release/audio.o release/ctrl.o release/display.o release/loader.o release/main.o release/speech.o release/ui.o release/video1.o..
    make[2]: Leaving directory `/home/user/dm355/dvsdk_1_30_00_40/dvsdk/demos/dm355/decode'

    Making all in subdirectory encode...
    make[2]: Entering directory `/home/user/dm355/dvsdk_1_30_00_40/dvsdk/demos/dm355/encode'

     

    That said, have you modified your decode.cfg file at all?  if not, I would try a make clean...otherwise it would appear your files have become corrupted somehow and you may want to do a re-install of dvsdk source files.

     

  • I think you are right. But when I install dvsdk again, I get the same errors. I try to replace the another versin of XDC. When I use xdc_3_00_02_11,  the compiling is ok.  so I think the version of xdc_3_05 is not suitable. as you know, xdc_3_00_02_11 is older for this version of dvsdk. can you tell me the suitable version of xdc. thanks a lot.

  • It feels more like the codec package's getLibs() aren't returning appropriate libraries when asked.  In Juan's output, you can see these 3 lines of _additional_ libraries to link with:

    Juan Gonzales said:

        will link with ti.sdo.codecs.mpeg4enc.dm355:lib/libmp4enc.a
        will link with ti.sdo.codecs.mpeg4dec.dm355:lib/libmp4dec.a
        will link with ti.catalog.hwa.imcop:lib/libcosl.a;lib/libimx.a;lib/libdm355mm.a;lib/libimcopcsl.a

    Close inspection of the particular codec releases from each of your logs (specifically, each codec package's package.xs:getLibs() fxns) shows that libraries are only returned for linking if the target.isa == "v5t".  Finding that rang an extremely ugly bell.  [:(]  Here goes...

    The XDC tools broke compatibility with the gnu.targets.MVArm9 target between 3.00.05 and 3.00.06 where they changed the target.isa field from "v5t" to "v5T" (capital 'T').  It's also "v5T" in XDC 3.05.* and newer streams.  Memory serves that this change was made to bring the gnu.targets.MVArm9 target.isa into the same conventions as other ARM targets that also had "v5T" (capital T).

    What this means is that these DM355 codecs you're using only support you using XDC 3.00.05 or older (Juan's build shows he's using 3.00.04).  (FWIW, there are better techniques for writing getLibs() that we should get the codecs updated to use that would allow them to work with newer XDC releases.)

    What version of XDC is in your DVSDK distribution?  Assuming it's earlier than 3.00.06, I think you should use that one.

    Chris