Unable to compile PHP 5.3.6 on Mac OS X 10.6.7

Discussion in 'Install/Configuration' started by bzerangue, Jun 8, 2011.

  1. bzerangue

    bzerangue New Member

    Hello. I'm in desperate need of some help. My production environment, I'm running Litespeed, so I would like to mirror that in my development environment.

    My development environment is Mac OS X 10.6.7. I'm able to install and run Litespeed. I'm even able to access the Litespeed admin. While I'm in the Litespeed admin, I'm using the compile PHP feature.

    I can get to the point where I'm compiling the PHP, but then I always run into this error during the MAKE process and it fails to compile the PHP.

    Here's my MAIN STATUS message...

    Code:
    **MAIN_STATUS** retrieved from /usr/local/lsws/phpbuild/buildphp_1307565858.7.progress
    Start building PHP 5.3.6 with LSAPI
    Configuring PHP build (2-3 minutes)
    Compiling PHP (5-10 minutes)
    **ERROR** Could not compile PHP
    Here's the log where the ERROR happens.

    Code:
    sapi/litespeed/lsapi_main.o sapi/litespeed/lsapilib.o main/internal_functions.o  -lz -lexslt -liconv -liconv -lpng -lz -ljpeg -lcurl -lz -lm -lxml2 -lz -licucore -lm -lcurl -lxml2 -lz -licucore -lm -lmysqlclient -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxslt -lxml2 -lz -licucore -lm  -o sapi/litespeed/php
    Undefined symbols:
      "_res_9_dn_expand", referenced from:
          _php_parserr in dns.o
          _php_parserr in dns.o
          _php_parserr in dns.o
          _php_parserr in dns.o
          _php_parserr in dns.o
          _php_parserr in dns.o
          _php_parserr in dns.o
          _zif_dns_get_mx in dns.o
      "_res_9_search", referenced from:
          _zif_dns_check_record in dns.o
          _zif_dns_get_mx in dns.o
          _zif_dns_get_record in dns.o
      "_res_9_init", referenced from:
          _zif_dns_check_record in dns.o
          _zif_dns_get_mx in dns.o
          _zif_dns_get_record in dns.o
      "_res_9_dn_skipname", referenced from:
          _zif_dns_get_mx in dns.o
          _zif_dns_get_mx in dns.o
          _zif_dns_get_record in dns.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [sapi/litespeed/php] Error 1
    **ERROR** Could not compile PHP
    Any help would be much appreciated!!!
  2. webizen

    webizen New Member

  3. bzerangue

    bzerangue New Member

  4. webizen

    webizen New Member

  5. bzerangue

    bzerangue New Member

    Which Makefile do I edit? I'm in the PHP source folder. I followed all the steps before running make.

    I have the following Makefiles in my PHP source folder

    Makefile.frag
    Makefile.fragments
    Makefile.gcov
    Makefile.global
    Makefile.objects
  6. bzerangue

    bzerangue New Member

    Is there anyway to add this process to the GUI compile of PHP? I'm not able to get as far the GUI compiler does...

    after running my configure manually, I get the following error...

    configure: WARNING: lemon versions supported for regeneration of libsqlite parsers: 1.0 (found: none).
    checking for char *... yes
    checking size of char *... configure: error: cannot compute sizeof (char *)
    See `config.log' for more details.

    Then, I can't run make because of this error... (plus I don't know what Makefile to edit)
  7. webizen

    webizen New Member

    Since configure failed, Makefile was not generated.

    To use GUI compile, do the followings:

    1. go through GUI compile to the last step (prior to run '/usr/local/lsws/phpbuild/buildphp_manual_run.sh')

    2. check the /usr/local/lsws/phpbuild/buildphp_manual_run.sh script, look for something that it tries to run, such as '/usr/local/lsws/phpbuild/buildphp_1307577524.x.install.sh 1> /usr/local/lsws/phpbuild/buildphp_1307577524.x.log 2>&1'.

    3. edit script /usr/local/lsws/phpbuild/buildphp_1307577524.x.install.sh: insert "EXTRA_LIBS=-lresolv" prior to "./configure '--prefix=/usr/local/lsws/lsphp5' ... ". make it look like "EXTRA_LIBS=-lresolv ./configure '--prefix=/usr/local/lsws/lsphp5' ..."

    4. run '/usr/local/lsws/phpbuild/buildphp_manual_run.sh'.
  8. bzerangue

    bzerangue New Member

    Unfortunately, after exactly following your steps above to compile php, I get the very same error as above.

Share This Page