[MacPorts] #19523: Mac OS X 10.5.6 libiconv, openssl errors when trying to build PHP 5.2.9

MacPorts noreply at macports.org
Mon Aug 3 20:23:41 PDT 2009


#19523: Mac OS X 10.5.6 libiconv, openssl errors when trying to build PHP 5.2.9
---------------------------------+------------------------------------------
 Reporter:  z3r0_f4ct0r@…        |       Owner:  macports-tickets@…                   
     Type:  defect               |      Status:  new                                  
 Priority:  Normal               |   Milestone:                                       
Component:  ports                |     Version:  1.7.1                                
 Keywords:  libiconv, openssl    |        Port:  libiconv, openssl                    
---------------------------------+------------------------------------------

Comment(by z3r0_f4ct0r@…):

 Have you tried the 64bit compile yet? I'm still having issues:

 I'm using the default apache 2 install and mysql x86_64 package from the
 mysql website with the following flags:
 {{{
 MACOSX_DEPLOYMENT_TARGET=10.5
 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp"
 CCFLAGS="-arch x86_64 -g -Os -pipe"
 CXXFLAGS="-arch x86_64 -g -Os -pipe"
 LDFLAGS="-arch x86_64 -bind_at_load"
 export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
 }}}
 The following extensions (universal x86_64):
 {{{
  curl @7.19.5_0+universal (active)
   expat @2.0.1_0+universal (active)
   freetds @0.82_0+darwin_9+universal (active)
   freetype @2.3.9_0+macosx+universal (active)
   gdbm @1.8.3_1+universal (active)
   gettext @0.17_4+universal (active)
   gperf @3.0.4_0+universal (active)
   jpeg @6b_3+universal (active)
   libevent @1.4.12_0+universal (active)
   libiconv @1.13_0+universal (active)
   libmcrypt @2.5.8_1+universal (active)
   libpng @1.2.38_0+universal (active)
   mcrypt @2.6.8_0+universal (active)
   memcached @1.2.8_0+universal (active)
   mhash @0.9.9.9_0+universal (active)
   ncurses @5.7_0+universal (active)
   ncursesw @5.7_0+universal (active)
   openssl @0.9.8k_0+universal (active)
   pkgconfig @0.23_1+universal (active)
   readline @6.0.000_1+universal (active)
   zlib @1.2.3_2+universal (active)
 }}}

 And I'm compiling PHP 5.3 from source like so:
 {{{
 './configure' \
 '--disable-all' \
 '--with-apxs2=/usr/sbin/apxs' \
 '--with-mysql=/usr/local/mysql' \
 '--with-mysqli=/usr/local/mysql/bin/mysql_config' \
 '--prefix=/usr/local/php' \
 '--with-config-file-path=/usr/local/php' \
 '--with-zlib' \
 '--with-gettext=/opt/local' \
 '--with-gdbm=/opt/local' \
 '--with-mcrypt=/opt/local' \
 '--with-curl=/opt/local' \
 '--with-openssl' \
 '--with-sqlite' \
 '--enable-sqlite-utf8' \
 '--enable-libxml' \
 '--enable-simplexml' \
 '--enable-xml' \
 '--enable-xmlreader' \
 '--enable-xmlwriter' \
 '--enable-dom' \
 '--with-pcre-regex' \
 '--enable-session' \
 '--enable-spl' \
 '--with-gd' \
 '--with-jpeg-dir=/opt/local' \
 '--with-png-dir=/opt/local' \
 '--with-freetype-dir=/opt/local' \
 '--enable-ctype' \
 '--with-iconv=/opt/local' \
 '--with-xsl' \
 '--with-pear' \
 '--enable-hash' \
 '--enable-json' \
 '--enable-mbstring' \
 '--enable-pdo' \
 '--with-pdo-sqlite' \
 '--enable-ftp' \
 '--with-pdo-dblib=/opt/local' \
 '--enable-shmop' \
 '--enable-pcntl' \
 '--enable-posix'
 }}}

 I'm getting the following error:
 {{{
 checking for mcrypt_module_open in -lmcrypt... yes
 checking for MSSQL support via FreeTDS... no
 checking for MySQL support... yes
 checking for specified location of the MySQL UNIX socket... no
 checking for MySQL UNIX socket location... no
 checking for mysql_close in -lmysqlclient... no
 checking for mysql_error in -lmysqlclient... no
 configure: error: mysql configure failed. Please check config.log for more
 information.
 }}}
 and in the config.log:
 {{{
 configure:58647: checking for mysql_close in -lmysqlclient
 configure:58666: gcc -o conftest -I/opt/local/include  -gstabs
 -fvisibility=hidden  -no-cpp-precomp -Wl,-rpath,/usr/loca
 l/mysql/lib -L/usr/local/mysql/lib -liconv -L/opt/local/lib
 -Wl,-rpath,/opt/local/lib -L/opt/local/lib conftest.c -lmys
 qlclient  -lmcrypt -lltdl -liconv -liconv -lintl -lfreetype -lpng -lz
 -ljpeg -lgdbm -lcurl -lz -lm  -lxml2 -lz -licucore
  -lm -lssl -lcrypto -lz -lcurl -lz -lxml2 -lz -licucore -lm -lssl -lcrypto
 -lz 1>&5
 ld warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of
 required architecture
 Undefined symbols:
   "_mysql_close", referenced from:
       _main in ccSbmdqu.o
 ld: symbol(s) not found
 collect2: ld returned 1 exit status
 configure: failed program was:
 #line 58655 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char mysql_close();

 int main() {
 mysql_close()
 ; return 0; }
 configure:58889: checking for mysql_error in -lmysqlclient
 configure:58908: gcc -o conftest -I/opt/local/include  -gstabs
 -fvisibility=hidden  -no-cpp-precomp -Wl,-rpath,/usr/loca
 l/mysql/lib -L/usr/local/mysql/lib -liconv -L/opt/local/lib
 -Wl,-rpath,/opt/local/lib -L/opt/local/lib -Wl,-rpath,/usr
 -L/usr conftest.c -lmysqlclient  -lz -lmcrypt -lltdl -liconv -liconv
 -lintl -lfreetype -lpng -lz -ljpeg -lgdbm -lcurl -l
 z -lm  -lxml2 -lz -licucore -lm -lssl -lcrypto -lz -lcurl -lz -lxml2 -lz
 -licucore -lm -lssl -lcrypto -lz 1>&5
 ld warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of
 required architecture
 Undefined symbols:
   "_mysql_error", referenced from:
       _main in cc1psKQp.o
 ld: symbol(s) not found
 collect2: ld returned 1 exit status
 configure: failed program was:
 #line 58897 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char mysql_error();

 int main() {
 mysql_error()
 ; return 0; }
 }}}

 I have the correct flags so I'm not sure what's going on.

 How would I configure PHP 5.3 in the MacPorts to use the extensions I need
 and compile 64 bit along with mysql and apache2?

 Thanks!

-- 
Ticket URL: <http://trac.macports.org/ticket/19523#comment:7>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list