Solved

compile perl Compress::Zlib on AIX 5.3

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to determine file rename from EventLog ? 2 49
string initialization in java 11 113
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 524
JQuery serialize and unserialize 8 77
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 (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

816 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

8 Experts available now in Live!

Get 1:1 Help Now