Operating System - HP-UX
1753907 Members
8944 Online
108810 Solutions
New Discussion юеВ

Re: CC and GCC +z Option ?????

 
Michael Gretton
Frequent Advisor

CC and GCC +z Option ?????

Hi:

I am have been working on a project that requires me to recompile perl for my HP-UX 11.00 environment (using an NClass). I am NOT a programmer and need a bit of help. I am told that I must compile perl using the +z option if I were to us e an ANSI C compiler. I do not have a comercial ansi c compiler such as softbench's. I do have GCC. What does the stupid +z do and what is the equiv for GCC where can I find out more about this. I hope I don't have to buy an ansi c compiler. Any Help would be appreciated.

Thanks

Mike
7 REPLIES 7
John Poff
Honored Contributor

Re: CC and GCC +z Option ?????

Hello,

I haven't compiled Perl with gcc before, but the make and configure scripts that come with Perl are very good. I suggest that you download the latest stable Perl source and run the configure script. It should detect that you are running gcc and setup the Perl makefile accordingly. If it runs into problems it will tell you, and you can investigate it from there.

JP
Michael Gretton
Frequent Advisor

Re: CC and GCC +z Option ?????

John:

Thanks for the advice but that I have done that. The stable perl that is out there is great and all but I need to specifically add the +z option so I am told. In summary, I need to get this perl built so that it works with Apache, DBI/DBD and mod_perl. I was specifically told that Perl has to built a certain way...including using this +z option. The problem is that the instructions I have on how to build perl for what I am doing only refers to cc.

Mike
John Poff
Honored Contributor

Re: CC and GCC +z Option ?????

Michael,

If you have Perl built using the gcc compiler, you are mostly done. The other pieces you mentioned (Apache, DBI, mod_perl) are compiled and installed separately from Perl. The DBI module is a separate Perl module that you download and install. The Apache piece will come in when you configure Apache. I believe there is a configure option for Apache to tell it to use Perl and mod_perl, but you'll have to dig into the Apache install docs for the exact syntax.

JP
Michael Gretton
Frequent Advisor

Re: CC and GCC +z Option ?????

John:

Understood. I have Apache working, I have DBI working and I am at the point where DBD is blowing up. When researching the DBD not compiling correctly, I found a README.hpux file that states that in order for DBD to work correctly, perl has to be compiled a certain way. I later find that my perl was not compiled the way they recomend. Now I am trying to do that. The recommendations only address using the commercial c compiler...not gcc. I am told to use a +z with cc and I don't know what that does or what its equiv is in the gcc world. I am trying to compile it now without using it but I suspect by dbd will still not work.
John Poff
Honored Contributor

Re: CC and GCC +z Option ?????

Michael,

Sorry for all the questions, but now I understand your problem much better. Which version of DBD are you using? Are you using a version for a specific database (DBD::Oracle)?

JP
Michael Gretton
Frequent Advisor

Re: CC and GCC +z Option ?????

John:

Hey no problem with all the questions. I appreciate you spending the time to help me. Being a non - programmer, my head feels like it is going to explode :) I am using DBD for Oracle - Correct. I believe 2.0 is the version ?? Or that might be the dbi version. Anyway, I got the latest. When I compile DBD and run a "make test" I get this first error (several follow as well but I only pasted this one):

PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.00503/PA-RISC1.1 -I/usr/local/lib/perl5/5.00503 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/base............../usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
FAILED tests 4-5
Santosh Nair_1
Honored Contributor

Re: CC and GCC +z Option ?????

I believe the corresponding option for
gcc would be -fpic. This option, like
the +z option for the ansi C compiler,
produces position independent code
that is required to produce shared
objects. Hope this helps.
Life is what's happening while you're busy making other plans