Solved

compile perl Compress::Zlib on AIX 5.3

Posted on 2006-06-28
3
1,738 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
while loop over for loop 7 92
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 187
Sed question 2 68
Not needed 13 92
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now