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

I believe it is related to the c compiler differences however even after reinstalling Perl with C/C++ V7.0 compiler and then trying to add the XML parser module with same compiler we are getting this:

aix52:/usr/opt/perl5/bin/XML-Parser-2.34> sudo make
cp Parser/Encodings/x-sjis-cp932.enc blib/lib/XML/Parser/Encodings/x-sjis-cp932.enc
cp Parser/Encodings/iso-8859-7.enc blib/lib/XML/Parser/Encodings/iso-8859-7.enc
cp Parser/Style/Tree.pm blib/lib/XML/Parser/Style/Tree.pm
cp Parser/Encodings/iso-8859-9.enc blib/lib/XML/Parser/Encodings/iso-8859-9.enc
cp Parser/Encodings/x-euc-jp-unicode.enc blib/lib/XML/Parser/Encodings/x-euc-jp-unicode.enc
cp Parser/Encodings/README blib/lib/XML/Parser/Encodings/README
cp Parser/Encodings/euc-kr.enc blib/lib/XML/Parser/Encodings/euc-kr.enc
cp Parser/Encodings/windows-1250.enc blib/lib/XML/Parser/Encodings/windows-1250.enc
cp Parser/Encodings/windows-1252.enc blib/lib/XML/Parser/Encodings/windows-1252.enc
cp Parser/Encodings/big5.enc blib/lib/XML/Parser/Encodings/big5.enc
cp Parser/Encodings/iso-8859-3.enc blib/lib/XML/Parser/Encodings/iso-8859-3.enc
cp Parser/Encodings/Japanese_Encodings.msg blib/lib/XML/Parser/Encodings/Japanese_Encodings.msg
cp Parser/Style/Subs.pm blib/lib/XML/Parser/Style/Subs.pm
cp Parser/Encodings/x-euc-jp-jisx0221.enc blib/lib/XML/Parser/Encodings/x-euc-jp-jisx0221.enc
cp Parser/Encodings/iso-8859-8.enc blib/lib/XML/Parser/Encodings/iso-8859-8.enc
cp Parser/Encodings/iso-8859-4.enc blib/lib/XML/Parser/Encodings/iso-8859-4.enc
cp Parser/Encodings/iso-8859-2.enc blib/lib/XML/Parser/Encodings/iso-8859-2.enc
cp Parser/Encodings/x-sjis-jdk117.enc blib/lib/XML/Parser/Encodings/x-sjis-jdk117.enc
cp Parser/LWPExternEnt.pl blib/lib/XML/Parser/LWPExternEnt.pl
cp Parser/Encodings/x-sjis-unicode.enc blib/lib/XML/Parser/Encodings/x-sjis-unicode.enc
cp Parser/Style/Objects.pm blib/lib/XML/Parser/Style/Objects.pm
cp Parser/Style/Debug.pm blib/lib/XML/Parser/Style/Debug.pm
cp Parser.pm blib/lib/XML/Parser.pm
cp Parser/Encodings/x-sjis-jisx0221.enc blib/lib/XML/Parser/Encodings/x-sjis-jisx0221.enc
cp Parser/Style/Stream.pm blib/lib/XML/Parser/Style/Stream.pm
cp Parser/Encodings/iso-8859-5.enc blib/lib/XML/Parser/Encodings/iso-8859-5.enc
/usr/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME" => "XML::Parser", "DL_FUNCS" => { }, "FUNCLIST"
=> [], "DL_VARS" => []);'
cp Expat.pm ../blib/lib/XML/Parser/Expat.pm
/usr/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME" => "XML::Parser::Expat", "DL_FUNCS" => { }, "FUN
CLIST" => [], "DL_VARS" => []);'
/usr/bin/perl /usr/opt/perl5/lib/5.8.0/ExtUtils/xsubpp -noprototypes -typemap /usr/opt/perl5/lib/5.8.0/ExtUtils/
typemap -typemap typemap Expat.xs > Expat.xsc && mv Expat.xsc Expat.c
cc_r -c -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEE
D_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"2.34\" -DXS_VERSION=\"2.34\" "-I/usr/opt/perl5/lib/5.8
.0/aix-thread-multi/CORE" Expat.c
Running Mkbootstrap for XML::Parser::Expat ()
chmod 644 Expat.bs
rm -f ../blib/arch/auto/XML/Parser/Expat/Expat.so
LD_RUN_PATH="" ld -bhalt:4 -bM:SRE -bI:/usr/opt/perl5/lib/5.8.0/aix-thread-multi/CORE/perl.exp -bE:Expat.exp -b
noentry -lpthreads -lc_r Expat.o -o ../blib/arch/auto/XML/Parser/Expat/Expat.so
ld: 0711-317 ERROR: Undefined symbol: .XML_Parse
ld: 0711-317 ERROR: Undefined symbol: .XML_SetNamespaceDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetElementHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetUnknownEncodingHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetEndCdataSectionHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetStartCdataSectionHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_GetInputContext
ld: 0711-317 ERROR: Undefined symbol: .XML_GetCurrentByteCount
ld: 0711-317 ERROR: Undefined symbol: .XML_ErrorString
ld: 0711-317 ERROR: Undefined symbol: .XML_GetSpecifiedAttributeCount
ld: 0711-317 ERROR: Undefined symbol: .XML_GetCurrentByteIndex
ld: 0711-317 ERROR: Undefined symbol: .XML_GetCurrentColumnNumber
ld: 0711-317 ERROR: Undefined symbol: .XML_GetCurrentLineNumber
ld: 0711-317 ERROR: Undefined symbol: .XML_GetErrorCode
ld: 0711-317 ERROR: Undefined symbol: .XML_SetDefaultHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_DefaultCurrent
ld: 0711-317 ERROR: Undefined symbol: .XML_SetDefaultHandlerExpand
ld: 0711-317 ERROR: Undefined symbol: .XML_GetBase
ld: 0711-317 ERROR: Undefined symbol: .XML_SetBase
ld: 0711-317 ERROR: Undefined symbol: .XML_SetXmlDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetEndDoctypeDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetStartDoctypeDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetAttlistDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetElementDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetEntityDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetExternalEntityRefHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetNotationDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetUnparsedEntityDeclHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetCommentHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetProcessingInstructionHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_SetCharacterDataHandler
ld: 0711-317 ERROR: Undefined symbol: .XML_ParserFree
ld: 0711-317 ERROR: Undefined symbol: .XML_ParserCreate_MM
ld: 0711-317 ERROR: Undefined symbol: .XML_SetUserData
ld: 0711-317 ERROR: Undefined symbol: .XML_SetParamEntityParsing
ld: 0711-317 ERROR: Undefined symbol: .XML_ExternalEntityParserCreate
ld: 0711-317 ERROR: Undefined symbol: .XML_GetBuffer
ld: 0711-317 ERROR: Undefined symbol: .XML_ParseBuffer
ld: 0711-317 ERROR: Undefined symbol: .XML_SetCdataSectionHandler
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: 1254-004 The error code from the last command is 8.

Stop.
make: 1254-004 The error code from the last command is 2.

Stop.
Here is some env info: ##########################

aix52:/usr/opt/perl5/bin> sudo perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=aix, osvers=5.2.0.0, archname=aix-thread-multi
uname='aix rocky 2 5 000ad7df4c00 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc_r', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN

-DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong',
optimize='-O',
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTH

READ_INIT'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -brtl -b32'
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -ldbm -ldl -lld -lm -lpthreads -lc_r -lcrypt -lbsd -lPW
perllibs=-lbind -lnsl -ldl -lld -lm -lpthreads -lc_r -lcrypt -lbsd -lPW
libc=/lib/libc.a, so=a, useshrplib=true, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/usr/opt/perl5/lib/5.8.0/aix-thread-multi/CORE/perl.exp

'
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lpthreads -lc_r'



Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under aix
Compiled at Jul 26 2002 13:48:15
@INC:
/usr/opt/perl5/lib/5.8.0/aix-thread-multi
/usr/opt/perl5/lib/5.8.0
/usr/opt/perl5/lib/site_perl/5.8.0/aix-thread-multi
/usr/opt/perl5/lib/site_perl/5.8.0
/usr/opt/perl5/lib/site_perl




Listing of perl modules:

aix52:/usr/opt/perl5/bin> perldoc perllocal




PERLLOCAL(1) perl v5.8.0 (2005-05-02) PERLLOCAL(1)




Mon May 2 14:47:55 2005: "Module" XML-DOM

o "installed into: /usr/opt/perl5/lib/site_perl/5.8.0"

o "LINKTYPE: dynamic"

o "VERSION: 1.43"

o "EXE_FILES: "

+_+_+_+_+_+_+_+_+_+_
Thanks in advance

READMORE tags added by Arunbear

  • Comment on Unable to install XML:Parser 2.34 on Aix w perl 5.8

Replies are listed 'Best First'.
Re: Unable to install XML:Parser 2.34 on Aix w perl 5.8
by bart (Canon) on May 14, 2005 at 17:52 UTC
    I'm thinking you might be missing the Expat library. Expat.xs is nothing but a binding layer between perl and this library. You need to get and install it yourself, first. I think you can get it at the Expat project on Sourceforge.

      And if even it is installed, it might not be in your standard library location, or might be too old of a version. From the README for XML::Parser:

      This is a Perl extension interface to James Clark's XML parser, expat. It requires at least version 5.004 of perl and it requires that you have release 1.95.0 or greater of expat installed. You can download expat from:
      http://sourceforge.net/projects/expat/

      Of course, these sort of problems should have been caught in during the 'perl Makefile.PL' stage, as you'd have gotten a warning like:

      Expat must be installed prior to building XML::Parser and I can't find it in the standard library directories. You can download expat from:
      http://sourceforge.net/projects/expat/
      If expat is installed, but in a non-standard directory, then use the following options to Makefile.PL:
      EXPATLIBPATH=... To set the directory in which to find libexpat
      EXPATINCPATH=... To set the directory in which to find expat.h
      For example:
      perl Makefile.PL EXPATLIBPATH=/home/me/lib EXPATINCPATH=/home/me/include
      Note that if you build against a shareable library in a non-standard location you may (on some platforms) also have to set your LD_LIBRARY_PATH environment variable at run time for perl to find the library.

      Of course, if you ran the make under sudo, and not the Makefile.PL, you might have different settings, which could present problems. I try to only run the 'make install' as root, and run Makefile.PL/make/make test as a non-root user. (if the program is going to be run as root, I'll sometimes also run 'make test' as root, because I've run into odd problems before, where it would pass the tests as root, or not root, but not both)