Hello,
I'm running QualiTI tool on linux fedora 11 and some tests get the following run error:
Can't locate object method "new" via package "XML::Parser" at XML/Simple.pm line 404, <STDIN> line 1.
Any idea what can I do to solve the error?
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.
Hello,
I'm running QualiTI tool on linux fedora 11 and some tests get the following run error:
Can't locate object method "new" via package "XML::Parser" at XML/Simple.pm line 404, <STDIN> line 1.
Any idea what can I do to solve the error?
QualiTI uses an executable named sectti from the cg_xml package http://tiexpressdsp.com/index.php/Code_Generation_Tools_XML_Processing_Scripts to do some of its work. sectti, in turn, requires an XML parser named Expat http://expat.sourceforge.net/ . If you run sectti on a system which does not have Expat installed, you get that message. Most Linux systems have Expat installed by default. Fedora Linux does not.
So, your best bet is to install Expat on your system. I'm sorry I don't know how to do that. I'll look into it and post what I find here. I'm thinking you may already know how to do such things, and can move ahead without me.
Longer term, we'll fix the cg_xml package so this dependency on Expat is no longer necessary.
Thanks and regards,
-George
Here is how I installed Expat. You probably need root permission to perform all the steps. From here http://sourceforge.net/projects/expat/files/ download the file expat-2.0.1.tar.gz . Unpack it into a temp directory. The directions in the README are pretty straightforward. On my Redhat installation the final library files are in /usr/lib.
Hope this helps ..
-George
Hi George,
Thanks for your quick response. I checked with rpm command and got the folowing:
$ rpm -q expat
expat-2.0.1-6.i586
I'm new to Linux but as I understand it means that I already have expat installed. If so, do you have any other idea?
Thanks,
Yehuda.
Unfortunately, my Linux skills are not that great either. It does appear you have expat installed. But the system is not finding it when you run sectti via QualiTI.
The first step is to find where you currently have expat installed. Sorry, but I just don't know how to do that. For me, it is installed in /usr/lib.
Next, see where the system is looking for expat. You can see all the files opened, including the expat dynamic library file, via a command similar to:
% ofd6x -x file.out > file.xml
% strace -e trace=open sectti file.xml 2>&1 | less
The first command creates the XML file input for the cg_xml script sectti. ofd6x is a utility that comes installed with the C6000 compiler. The second command executes sectti under control of strace, which shows you all the system calls to open a file. Use less to search for "expat". You'll see all the directories it looks in for the expat library file right before the failure message.
Now, you have a choice. Either create a symbolic link from where you have expat installed to one of the directories where sectti is already looking for it. Or, modify the search library search path. An easy way to modify the search path is via the LD_LIBRARY_PATH environment variable. A command like this will do it:
% export LD_LIBRARY_PATH=/some/dir/path
Some Linux experts frown on this technique. I'll let you be the judge of that.
Hope this helps ...
-George
George,
Using the strace I saw that my fedora can't find the file libexpat.so.0
Search in google I found:
http://www.linuxforums.org/forum/suse-linux-help/61905-libexpat-so-0-missing.html
Suggest to install compat-expat1 so:
yum install compat-expat1
solved the problem.
Yehuda.