views:

1132

answers:

6

My attempts to install modperl under the default vanilla Leopard Apache 2 have failed and all I can find online are variations on this:

I would like if possible not to rely on MacPorts or Fink, though if they can be made to work with the default Apache 2 install that would probably be ok.

(The best answer is the one that I've supplied and which is languishing at the bottom, ie. export ARCHFLAGS="-arch x86_64" - hopefully someone with enough reputation will mod it up)

+2  A: 

Macports has it (think apt-get and the likes on linux, but on OS X)

(you can see it listed here)

Haven't installed myself though....

Pieter
But would that work with the default Apache 2 installation? Surely this would install the MacPorts version of Apache first as a dependency? And Perl too in all likelihood from what I remember of previous dalliances…
solidgoldpig
This does not require the default Apache installation. MacPorts will create its own copy that it can modify as you add/remove packages.
Nerdling
+1  A: 

Why not just give up and build/install your own or port versions of perl, apache2, and mod_perl2? Probably easier than fighting with it. (Worked for me.)


(as per comment)
Mmmkay! Sorry, I didn't intend that to be snarky or imply that it's not a valid question. I guess I'll delete this (if I can.) Would it be useful to edit the question to add your rational rationale for not having a separate installation?

F5
Because it's not my machine. Because it has a whole load of stuff already set up and running under the default Apache. Because it's a valid question in any case. In the past. for my own purposes, I have always ignored the default install. But this time I can't. Mmmkay?
solidgoldpig
A: 

I asked a very similar question a few days ago and got some good answers: "How do I use a vendor Apache with a self-compiled Perl and mod_perl?"

Chris Dolan
A: 

The mc ports install of mod_perl tries to install apache 1.3 even if you specify just the mod perl, so thats not a good option.

mod_perl2 is available in MacPorts for Apache 2
Nerdling
A: 

Try this: http://www.unibia.com/unibianet/node/32

This is a good solution but not for my question since it requires installing a new version of Apache.
solidgoldpig
A: 

Get the latest mod_perl and set the following var:

export ARCHFLAGS="-arch x86_64"

Compile/install as usual.

Taken from this post, "Building mod_perl2 on Leopard" which also links to further details on how to get Apache2::Request (libapreq) working as well.

-

(Not that I've been able to test it since I'm personally back on Tiger running Apache 1.3!)

(And let's see if stackoverflow manages to lift this answer to the top since it is the only "correct" answer)

solidgoldpig
the x86_64 architecture will not work on PPC systems that run Leopard.ppc and i386 are the preferred build types in MacPorts presently.
Nerdling