Welcome to MacTalk Australia

the largest Australian community for Apple discussions and topics

Join the discussions, Register Now!
Results 1 to 10 of 10
  1. #1

    Default

    I'm trying to compile Apache 2 on my Mac OS X system, and I get the following error running "make" after I've run "./configure"


    Code:
    /Users/decryption/httpd-2.0.49/srclib/pcre/.libs/libpcre.al(pcreposix.lo) definition of _regcomp in section (__TEXT,__text)
    /usr/lib/libpthread.dylib(regcomp.So) definition of _regcomp
    ld: warning multiple definitions of symbol _regexec
    /Users/decryption/httpd-2.0.49/srclib/pcre/.libs/libpcre.al(pcreposix.lo) definition of _regexec in section (__TEXT,__text)
    /usr/lib/libpthread.dylib(regexec.So) definition of _regexec
    ld: warning multiple definitions of symbol _regfree
    /Users/decryption/httpd-2.0.49/srclib/pcre/.libs/libpcre.al(pcreposix.lo) definition of _regfree in section (__TEXT,__text)
    /usr/lib/libpthread.dylib(regfree.So) definition of _regfree
    I have no idea what's going on, can someone help?

  2. #2

    Join Date
    Mar 2004
    Location
    adelaide.sa.au
    Posts
    264

    Default

    What options did you specify for ./configure?

  3. #3

    Default

    Code:
    ./configure --enable-mods-shared=ALL

  4. #4

    Join Date
    Mar 2004
    Location
    adelaide.sa.au
    Posts
    264

    Default

    This is my configuration (not fully optimised yet - my PHP and MySQL configurations are tightly tuned but I haven't as yet for Apache):
    Code:
    ./configure \
    --prefix=/usr/local/apache \
    --disable-status \
    --disable-asis \
    --disable-cgi \
    --disable-negotiation \
    --disable-imap \
    --disable-actions \
    --disable-userdir \
    --disable-cgid \
    --enable-expires \
    --enable-headers \
    --enable-static-support \
    --enable-http \
    --enable-info \
    --enable-module=php4
    For optimum compiled code I set the following variables for gcc:
    Code:
    CC=gcc \
    CXX=gcc \
    CFLAGS="-O3 -fno-omit-frame-pointer" \
    CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"

  5. #5

    Default

    Thanks DVD Plaza, I'll try those settings.
    Do you know why that error was happening in the first place?

  6. #6

    Join Date
    Mar 2004
    Location
    adelaide.sa.au
    Posts
    264

    Default

    I'm guessing either compiler compatibility (in which case the gcc variables I listed will fix you up) or one of the modules you included (you included everything) is not compatible with OSX?

  7. #7

    Join Date
    Mar 2004
    Location
    adelaide.sa.au
    Posts
    264

    Default

    Could also be a third option - could be a conflict with Apple's Apache setup (you'll note my configuration specifically steers clear of Apple's setup so that any OSX updates don't cause havoc)...

  8. #8

    Default

    I can't remember where I found it but you can get apache 2 as an installable package, no compiling, no messing around, double click, bam there it is, also added a pref pane to turn it on and off, you might want to google for it rather than jump through all these hopes, unless it's more of an exercise in using the command line.
    2.5 GHz 15" MacBook Pro, 27" iMac, G4 Cube, 2 x Colour Classic, 840AV, iPhone, iPad

  9. #9

    Default

    Originally posted by Gothikon@May 4 2004, 07:50 AM
    I can't remember where I found it but you can get apache 2 as an installable package, no compiling, no messing around, double click, bam there it is, also added a pref pane to turn it on and off, you might want to google for it rather than jump through all these hopes, unless it's more of an exercise in using the command line.
    Yeah, I found it here: http://www.serverlogistics.com/apache2.php
    They also have a PHP and a SQL package that's easy to install too

  10. #10

    Join Date
    Mar 2004
    Location
    adelaide.sa.au
    Posts
    264

    Default

    Originally posted by Gothikon@May 4 2004, 07:50 AM
    I can't remember where I found it but you can get apache 2 as an installable package, no compiling, no messing around, double click, bam there it is, also added a pref pane to turn it on and off, you might want to google for it rather than jump through all these hopes, unless it's more of an exercise in using the command line.
    Whats hard about compiling it yourself? Once you've sussed out precisely how you want it setup you simply do the same thing each time, maybe 20 seconds work and a few minutes waiting (for compiling & installing).

    There's major reasons why you do it yourself. For one you upgrade to the latest fixes (including security fixes) as soon as they're available, not just when someone else decides (eg Apple/Server Logistics). You compile in only strictly what you require (performance and security advantage). You compile in the latest of not only the product in question, but any associated libraries (eg if you simply grab a pre-compiled PHP for instance good luck with it - it is a gamble what version of the MySQL libraries are compiled into it, and there's little chance it will be for the same version of MySQL you have installed - for stability/performance reasons PHP should always be compiled against the MySQL installed on your system). You can obviously make your own changes/fixes to the source code before compiling. You can tailor the entire setup, including where it runs from (extremely important as you don't want it overlapping Apple at all - otherwise the second an Apple update does any updating to their Apache setup it will damage yours). The compiled code is tuned to your precise setup - eg the exact versions and setup of all the squillions of libraries in your BSD core that the product in question relies on. etc.

    For general home use there's nothing wrong with what's already installed by Apple, so for anything you'd do it yourself - grabbing a pre-compiled source is simply changing the vendor you are relying on, nothing more. Personally in that case I'd rather rely on Apple.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •