Help needed installing the Perl XML::Parser module on Solaris 10 server
807557Aug 18 2008 — edited Aug 25 2008I have a new Solaris 10 server that is running on a Sun V490. I am trying to install the Perl module XML::Parser via cpan and also via command line and neither method is working for me. I have been installing multiple modules via cpan without issue, but I receive the following error when trying to install the XML::Parser module.
/usr/local/bin/perl /usr/local/lib/perl5/5.8.8/ExtUtils/xsubpp -noprototypes -typemap /usr/local/lib/perl5/5.8.8/ExtUtils/type map -typemap typemap Expat.xs > Expat.xsc && mv Expat.xsc Expat.c
/usr/local/bin/gcc -m64 -mcpu=v9 -B/usr/ccs/bin/ -c -D_REENTRANT -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I /usr/local/include -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -DVERSIO N=\"2.36\" -DXS_VERSION=\"2.36\" -fPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris-thread-multi-64/CORE" Expat.c
Expat.xs: In function `startElement':
Expat.xs:501: warning: comparison is always false due to limited range of data type
Expat.xs: In function `XS_XML__Parser__Expat_LoadEncoding':
Expat.xs:2043: warning: comparison is always false due to limited range of data type
Expat.xs:2044: warning: comparison is always false due to limited range of data type
Running Mkbootstrap for XML::Parser::Expat ()
chmod 644 Expat.bs
rm -f ../blib/arch/auto/XML/Parser/Expat/Expat.so
LD_RUN_PATH="/usr/local/lib" /usr/local/bin/gcc -m64 -mcpu=v9 -B/usr/ccs/bin/ -G -m64 -L/usr/local/lib Expat.o -o ../blib/ar ch/auto/XML/Parser/Expat/Expat.so \
-lexpat \
ld: fatal: file /usr/local/lib/libexpat.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to ../blib/arch/auto/XML/Parser/Expat/Expat.so
collect2: ld returned 1 exit status
make[1]: *** [../blib/arch/auto/XML/Parser/Expat/Expat.so] Error 1
make[1]: Leaving directory `/root/.cpan/build/XML-Parser-2.36/Expat'
*** Error code 2
The following command caused the error:
cd Expat && make -f Makefile all LIBPERL_A="libperl.a" LINKTYPE="dynamic" OPTIMIZE="-O" PREFIX="/usr/local"
make: Fatal error: Command failed for target `subdirs'
/usr/ccs/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Failed during this command:
MSERGEANT/XML-Parser-2.36.tar.gz : make NO
I am using Perl 5.8.8. I have also changed /usr/ucb/cc to point to /usr/local/bin/gcc. Following is the output of my gcc version:
gcc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure with-as=/usr/ccs/bin/as with-ld=/usr/ccs/bin/ld enable-shared enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
The other method I have tried is to download the XML Parser 2.3.6 software and run the following:
perl Makefile.PL EXPATLIBPATH=/usr/local/lib EXPATINCPATH=/usr/local/include
This will return the following:
Checking if your kit is complete...
Looks good
Writing Makefile for XML::Parser::Expat
Writing Makefile for XML::Parser
But, when I run either /usr/local/bin/make or /usr/ccs/bin/make, I receive the following errors:
/usr/local/bin/gcc -m64 -mcpu=v9 -B/usr/ccs/bin/ -c -I/usr/local/include -D_REENTRANT -fno-strict-aliasing -pipe -Wdecla ration-after-statement -I/usr/local/include -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL USESAFE_PUTENV -O -DVERSION=\"2.36\" -DXS_VERSION=\"2.36\" -fPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris-thread-mu lti-64/CORE" Expat.c
Expat.xs: In function `startElement':
Expat.xs:501: warning: comparison is always false due to limited range of data type
Expat.xs: In function `XS_XML__Parser__Expat_LoadEncoding':
Expat.xs:2043: warning: comparison is always false due to limited range of data type
Expat.xs:2044: warning: comparison is always false due to limited range of data type
Running Mkbootstrap for XML::Parser::Expat ()
chmod 644 Expat.bs
rm -f ../blib/arch/auto/XML/Parser/Expat/Expat.so
LD_RUN_PATH="/usr/local/lib" /usr/local/bin/gcc -m64 -mcpu=v9 -B/usr/ccs/bin/ -G -m64 -L/usr/local/lib Expat.o -o ../blib/arch/auto/XML/Parser/Expat/Expat.so \
-L/usr/local/lib -lexpat \
ld: fatal: file /usr/local/lib/libexpat.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to ../blib/arch/auto/XML/Parser/Expat/Expat.so
collect2: ld returned 1 exit status
make[1]: *** [../blib/arch/auto/XML/Parser/Expat/Expat.so] Error 1
make[1]: Leaving directory `/opt/app/d1eem1c1/software/foo/XML-Parser-2.36/Expat'
make: *** [subdirs] Error 2
Note that both seem to reveal an ELFCLASS32 issue. Am I missing something here ? I ran the command isainfo -v and have the following information:
*64-bit sparcv9 applications*
vis2 vis popc
*32-bit sparc applications*
vis2 vis popc v8plus div32 mul32
I also have expat installed from the Sunfreeware package (version 2.0.1).
Finally, I have tried posting this topic on the cpanforum and have tried googling a solution and have yet to find a solution, but it does appear others have faced this same issue on the Solaris platform. Any suggestions or help in getting the Perl XML::Parser module installed would greatly be appreciated.