Operating System - HP-UX
1752786 Members
5721 Online
108789 Solutions
New Discussion юеВ

Re: Problems getting DSO mod_perl2 to install into apache2

 
SOLVED
Go to solution
Steve Post
Trusted Contributor

Re: Problems getting DSO mod_perl2 to install into apache2

Well? Kobylka,
That sed statement is a typo in the forum entry, but not in my script. But I considered using sed to change .so to .sl a huge hint I was really screwing things up anyway.

What got me was when you told me I made perl static. Of course I made it static! Is there any other way? Well...uh...YEAH! You are right. When I rebuilt perl it asked "do you wish to use Dynamic Loading?" This time I said YES.
"name of share library [default libperl.sl]. And I chose libperl.sl.

After I built perl-5.8.8 again, I tried to build mod_perl2 as a dyanmic shared object again.
Well this time it BUILT.
I can see an apache/modules/mod_perl.sl showed up.

Now there was one other thing I did.
When I built perl before I had -fPIC in the ccflags for gcc. This time I used -fpic.

Why did I make this change? It was merely a guess. But it looks like +Z ..or is it +z is to hpux-cc as -fPIC or is it -fpic is to gcc.

I need to go over this part again. You two guys would know of a site that gives an explanation of the gcc -fPIC vs -fpic would you?


Meanwhile......
I hope I didn't jinx myself. I just got it built. But that's not the same as using it. I'll start making an apache website that uses perl.

steve
Dennis Handly
Acclaimed Contributor
Solution

Re: Problems getting DSO mod_perl2 to install into apache2

>You two guys would know of a site that gives an explanation of the gcc -fPIC vs -fpic would you?

They should match what +Z vs +z does. Both PIC but +Z gives more linkage table entries.
kobylka
Valued Contributor

Re: Problems getting DSO mod_perl2 to install into apache2

Hello Steve!


> But it looks like +Z ..or is it +z is to hpux-cc as -fPIC or is it -fpic is to gcc.

Yes, they both generate pic code.
Here an explanation for -f options under gcc:

http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Code-Gen-Options.html#Code-Gen-Options

+z,+Z for HP C:

http://docs.hp.com/en/14672/Help/options.htm#option+capZ


Kind regards,

Kobylka
Steve Post
Trusted Contributor

Re: Problems getting DSO mod_perl2 to install into apache2

-fpic
Generate position-independent code (PIC) suitable for use in a shared library,...

-fPIC
If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table.

So -fpic generates code.
And -fPIC emits code.
I looked up emit. To eject. To discharge. To send out. To vent. To throw out. To give out.

One makes pies. The other one throws them at me?
I'll rerun this with -fPIC anyway because that is what I was using for years.

Thanks for the help both of you.


Dennis Handly
Acclaimed Contributor

Re: Problems getting DSO mod_perl2 to install into apache2

>I looked up emit.

They probably shouldn't use emit because it is so close to the pronunciation of omit.

>I'll rerun this with -fPIC

+Z generates more code than +z, so if you don't have a "large" executable or shlib, you should first try +z (-fpic) then go to +Z (-fPIC) when you get the linker error.