jbrose has asked for the wisdom of the Perl Monks concerning the following question:

Hello. We are attempting to instasll Xerces-p on our Solaris 10 box. With PERL 5.8.8. We are getting the same errors regardless of version of Xerces we have tried to install.

Some folks seem to infer on the web it is an Perl 5.8 issue.

Solaris 10
PERL 5.8.8
GNU Make 3.80 gcc version 3.3.2
Here is a sampling of the errors....

/usr/local/bin/make
make1: Entering directory `/usr/local/XML-Xerces-2.7.0-0/Handler'
make1: Leaving directory `/usr/local/XML-Xerces-2.7.0-0/Handler'
gcc -c -I. -IHandler
-I/usr/local/xerces-c-src_2_5_0/include -D_REENTRANT -DHAS_BOOL -O -DVERSION=\"2.7.0-0\" -DXS_VERSION=\"2.7.0-0\" -fPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE"
Xerces.cpp
Xerces.cpp:1219: error: parse error before `__attribute__'
Xerces.cpp:1219: error: syntax error before `)' token
Xerces.cpp:1220: error: syntax error before `*' token
Xerces.cpp:1225: error: 'SwigPerlWrapperPtr' is used as a type, but is not defined as a type.
Xerces.cpp:4724: error: parse error before `__attribute__'
Xerces.cpp: In function `void _wrap_delete_XMLDeleter(...)':
Xerces.cpp:4732: error: parse error before `if'
Xerces.cpp:4734: error: parse error before `}' token

Any suggestions?

Thanks
John

Replies are listed 'Best First'.
Re: Xerces-p install issues on Perl 5.8.8
by Old_Gray_Bear (Bishop) on Dec 14, 2006 at 01:30 UTC
    As chargrill pointed out, there traditionally have been issues with anything compiled 'by hand' on Solaris boxes, since the Sun C Compilers and the gcc compiler suite tend to hiss and spit at each other.

    You might see if the Sun Software site has a pkg-add already built for Xerces (pre-compiled by them under Solaris10, using the same Perl version and all the libraries that they included on the distribution CDs). I sometimes lucked out that way and they had just what I needed on the shelf. The folks who ran SunSoft were pretty good about building me a new package built within 48 hours of my asking for the things they didn't already stock. (Granted, this was Sun back in the late-nineties, but....)

    I recall spending one entire summer installing and reinstalling Perl 5.6.1 and all of its friends and relations from scratch using the gcc compiler. After the third or fourth iteration of "Rats, here's another package with XS; well I do know how to recompile world ...", I finally decided that letting Sun do the hard-stuff was the better plan; after all, that's what we had a service/maintenance contract for.

    I don't know how things will play now that Solaris is getting itself Open-Sourced, but I suspect that I'd be able to work around it by booting from the CDs to perform my initial 'make world' using the source from the CDs and the compiler that I down-loaded from the GNU repository.

    Anyway, I'd check the Sun down-load sites to see if I can get a pre-built version of anything that requires compilation.

    ----
    I Go Back to Sleep, Now.

    OGB

Re: Xerces-p install issues on Perl 5.8.8
by chargrill (Parson) on Dec 13, 2006 at 23:26 UTC

    I haven't seen this particular issue come up before (usually trying to compile XS modules), but any time I've mixed compiling anything related to (or perhaps better stated as linking against) the perl that gets shipped with solaris, you'll have problems. Do a super search here for "solaris compile" which will show plenty of information on workarounds, one of which is to re-compile perl yourself, with the same gcc you're trying to compile Xerces-p with (not forte or sun workshop which is what the shipped perl is generally compiled with), and you might have much better luck.

    HTH



    --chargrill
    s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)