?
Solved

compile perl Compress::Zlib on AIX 5.3

Posted on 2006-06-28
3
Medium Priority
?
1,789 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
JulieBouillon earned 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

801 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