LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Unable to compile PHP 5.3.6 on Mac OS X 10.6.7

Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2011, 02:04 PM
bzerangue bzerangue is offline
Member
 
Join Date: Jun 2007
Posts: 23
Default Unable to compile PHP 5.3.6 on Mac OS X 10.6.7

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!!!
Reply With Quote
  #2  
Old 06-08-2011, 05:30 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
seems to be a php bug (http://bugs.php.net/bug.php?id=49332)

http://stackoverflow.com/questions/1...source-on-os-x

Quote:
For those who can't figure out where to add -lresolv

Edit the Makefile, find line:

EXTRA_LIBS = [...lots of libs here...]
and add -lresolv to this line like this:

EXTRA_LIBS = -lresolv [...lots of libs here...]
Reply With Quote
  #3  
Old 06-08-2011, 07:42 PM
bzerangue bzerangue is offline
Member
 
Join Date: Jun 2007
Posts: 23
Quote:
Originally Posted by webizen View Post
How do I edit the makefile for the Litespeed PHP compile? I'm compiling from the Litespeed admin.
Reply With Quote
  #4  
Old 06-08-2011, 07:49 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Follow this document to do it manually http://www.litespeedtech.com/support...wiki:php:lsapi

Modify Makefile in step 5. (before run make).
Reply With Quote
  #5  
Old 06-08-2011, 08:22 PM
bzerangue bzerangue is offline
Member
 
Join Date: Jun 2007
Posts: 23
Quote:
Originally Posted by webizen View Post
Follow this document to do it manually http://www.litespeedtech.com/support...wiki:php:lsapi

Modify Makefile in step 5. (before run make).
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
Reply With Quote
  #6  
Old 06-08-2011, 08:47 PM
bzerangue bzerangue is offline
Member
 
Join Date: Jun 2007
Posts: 23
Quote:
Originally Posted by webizen View Post
Follow this document to do it manually http://www.litespeedtech.com/support...wiki:php:lsapi

Modify Makefile in step 5. (before run make).
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)
Reply With Quote
  #7  
Old 06-08-2011, 09:59 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
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'.
Reply With Quote
  #8  
Old 06-14-2011, 04:04 PM
bzerangue bzerangue is offline
Member
 
Join Date: Jun 2007
Posts: 23
Quote:
Originally Posted by webizen View Post
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'.
Unfortunately, after exactly following your steps above to compile php, I get the very same error as above.
Reply With Quote
Reply

Tags
error 1, mac, mac os x, php compile

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:27 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.