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.

Get "Can't locate object method "new" via package "XML::Parser" when trying to run CG_XML script sectti on Ubuntu

We've run into an interesting problem where the qualiTI tool passes our algorithm in one Linux setup and not the other.  We isolated the problem to a run error when attempting to run the sectti script on the results of ofd6x (CG XML tools 2.12.00, from DVSDK 2.00 for HD DaVinci).  When we do so, we get the above error message.

When we try running the same sectti on our O3530 setup on the same ofd6x output (same 2.12.00 version of CG XML, but not on Ubuntu), it works fine.  Also, other qualiTI tests involving ofd6x pass on Ubuntu.  This leads us to believe the issue is with running sectti -- and, more specifically, running sectti on this particular setup.

We are using Ubuntu running on VMWare for HD DaVinci.

This becomes a problem for us because we've found that the RTSC genpackage tool runs into the same issue and is therefore not able to extract the linker sections that it should (causing a problem later for genserver).

We tried using CPAN to get the latest versions of XML::Parser and XML::Simple.  It indicates the latest is installed.

We can try working around this by using our O3530 setup to run genpackage and doing the HD DaVinci specific genserver command for the rest of the packaging/testing flow (or trying something besides Ubuntu to run HD DaVinci DVSDK 2.00).  Thought I'd check to see if anyone else has run into this issue and, if they have, how they got around it.

Thanks!

   -Robert

 

 

  • I did a little more poking around.  If I run the perl script in the ofd directory.  i.e., if I do:

         ofd/sectti.pl  test.out

    rather than:

        bin/sectti test.out

    It works okay.  This leads me to believe the XML/Perl setup is okay and that this seems to be an issue with the precompiled executables.  Perhaps it's just a matter of rebuilding these perl scripts on my specific setup.  My question then becomes:  (a) Does anyone have any insight into how the executables are generated?,  or (b) Does anyone know how to modify the qualiTI tool and genpackage to use the original perl scripts rather than the executables?

    Thanks!

       -Robert

     

  • I had the same problem. It looks like an ubuntu problem.

    after running ldd on the *.so in /tmp/PAR-* (generated when any of the cg_xml

    pre-compiled binaries are first run), one of them was linking to libexpat.so.0

    After googling around, that symlink has been deprecated in favor of libexpat.so.1

    the suggested solution:

    > sudo ln -s /usr/lib/libexpat.so.1 /usr/lib/libexpat.so.0

    This affects all Ubuntu > 8.04 from what I've read.

    On a related note, running the cg_xml perl scripts directly fails under Ubuntu.

    You have to install XML::Simple using CPAN.

    This is apparently the reason that TI precompiled the perl scripts, but IMO,

    figuring out that you need to download XML::Simple was much more straightforward

    from the output of the failed execution attempt of the perl scripts

    when compared with figuring out the need for the above symlink from the output of

    the precompiled execution which gave the following error:

    Can't locate object method "new" via package "XML::Parser" at XML/Simple.pm line 404

    rchen said:

    I did a little more poking around.  If I run the perl script in the ofd directory.  i.e., if I do:

         ofd/sectti.pl  test.out

    rather than:

        bin/sectti test.out

    It works okay.  This leads me to believe the XML/Perl setup is okay and that this seems to be an issue with the precompiled executables.  Perhaps it's just a matter of rebuilding these perl scripts on my specific setup.  My question then becomes:  (a) Does anyone have any insight into how the executables are generated?,  or (b) Does anyone know how to modify the qualiTI tool and genpackage to use the original perl scripts rather than the executables?

    Thanks!

       -Robert

     

     

  •  

    Skywalker,

    Typing "sudo ln -s /usr/lib/libexpat.so.1 /usr/lib/libexpat.so.0" as you suggested fixed the problem!  Thank you so much!

    This is great because now we should be able to use Ubuntu / VMWare for the DVSDK2.00 projects. 

    Thanks again!

        -Robert

  • skywalker said:

    After googling around, that symlink has been deprecated in favor of libexpat.so.1

    the suggested solution:

    > sudo ln -s /usr/lib/libexpat.so.1 /usr/lib/libexpat.so.0

    This affects all Ubuntu > 8.04 from what I've read.

    I know this is an old thread, but got the "Can't locate object method "new" via package "XML::Parser" at XML/Simple.pm" error attempting to run call_graph from cg_xml-v2_32_00 under CentOS 6.6 64-bit.

    In the case of CentOS running the following then allowed call_graph to be used:

    sudo ln -s /lib/libexpat.so.1 /lib/libexpat.so.0