Re: PHP 4.3.1 on Mac OS X - make fails when configured with --with-pgsql
| From: | Barry C . Hawkins | Date: | Thu, 10 Apr 2003 22:13:29 +0000 |
| Subject: | Re: PHP 4.3.1 on Mac OS X - make fails when configured with --with-pgsql | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-10576@lists.php.net to get a copy of this message | ||
On Tuesday, Apr 8, 2003, at 16:52 US/Eastern, Barry C. Hawkins wrote:
Ray, Thanks again! I had forgotten about running "sudo make distclean". Using that, I was able to get a minimal install of PHP 4.3.1. The configure string that worked was: ./configure --with-zlib --with-zlib-dir=/usr/local --with-mysql=/usr/local/mysql --with-xml --with-apxs (make succeeded)... (sudo make install succeeded)... [pbg417:~/src/php-4.3.1] barryh% sudo make installWell, after removing and successfully reinstalling PostgreSQL 7.3.2, I have confirmed that the libpq.a error repeats itself, and after running the ranlib command, it is followed by the unrecognized symbols error(s). I configured PostgreSQL using the following configure string: ./configure --prefix=/usr/local/pgsql --enable-locale --enable-multibyte=UNICODE --with-openssl=/System/Library/OpenSSL --with-perl --with-java --enable-syslog --with-includes=/sw/include --with-libraries=/sw/lib PostgreSQL starts successfully, and I can create users and databases without issue. It seems like the OpenSSL libraries in use with /System/Library/OpenSSL are not compatible with what's required by PHP 4.3.1, but it's just conjecture on my part at this point. Does anyone have any feedback regarding the use of PHP with PostgreSQL support with OpenSSL enabled in PostgreSQL? In an attempt to isolate the issue, my next compromise will be to try PostgreSQL without OpenSSL support and see if that removes the issue. Regards, -- Barry C. Hawkins Systems Consultant All Things Computed 404-795-9147 voice/fax barry.hawkins@allthingscomputed.comInstalling PHP CLI binary: /usr/local/bin//bin/sh libtool --silent --mode=link gcc -g -O2 -prefer-non-pic -static ... Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/apache/sapi_apache.lo sapi/apache/mod_php4.lo sapi/apache/php_apache.lo main/internal_functions.lo -lmysqlclient -lz -lm -ldl -o libphp4.la Installing PHP SAPI module [activating module `php4' in /private/etc/httpd/httpd.conf] cp libs/libphp4.so /usr/libexec/httpd/libphp4.so chmod 755 /usr/libexec/httpd/libphp4.so cp /private/etc/httpd/httpd.conf /private/etc/httpd/httpd.conf.bak cp /private/etc/httpd/httpd.conf.new /private/etc/httpd/httpd.conf rm /private/etc/httpd/httpd.conf.newInstalling shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20020429/ Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar - installed: 0.9[PEAR] Console_Getopt - installed: 1.0[PEAR] PEAR - installed: 1.0b3 [PEAR] DB - installed: 1.3 [PEAR] HTTP - installed: 1.2 [PEAR] Mail - installed: 1.0.1 [PEAR] Net_SMTP - installed: 1.0 [PEAR] Net_Socket - installed: 1.0.1 [PEAR] XML_Parser - installed: 1.0 [PEAR] XML_RPC - installed: 1.0.4 Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/ Installing helper programs: /usr/local/bin/program: phpize program: php-config program: phpextdist I was able to prevent the previous error message I had posted by excluding PostgreSQL support. Including them in a subsequent attempt showed that pgsql is indeed the cause of that particular problem. (There have been numerous process-of-elimination exercises I won't bother to post) At this point, I believe I need to go back and redo my PostgreSQL install to see if there are some issues there. I configured with SSL support, and I noticed a fair number of the "undefined symbols" referring to SSL. For posterity, adding "--with-pgsql=/usr/local/pgsql" back in produced the following errors upon make: ld: Undefined symbols: _SSL_pending _BIO_free _BIO_new_mem_buf _DH_check _DH_generate_parameters _DH_size _ERR_get_error _ERR_reason_error_string _EVP_PKEY_free _PEM_read_DHparams _PEM_read_PrivateKey _PEM_read_X509 _PEM_read_bio_DHparams _SSL_CTX_ctrl _SSL_CTX_free _SSL_CTX_load_verify_locations _SSL_CTX_new _SSL_CTX_set_tmp_dh_callback _SSL_CTX_set_verify _SSL_CTX_set_verify_depth _SSL_connect _SSL_free _SSL_get_error _SSL_get_ex_data _SSL_get_peer_certificate _SSL_library_init _SSL_load_error_strings _SSL_new _SSL_read _SSL_set_ex_data _SSL_set_fd _SSL_shutdown _SSL_write _TLSv1_method _X509_NAME_get_text_by_NID _X509_NAME_oneline _X509_check_private_key _X509_free _X509_get_subject_name make: *** [libs/libphp4.bundle] Error 1 Pressing onward, On Tuesday, Apr 8, 2003, at 13:42 US/Eastern, Ray Aspeitia wrote:weird, have you tried activating the "--with-zlib" command along with your "--with-zlib-dir=/usr/local" make sure that when changing the configure command, you run : sudo make distclean to totally get rid of the "config.cache" file and all object files. Then run configure with your new commands. as a side note, configure outputs alot of info that might scroll past your terminal buffer, so I output that to a file for me to review. I just run the configure command as: ./configure [your options here] > my_configure_output.txt then wait for it to come back and review the file for errors and that my activated modules were actually detected by the configure script. if all is ok, then I run "make" If you still have errors might I suggest posting that info. Ray A. NOTE: I believe that the configure script has a --command to output a file with that info, but it works for me this way so... :-) At 1:09 PM -0400 4/8/03, Barry C. Hawkins wrote:Ray (and everyone),Ray, Thanks for the feedback. You know, I did enable some other things, but they were all packages that I had installed with fink. This was my most recent configure: ./configure --with-zlib-dir=/usr/local --with-jpeg-dir=/sw --with-png-dir=/sw --with-tiff-dir=/sw --with-gd --with-pgsql=/usr/local/pgsql --with-mysql=/usr/local/mysql --with-xml --with-dom=/sw --with-apxs The original configure string was this: ./configure --with-apxs --with-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql --with-xml --with-zlib-dir=/usr/local I downloaded the source and tried again using the original configure statement and then try to isolate the issue. The problem repeated itself citing the same error(s) upon make. I even configured with a few minimalist strings, including: ./configure --with-apxs --with-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql and ./configure --with-apxs --with-pgsql=/usr/local/pgsql and all show the same results. The string just above produced the following: ld: Undefined symbols: _uncompress _zlib_globals _SSL_pending _BIO_free _BIO_new_mem_buf _DH_check _DH_generate_parameters _DH_size _ERR_get_error _ERR_reason_error_string _EVP_PKEY_free _PEM_read_DHparams _PEM_read_PrivateKey _PEM_read_X509 _PEM_read_bio_DHparams _SSL_CTX_ctrl _SSL_CTX_free _SSL_CTX_load_verify_locations _SSL_CTX_new _SSL_CTX_set_tmp_dh_callback _SSL_CTX_set_verify _SSL_CTX_set_verify_depth _SSL_connect _SSL_free _SSL_get_error _SSL_get_ex_data _SSL_get_peer_certificate _SSL_library_init _SSL_load_error_strings _SSL_new _SSL_read _SSL_set_ex_data _SSL_set_fd _SSL_shutdown _SSL_write _TLSv1_method _X509_NAME_get_text_by_NID _X509_NAME_oneline _X509_check_private_key _X509_free _X509_get_subject_name make: *** [libs/libphp4.bundle] Error 1 It does seem to be a library issue, though. I am still coming up to speed on Unix and C-isms - recovery from Microsoft-based development is a hard road 8^). Regards, On Tuesday, Apr 8, 2003, at 08:54 US/Eastern, Ray Aspeitia wrote:Barry, what is your php configure string? it seems you might not have a required library for one of your activated options, or your path is wrong for that option. Ray A.Ray, After some delay, I was able to try your suggestion. I tried things a couple more times just to see if the problem was still there, and then ran the command you suggested: sudo ranlib /usr/local/pgsql/lib/libpq.a After doing that and attempting to recompile, I received a new type of error, which seems a little more alarming than the last one. Here is what I saw after compiling for just a short while: ld: Undefined symbols: _SSLv23_client_method _TLSv1_client_method _SSLv23_method _ERR_error_string_n _ERR_get_error _ERR_peek_error _SSL_CTX_free _SSL_CTX_new _SSL_connect _SSL_copy_session_id _SSL_free _SSL_get_error _SSL_new _SSL_pending _SSL_read _SSL_set_fd _SSL_shutdown _SSL_write _BIO_free _BIO_new_mem_buf _DH_check _DH_generate_parameters _DH_size _ERR_reason_error_string _EVP_PKEY_free _PEM_read_DHparams _PEM_read_PrivateKey _PEM_read_X509 _PEM_read_bio_DHparams _SSL_CTX_ctrl _SSL_CTX_load_verify_locations _SSL_CTX_set_tmp_dh_callback _SSL_CTX_set_verify _SSL_CTX_set_verify_depth _SSL_get_ex_data _SSL_get_peer_certificate _SSL_library_init _SSL_load_error_strings _SSL_set_ex_data _TLSv1_method _X509_NAME_get_text_by_NID _X509_NAME_oneline _X509_check_private_key _X509_free _X509_get_subject_name make: *** [libs/libphp4.bundle] Error 1 This doesn't look good. Anyone have suggestions? Regards, On Friday, Apr 4, 2003, at 11:11 US/Eastern, Barry C. Hawkins wrote:Ray, Thanks so much for the tip! I have to wait until tonight to try it, but I can't wait! I keep all my source on a FireWire drive at home b/c this PowerBook is short on drive space. Regards, On Friday, April 4, 2003, at 11:01 AM, Ray Aspeitia wrote:Barry, I'm running the same system and what I found was that you need to run the following command to update your compiler link table: sudo ranlib /usr/local/pgsql/lib/libpq.a try that command and recompile php. (ran under sudo because ranlib needs to be run by root) Ray A.Hello all, In an effort to stay off the superhighway of the general list, I have searched through the other lists and found this one. Searching the archives showed that some other people had the error I am having back in 1998 - 2001. Lucky me, bringing back the oldies. Anyway, I am running Mac OS 10.2.4 with PostgreSQL 7.3.2, Apache 1.3.27, and PHP 4.3.1. I went back and reconfigured the 4.3.1 source using the following: [powerbookg4:/Volumes/FR-HD75/php-4.3.1] barryh% ./configure --with-apxs --with-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql --with-xml >>>>> --with-zlib-dir=/usr/local Configure completes without error (and probably some buried warning), and upon running make I get the following: [powerbookg4:/Volumes/FR-HD75/php-4.3.1] barryh% make . . (vertical ellipsis to show success until...) . ld: table of contents for archive: /usr/local/pgsql/lib/libpq.a is out of date; rerun ranlib(1) (can't load from it) make: *** [libs/libphp4.bundle] Error 1 The old postings refer to running "ldconfig" and "ldconfig -v" and regrettably I have no idea what that is. I can tell you it's not a command in the 4.3.1 source directory 8^). I even reconfigured, compiled, and reinstalled PostgreSQL 7.3.2 to see if that would bring "libpq.a up to date" - no dice. To assure everyone, yes, /usr/local/pgsql is my valid install directory for PostgreSQL. Thanks in advance for any insight. Awaiting enlightenment, -- Barry C. Hawkins Systems Consultant All Things Computed 404-795-9147 voice/fax barry.hawkins@allthingscomputed.com