Solved

compile perl Compress::Zlib on AIX 5.3

Posted on 2006-06-28
3
1,761 Views
Last Modified: 2013-12-26
Hi Developers.

I need some help here. I'm currently trying to compile the perl Compress::Zlib module on a AIX 5.3 platform with gcc 3.3.2 installed, but it fails with the following:

root@ebstest # pwd
/.cpan/build/Compress-Zlib-1.41
root@ebstest #
root@ebstest # perl Makefile.PL CC=gcc
Parsing config.in...
Building Zlib enabled
Looks Good.
Up/Downgrade complete.
Checking if your kit is complete...
Looks good
Writing Makefile for Compress::Zlib
root@ebstest # make
cp Zlib.pm blib/lib/Compress/Zlib.pm
AutoSplitting blib/lib/Compress/Zlib.pm (blib/lib/auto/Compress/Zlib)
        /usr/bin/perl -e 'use ExtUtils::Mksymlists;  Mksymlists("NAME" => "Compress::Zlib", "DL_FUNCS" => {  }, "FUNCLIST" => [], "DL_VARS" => []);'
        /usr/bin/perl /usr/opt/perl5/lib/5.8.2/ExtUtils/xsubpp  -typemap /usr/opt/perl5/lib/5.8.2/ExtUtils/typemap -typemap typemap  Zlib.xs > Zlib.xsc && mv Zlib.xsc Zlib.c
        gcc -c  -I./zlib-src  -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong -O    -DVERSION=\"1.41\"  -DXS_VERSION=\"1.41\"  "-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE"   Zlib.c
gcc: unrecognized option `-qmaxmem=16384'
gcc: unrecognized option `-qnoansialias'
gcc: unrecognized option `-q32'
gcc: unrecognized option `-qlonglong'
In file included from /usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.h:2071,
                 from Zlib.xs:22:
/usr/include/pthread.h:652: error: parse error before '*' token
/usr/include/pthread.h:655: error: parse error before '*' token
/usr/include/pthread.h:658: error: parse error before '*' token
/usr/include/pthread.h:661: error: parse error before '*' token
/usr/include/pthread.h:664: error: parse error before '*' token
/usr/include/pthread.h:672: error: parse error before '*' token
/usr/include/pthread.h:675: error: parse error before '*' token
/usr/include/pthread.h:678: error: parse error before '*' token
/usr/include/pthread.h:681: error: parse error before '*' token
/usr/include/pthread.h:689: error: parse error before '*' token
/usr/include/pthread.h:693: error: parse error before '*' token
/usr/include/pthread.h:696: error: parse error before '*' token
In file included from /usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/op.h:484,
                 from /usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.h:2344,
                 from Zlib.xs:22:
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/reentr.h:619: error: field `_drand48_struct' has incomplete type
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/reentr.h:727: error: field `_random_struct' has incomplete type
/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/reentr.h:775: error: field `_srandom_struct' has incomplete type
make: 1254-004 The error code from the last command is 1.


Stop.


Anyone that could point me to the right direction?

Thanks in advance
0
Comment
Question by:vw393
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
JulieBouillon earned 125 total points
ID: 16999749
Hi vw393,

To be able to compile CPAN module, you must use the same compiler that the one used to compile perl itself. You can find the compiler used to create the perl executable with the following command:
$ perl -V | grep 'cc='
    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',
$

In the previous example, the compiler used was 'cc_r', which is the IBM compiler and not gcc.
If it is the case, you will need to compile your own version of perl with gcc or use the IBM compiler.

Hope it helps.
0
 

Author Comment

by:vw393
ID: 17000158
Thanks Julie! I wasn't aware about that.
I will give it a try and let you know.

Regs
L.
0
 

Author Comment

by:vw393
ID: 17001401
Yep! it worked!
I installed the binary version of gcc 3.3.2 from bullfreeware, downloaded compiled and installed perl 5.8.8, and finally I could compile and install also Compress::Zlib and all the rest.

Thanks again

L.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question