Re: [xml] Compilation pbs for the example

Date view Thread view Subject view Author view

From: Marc Billaud (marcbill@wanadoo.fr)
Date: Fri Jun 30 2000 - 04:02:51 EDT


Bill Randle wrote:

> On Jun 28, 6:50pm, Marc Billaud wrote:
> } Subject: [xml] Compilation pbs for the example
> }
> } I got this message:
> }
> } creating example/Makefile
> } sed: can't read ./example/Makefile.in: No such file or directory
>
> This problem has been there a long time. It's a circular dependency
> in the automake rules where the top level config wants to build
> Makefiles for all the subdirectories, but the Makefile.in in the
> example directory requires the top level Makefile to be built first
> (or something like that; it's been awhile since I looked at it).
>
> That failure won't affect the actually building of the xml library.
> You can later go in and create the example Makefile by hand.
>
>

Hello
Thanks to Bill about the help. I ve written a new instruction for the
compilation of the example gjobread.c and the compilation seems to work
well now

 gcc -g -o gjobread gjobread.c -I/root/xml/libxml2-2.0.0 -lxml

I ve installed temporally the libxml2-2.0.0 in the root directory.
After I ve tried to run the gjobread bin on the gjobs.xml file provided.
Then I got a NULL pointer returned by xmlDocGetRootElement.
Here the result of the execution:

cyrix150:~/xml/libxml2-2.0.0/example # gjobread gjobs.xml
empty document n°1
 134587872
 0
 Segmentation fault (core dumped)
cyrix150:~/xml/libxml2-2.0.0/example #

Part of the source code of gjobread.c , I ve modified to display the
lines below:

    doc = xmlParseFile(filename);
    if (doc == NULL){
      printf("renvoi ptr null: %lu",(unsigned long int)doc);
      return(NULL);
    }
    fprintf(stdout,"renvoi ptr doc: %lu",(unsigned long int)doc );
    /*
     * Check the document is of the right kind
     */
    cur = doc->children;
    if (cur == NULL) {
        fprintf(stderr,"empty document n°1 \n %lu \n %lu \n ",(unsigned
long int)doc,(unsigned long int)cur);
 xmlFreeDoc(doc);
 return(NULL);
    }
Has anybody already get this problem. Thanks for the help
Bye

----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:18 EDT