Solved

compile perl Compress::Zlib on AIX 5.3

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

17 Experts available now in Live!

Get 1:1 Help Now