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

Howdy Monks

I've been having troubles install XML::Parser on AIX under Perl 5.8.0 and the most recent version of expat. I'm not familiar with installing modules on AIX, so perhaps I'm missing something obvious....

Can anybody offer any advice to what might be going on, or... even better (or at least, just as good!): some hints on how to debug/fix these kinds of problems? I really don't know where to begin, so anything you can offer much appreciated.


$ perl Makefile.PL LIB=/db2blast/Perl EXPATINCPATH=/usr/local/include +EXPATLIBPATH=/usr/local/lib Writing Makefile for XML::Parser::Expat Writing Makefile for XML::Parser $ make $ make cc_r -c -I/usr/local/include -D_ALL_SOURCE -D_ANSI_C_SOURCE +-D_POSIX_S OURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_ +INIT -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"2.34\" -DXS_VERSION=\"2.3 +4\" "-I/u sr/opt/perl5/lib/5.8.0/aix-thread-multi/CORE" Expat.c "/usr/local/include/expat.h", line 18.10: 1506-296 (S) #include file " +expat_external.h" not found. "/usr/local/include/expat.h", line 132.3: 1506-046 (S) Syntax error. "/usr/local/include/expat.h", line 142.23: 1506-276 (S) Syntax error: +possible missing ')'? "/usr/local/include/expat.h", line 143.64: 1506-277 (S) Syntax error: +possible missing ')' or ','? "/usr/local/include/expat.h", line 147.1: 1506-276 (S) Syntax error: p +ossible missing '{'? "/usr/local/include/expat.h", line 192.3: 1506-273 (E) Missing type in + declaration of XML_Memory_Handling_Suite. "/usr/local/include/expat.h", line 197.13: 1506-172 (S) Parameter type + list for function XMLPARSEAPI contains parameters without identifiers. "/usr/local/include/expat.h", line 197.1: 1506-343 (S) Redeclaration o +f XMLPARSE API differs from previous declaration on line 146 of "/usr/local/inclu +de/expat.h". "/usr/local/include/expat.h", line 197.1: 1506-376 (I) Redeclaration o +f XMLPARSE API has a different number of fixed parameters than the previous decla +ration. "/usr/local/include/expat.h", line 198.1: 1506-276 (S) Syntax error: p +ossible missing '{'? "/usr/local/include/expat.h", line 501.16: 1506-276 (S) Syntax error: +possible missing ')'? "/usr/local/include/expat.h", line 502.17: 1506-276 (S) Syntax error: +possible missing ')'? "/usr/local/include/expat.h", line 503.3: 1506-273 (E) Missing type in + declaration of XML_Encoding. "/usr/local/include/expat.h", line 520.22: 1506-276 (S) Syntax error: +possible missing ')'? "/usr/local/include/expat.h", line 522.52: 1506-277 (S) Syntax error: +possible missing ')' or ','? "/usr/local/include/expat.h", line 520.13: 1506-334 (S) Identifier XML +CALL has a lready been defined on line 142 of "/usr/local/include/expat.h". "/usr/local/include/expat.h", line 526.1: 1506-276 (S) Syntax error: p +ossible missing '{'? "/usr/local/include/expat.h", line 805.3: 1506-045 (S) Undeclared iden +tifier XML_INITIALIZED. "/usr/local/include/expat.h", line 807.3: 1506-045 (S) Undeclared iden +tifier XML_FINISHED. "/usr/local/include/expat.h", line 808.3: 1506-045 (S) Undeclared iden +tifier XML_SUSPENDED. "/usr/local/include/expat.h", line 809.1: 1506-277 (S) Syntax error: p +ossible missing ';' or ','? "/usr/local/include/expat.h", line 812.8: 1506-007 (S) "enum XML_Parsi +ng" is undefined. "/usr/local/include/expat.h", line 822.1: 1506-276 (S) Syntax error: p +ossible missing '{'? "/usr/local/include/expat.h", line 846.3: 1506-045 (S) Undeclared iden +tifier XML_PARAM_ENTITY_PARSING_NEVER. "/usr/local/include/expat.h", line 848.3: 1506-045 (S) Undeclared iden +tifier XML_PARAM_ENTITY_PARSING_ALWAYS. "/usr/local/include/expat.h", line 849.1: 1506-277 (S) Syntax error: p +ossible missing ';' or ','? "/usr/local/include/expat.h", line 874.13: 1506-172 (S) Parameter type + list for function XMLPARSEAPI contains parameters without identifiers. "/usr/local/include/expat.h", line 875.1: 1506-276 (S) Syntax error: p +ossible missing '{'? "/usr/local/include/expat.h", line 960.3: 1506-273 (E) Missing type in + declaration of XML_Expat_Version. "/usr/local/include/expat.h", line 966.1: 1506-276 (S) Syntax error: p +ossible missing '{'? "/usr/local/include/expat.h", line 970.3: 1506-045 (S) Undeclared iden +tifier XML_FEATURE_END. "/usr/local/include/expat.h", line 971.3: 1506-045 (S) Undeclared iden +tifier XML_FEATURE_UNICODE. "/usr/local/include/expat.h", line 972.3: 1506-045 (S) Undeclared iden +tifier XML_FEATURE_UNICODE_WCHAR_T. "/usr/local/include/expat.h", line 973.3: 1506-045 (S) Undeclared iden +tifier XML_FEATURE_DTD. "/usr/local/include/expat.h", line 974.3: 1506-045 (S) Undeclared iden +tifier XML_FEATURE_CONTEXT_BYTES. "/usr/local/include/expat.h", line 975.3: 1506-045 (S) Undeclared iden +tifier XML_FEATURE_MIN_SIZE. "/usr/local/include/expat.h", line 976.3: 1506-045 (S) Undeclared iden +tifier XML_FEATURE_SIZEOF_XML_CHAR. "/usr/local/include/expat.h", line 977.3: 1506-045 (S) Undeclared iden +tifier XML_FEATURE_SIZEOF_XML_LCHAR. "/usr/local/include/expat.h", line 979.1: 1506-277 (S) Syntax error: p +ossible missing ';' or ','? "/usr/local/include/expat.h", line 983.25: 1506-277 (S) Syntax error: +possible missing ';' or ','? "/usr/local/include/expat.h", line 982.8: 1506-007 (S) "enum XML_Featu +reEnum" is undefined. "/usr/local/include/expat.h", line 987.13: 1506-172 (S) Parameter type + list for function XMLPARSEAPI contains parameters without identifier +s. "/usr/local/include/expat.h", line 988.1: 1506-276 (S) Syntax error: p +ossible missing '{'? "/usr/opt/perl5/lib/5.8.0/aix-thread-multi/CORE/scope.h", line 223.5: +1506-046 (S) Syntax error. "/usr/opt/perl5/lib/5.8.0/aix-thread-multi/CORE/thrdvar.h", line 85.25 +: 1506-007 (S) "struct stat64" is undefined. "/usr/opt/perl5/lib/5.8.0/aix-thread-multi/CORE/thrdvar.h", line 86.25 +: 1506-007 (S) "struct stat64" is undefined. "Expat.xs", line 111.8: 1506-166 (S) Definition of function XML_Char r +equires parentheses. make: 1254-004 The error code from the last command is 1. Stop. make: 1254-004 The error code from the last command is 2. Stop.

Edit by castaway - added readmore tags

Replies are listed 'Best First'.
Re: XML::Parser on AIX
by dragonchild (Archbishop) on Jan 31, 2005 at 14:13 UTC
    I'm not familiar with installing modules on AIX, so perhaps I'm missing something obvious....

    You are, but it's not something completely obvious. XS modules need to be compiled with the same compiler as compiled Perl. In addition, many XS modules require a minimum of a certain version of a certain compiler.

    If you're working with the Perl that came with your OS, it was probably compiled with xcc(?) - IBM's really wonky C compiler. You're trying to compile with cc, which probably isn't the same compiler.

    I would strongly recommend recompiling everything with the latest version of gcc - GNU's C compiler. It's freely downloadable as a binary, so you don't have to worry about bootstrapping your compiler.

    Yes, this is going to take about 2 days to fully do, but you will be a lot happier for it. It's what I've always had to do when I had the misfortune of working on AIX. (Irix and HP/UX are also the same way - it's not just AIX.)

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      actually turns out cc is indeed xlc on my system (cc_r is linked to the xlc binary). That being said, I'll start recompiling a new perl on my system. I just... would have figured that the default Perl build would be the most stable thing to work off of. Is that an overly naive view of the AIX world?
        It's an overly naive view of the vended-*nix world, and especially for AIX / Irix / HPUX. All three of those have a habit of being really annoying to work with from the opensource view. I've worked on AIX machines that were less than 5 years old that came pre-installed with Perl4. (Perl5 came out over 10 years ago.) Vendor-builds tend to be at least one major revision old and compiled with flags that make you wonder what crack they were smoking. Most monks tend to recompile their own versions of anything they're going to depend on in production, just so they know what's going on.

        Being right, does not endow the right to be rude; politeness costs nothing.
        Being unknowing, is not the same as being stupid.
        Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
        Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.