Bug #60268 [Opn->Csd]: Compiling PHP fails

From: Date: Wed, 30 Nov 2011 20:46:08 +0000
Subject: Bug #60268 [Opn->Csd]: Compiling PHP fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-165595@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60268&edit=1

 ID:                 60268
 User updated by:    rich06 at gmail dot com
 Reported by:        rich06 at gmail dot com
 Summary:            Compiling PHP fails
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Compile Failure
 Operating System:   Mac OS X 10.7.2 (Lion)
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

I finally resolved this by editing the Makefile as follows so that the first -L/usr/lib is changed
to -L/opt/local/lib (I am using Macports)

MH_BUNDLE_FLAGS = -bundle -bundle_loader /usr/local/apache2/bin/httpd -L/opt/local/lib -laprutil-1
-lldap -llber -llber -lexpat -liconv -L/usr/lib -lpq -lsqlite3 -lldap -llber -llber -L/usr/lib
-lapr-1 -lpthread 

Hope this helps someone else.


Previous Comments:
------------------------------------------------------------------------
[2011-11-30 13:26:11] rich06 at gmail dot com

Bump... anyone? This is really screwing me as the version of PHP supplied by Apple won't run
background CLI scripts and is missing some extensions I need to have

------------------------------------------------------------------------
[2011-11-11 17:08:43] rich06 at gmail dot com

Forgot to mention that I did try all the suggestions such as moving MH_BUNDLE_FLAGS in the Makefile
and editing iconv.c using different iconv libs (MacPorts) -- nothing worked...

------------------------------------------------------------------------
[2011-11-11 15:47:55] rich06 at gmail dot com

Description:
------------
Compiling PHP v.5.3.8 fails on Mac OS X 10.7.2 (Lion) -- linker errors are generated relating to
iconv

Test script:
---------------
./configure  --prefix=/usr/local --mandir=/usr/share/man --infodir=/usr/share/info
--with-apxs2=/usr/local/apache2/bin/apxs --enable-cli --with-zlib-dir=/usr --enable-exif
--enable-ftp --enable-mbstring --enable-mbregex --enable-sockets --with-curl=/usr
--with-config-file-path=/etc --sysconfdir=/etc --with-mysql-sock=/tmp --with-mysql=/usr/local/mysql
--with-xmlrpc --with-xsl=/usr --without-pear --with-libxml-dir=/usr --with-zlib --with-sqlite
--with-gd --with-pdo-mysql=/usr/local/mysql --with-jpeg-dir=/opt/local --with-png-dir=/usr/X11R6
--with-iconv-dir=/opt/local --enable-pcntl --enable-soap --enable-wddx --enable-zip

make clean
make

Expected result:
----------------
make passes

Actual result:
--------------
Undefined symbols for architecture x86_64:
  "_libiconv_open", referenced from:
      _do_convert in gdkanji.o
      _convert in encodings.o
  "_libiconv", referenced from:
      _do_convert in gdkanji.o
      _convert in encodings.o
  "_libiconv_close", referenced from:
      _do_convert in gdkanji.o
      _convert in encodings.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60268&edit=1


Thread (15 messages)

« previous php.bugs (#165595) next »