You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by "Jason E. Stewart" <ja...@openinformatics.com> on 2003/11/06 03:45:06 UTC

[Chance Younkin ] XML::Xerces trouble

Jason:

I have attempted several times to build XML::Xerces for Perl.  I still 
haven't been successful.  I've done several searches on the web to find 
help but have come up empty.  Thus I've decided to bother you...I hope 
you can help me.

BACKGROUND:
My operating system:        SunOS 5.7
My C++ compiler:            Sun WorkShop 6 2000/04/07 C++ 5.1
My version of perl:         v5.6.0
My version of XercesC++:    xerces-c_2_3_0-Sol2.7ForCC
My version of XML::Xerces:  XML-Xerces-2.3.0-3

I downloaded the binary version of XercesC++ to my home directory, 
extracted everything from the .gz file, set appropriate environment 
variables, and the samples ran just fine.

I then proceeded to follow instructions on downloading and building the 
XML::Xerces for Perl.  I created a small script to set up the build 
environment.  That script is a csh file whose contents are:

# Begin csh file
setenv PERLLIB /home/younkin/install/XML-Xerces-2.3.0-3/blib/lib
setenv MYXERCESCROOT /home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC
setenv XERCES_CONFIG $MYXERCESCROOT/etc/config.status
setenv XERCES_INCLUDE $MYXERCESCROOT/include
setenv XERCES_LIB $MYXERCESCROOT/lib
setenv LD_LIBRARY_PATH  $MYXERCESCROOT/lib
setenv LD_RUN_PATH 
"/lib:/home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/lib:/apps/base/SUNWspro/WS6/lib"
# End csh file

Then I started in following the steps provided on your web page:

STEP 1:  perl Makefile.PL
This step worked fine, with the following output:

# Begin output
Using XERCES_LIB = /home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/lib
Using XERCES_INCLUDE = 
/home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/include
Using Xerces-C version info from 
/home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/include/xercesc/util/XercesVersion.hpp
Checking to see if libxerces is in your library path...Success!!
Using Xerces-C version: 2.3.0
Checking if your kit is complete...
Looks good
Processing hints file hints/solaris_2.pl
Writing Makefile for Handler
Writing Makefile for XML::Xerces
# End output

STEP 2:  make
This failed with the following output:

# Begin output
mkdir blib
mkdir blib/lib
mkdir blib/lib/XML
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/XML
mkdir blib/arch/auto/XML/Xerces
mkdir blib/lib/auto
mkdir blib/lib/auto/XML
mkdir blib/lib/auto/XML/Xerces
cp Xerces.pm blib/lib/XML/Xerces.pm
make -C Handler static
make[1]: Entering directory 
`/home/younkin/install/XML-Xerces-2.3.0-3/Handler'
cc -c -I. -IHandler 
-I/home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/include -D_REENTRANT 
-O     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -KPIC 
-I/apps/base/lib/perl5/5.6.0/sun4-solaris/CORE  PerlCallbackHandler.cpp
cc: No input file specified, no output generated
make[1]: *** [PerlCallbackHandler.o] Error 1
make[1]: Leaving directory 
`/home/younkin/install/XML-Xerces-2.3.0-3/Handler'
make: *** [blib/arch/auto/Handler/Handler.a] Error 2
# End output

I determined that the generated makefiles set the CC variable to 'cc' so 
I tried 'CC' (upper case as opposed to lower case).  This helped but I 
got the following compiler error:

# Begin output
CC -c -I. -IHandler 
-I/home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/include -D_REENTRANT 
-O     -DVERSION=\"2.3.0-3\" -DXS_VERSION=\"2.3.0-3\" -KPIC 
-I/apps/base/lib/perl5/5.6.0/sun4-solaris/CORE  Xerces.cpp
"Xerces.cpp", line 499: Error: PERL_MAGIC_tied is not defined.
"Xerces.cpp", line 845: Warning: String literal converted to char* in 
initialization.
"Xerces.cpp", line 862: Warning: String literal converted to char* in 
initialization.
"Xerces.cpp", line 879: Warning: String literal converted to char* in 
initialization.
"Xerces.cpp", line 896: Warning: String literal converted to char* in 
initialization.
1 Error(s) and 4 Warning(s) detected.
# End output


I did a 'find' in both the XML_Xerces and xercesc directories and did 
not find any definition of PERL_MAGIC_tied anywhere.

When I tried the previous version of XML::Xerces, I got the same problem 
with CC=cc, but it did build after I changed it to upper case.  However, 
the make test failed and the sample perl scripts provided all caused a 
core dump.  Like I said, I haven't found anything on the web where folks 
are having the same problems that I'm having.  I've tried several things 
that aren't worth explaining to you, but have not had any success.

Any information you could provide would be helpful.  Thank you very much...

Chance Younkin

-- 
cry@owt.com





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: [Chance Younkin ] XML::Xerces trouble

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
jason@openinformatics.com (Jason E. Stewart) writes:

> I have attempted several times to build XML::Xerces for Perl.  I still 
> haven't been successful.  I've done several searches on the web to find 
> help but have come up empty.  Thus I've decided to bother you...I hope 
> you can help me.
> 
> BACKGROUND:
> My operating system:        SunOS 5.7
> My C++ compiler:            Sun WorkShop 6 2000/04/07 C++ 5.1
> My version of perl:         v5.6.0

if you want to use unicode, you'll want to upgrade that.

> My version of XercesC++:    xerces-c_2_3_0-Sol2.7ForCC
> My version of XML::Xerces:  XML-Xerces-2.3.0-3

so far so good.

> I downloaded the binary version of XercesC++ to my home directory, 
> extracted everything from the .gz file, set appropriate environment 
> variables, and the samples ran just fine.

ok, that's useful

> I then proceeded to follow instructions on downloading and building the 
> XML::Xerces for Perl.  I created a small script to set up the build 
> environment.  That script is a csh file whose contents are:
> 
> # Begin csh file
> setenv PERLLIB /home/younkin/install/XML-Xerces-2.3.0-3/blib/lib
> setenv MYXERCESCROOT /home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC
> setenv XERCES_CONFIG $MYXERCESCROOT/etc/config.status
> setenv XERCES_INCLUDE $MYXERCESCROOT/include
> setenv XERCES_LIB $MYXERCESCROOT/lib
> setenv LD_LIBRARY_PATH  $MYXERCESCROOT/lib
> setenv LD_RUN_PATH 
> "/lib:/home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/lib:/apps/base/SUNWspro/WS6/lib"
> # End csh file

Ok, you didn't define XERCESCROOT - which (unfortunately) is critical
for building things with xerces-c.

> Then I started in following the steps provided on your web page:
> 
> STEP 1:  perl Makefile.PL
> This step worked fine, with the following output:
> 
> # Begin output
> Using XERCES_LIB = /home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/lib
> Using XERCES_INCLUDE = 
> /home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/include
> Using Xerces-C version info from 
> /home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/include/xercesc/util/XercesVersion.hpp
> Checking to see if libxerces is in your library path...Success!!
> Using Xerces-C version: 2.3.0
> Checking if your kit is complete...
> Looks good
> Processing hints file hints/solaris_2.pl
> Writing Makefile for Handler
> Writing Makefile for XML::Xerces
> # End output

Because you didn't define XERCESCROOT, Makefile.PL doesn't know where
to look to find the config.status file. The Xerces-C people promised
me that they would start included it for the binary
distributions. Because I can't read your config.status file, I can't
find where your C++ compiler is located, nor can I find any of the
CFLAGS or LDFLAGS used to build Xerces-C - which means Perl has to
guess, and it is notoriously bad at guessing...

> cc -c -I. -IHandler 
> -I/home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/include -D_REENTRANT 
> -O     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -KPIC 
> -I/apps/base/lib/perl5/5.6.0/sun4-solaris/CORE  PerlCallbackHandler.cpp
> cc: No input file specified, no output generated

This is the error you get when using cc on a C++ file - I can't
remember why - whether it's a license issue, or what.

> I determined that the generated makefiles set the CC variable to 'cc' so 
> I tried 'CC' (upper case as opposed to lower case).  This helped but I 
> got the following compiler error:
> 
> # Begin output
> CC -c -I. -IHandler 
> -I/home/younkin/install/xerces-c_2_3_0-Sol2.7ForCC/include -D_REENTRANT 
> -O     -DVERSION=\"2.3.0-3\" -DXS_VERSION=\"2.3.0-3\" -KPIC 
> -I/apps/base/lib/perl5/5.6.0/sun4-solaris/CORE  Xerces.cpp
> "Xerces.cpp", line 499: Error: PERL_MAGIC_tied is not defined.
> "Xerces.cpp", line 845: Warning: String literal converted to char* in 
> initialization.
> "Xerces.cpp", line 862: Warning: String literal converted to char* in 
> initialization.
> "Xerces.cpp", line 879: Warning: String literal converted to char* in 
> initialization.
> "Xerces.cpp", line 896: Warning: String literal converted to char* in 
> initialization.
> 1 Error(s) and 4 Warning(s) detected.
> # End output
> 
> 
> I did a 'find' in both the XML_Xerces and xercesc directories and did 
> not find any definition of PERL_MAGIC_tied anywhere.

Sorry, 2.3.0-4 solves this problem, that is a Perl-5.8 variable, and
you're using 5.6. If you don't want to upgrade XML::Xerces again, you
can simply modify the one use of PERL_MAGIC_tied to be the character:
'P'. 

> When I tried the previous version of XML::Xerces, I got the same problem 
> with CC=cc, but it did build after I changed it to upper case.  

correct, it is a C++ project, you must use CC. XML::Xerces will autodetect
this if you set the XERCESCROOT variable.

> However, the make test failed and the sample perl scripts provided
> all caused a core dump.  Like I said, I haven't found anything on
> the web where folks are having the same problems that I'm having.
> I've tried several things that aren't worth explaining to you, but
> have not had any success.

Please rebuild after setting XERCESCROOT, and if the test scripts
still dump core, please post the results to the list, and we'll see
what we can do.

Cheers,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org