I'm trying to compile my own version of php with a lot of options, but I can't get iconv to work. I read some reports on the internet about this problem but can't find a fix.
But I get this error every time when I try to "make":
Undefined symbols:
\\"_iconv_close\\", referenced from:
_php_iconv_string in iconv.o
__php_iconv_strlen in iconv.o
__php_iconv_strpos in iconv.o
__php_iconv_mime_decode in iconv.o
__php_iconv_mime_decode in iconv.o
__php_iconv_mime_decode in iconv.o
_zif_iconv_substr in iconv.o
_zif_iconv_substr in iconv.o
_php_iconv_stream_filter_dtor in iconv.o
_zif_iconv_mime_encode in iconv.o
_zif_iconv_mime_encode in iconv.o
\\"_iconv_open\\", referenced from:
_php_iconv_string in iconv.o
__php_iconv_strlen in iconv.o
__php_iconv_strpos in iconv.o
__php_iconv_mime_decode in iconv.o
__php_iconv_mime_decode in iconv.o
_zif_iconv_substr in iconv.o
_zif_iconv_substr in iconv.o
_zif_iconv_mime_encode in iconv.o
_zif_iconv_mime_encode in iconv.o
_php_iconv_stream_filter_factory_create in iconv.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
And when I use --without-iconv everything installs fine..
I hope somebody knows how to fix this
I'm a bit a loss here as I can't try this myself, haven't got the time for to try this now. I' still working on the Leopard compatibility list for the mailserver.
A last shot would be: try to compile iconv lib and php using the extra line before the configure statement as with all the tiger configures: CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk" \
Sjaq 16 Nov 2007
I tried that, didn't work either.
I have built php without iconv now, oh btw there are problems with pear too. So to get it to work on my system I had to disable pear and iconv.
Someone will come op with a fix sometime, I hope :)
I've used the MAMP instructions from the Switching blog on Tiger, with good success, so I thought I'd make some modifications for Leopard. I'm doing this with a clean install of Leopard on a secondary drive so I can afford to screw things up.
I was having the iconv problem until i moved the --with-iconv towards the top of the configure list. The compile went fine, but make test revealed several errors, some (most?) of which appear to be related to iconv, though not necessarily isolated to Leopard. make install worked fine.
I don't know if these are even serious errors, so I don't know if I'm going to make the move to Leopard with this build, or wait another month or two until people get these problems worked-out... I just can't afford to have a partially working dev box.
Richard, what are the FAIL results on your PHP make test? Mine are below.
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 44
Exts tested : 35
---------------------------------------------------------------------
Number of tests : 4616 3842
Tests skipped : 774 ( 16.8%) --------
Tests warned : 3 ( 0.1%) ( 0.1%)
Tests failed : 29 ( 0.6%) ( 0.8%)
Tests passed : 3810 ( 82.5%) ( 99.2%)
---------------------------------------------------------------------
Time taken : 308 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X) [tests/lang/bug30638.phpt]
Bug #38474 (getAttribute select attribute by order, even when prefixed) (OK to fail with libxml2 < 2.6.2x) [ext/dom/tests/bug38474.phpt]
Bug #42082 (NodeList length zero should be empty) [ext/dom/tests/bug42082.phpt]
mysqli thread_id & kill [ext/mysqli/tests/071.phpt]
Test array_fill() function : usage variations - unexpected values for 'start_key' argument [ext/standard/tests/array/array_fill_variation1.phpt]
Sort with SORT_LOCALE_STRING [ext/standard/tests/array/locale_sort.phpt]
Test gettype() & settype() functions : usage variations [ext/standard/tests/general_functions/gettype_settype_variation2.phpt]
Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument(Bug#42796) [ext/standard/tests/strings/chunk_split_variation2.phpt]
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15) [ext/standard/tests/strings/htmlentities02.phpt] (warn: possibly braindead libc)
htmlentities() test 4 (setlocale / ja_JP.EUC-JP) [ext/standard/tests/strings/htmlentities04.phpt] (warn: possibly braindead libc)
htmlentities() test 15 (setlocale / KOI8-R) [ext/standard/tests/strings/htmlentities15.phpt] (warn: possibly braindead libc)
Test htmlspecialchars_decode() function : usage variations - unexpected values for 'quote_style' argument [ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt]
Generic pack()/unpack() tests [ext/standard/tests/strings/pack.phpt]
Test setlocale() function : basic functionality - setting system locale to a specific [ext/standard/tests/strings/setlocale_basic1.phpt]
Test setlocale() function : basic functionality - set locale using an array [ext/standard/tests/strings/setlocale_basic2.phpt]
Test setlocale() function : basic functionality - passing multiple locales as argument [ext/standard/tests/strings/setlocale_basic3.phpt]
Test setlocale() function : usage variations - passing multiple valid/invlaid locales as argument [ext/standard/tests/strings/setlocale_variation1.phpt]
Test setlocale() function : usage variations - setting system locale = 0 [ext/standard/tests/strings/setlocale_variation3.phpt]
Test setlocale() function : usage variations - setting system locale as null [ext/standard/tests/strings/setlocale_variation4.phpt]
Test setlocale() function : usage variations - Setting system locale as empty string [ext/standard/tests/strings/setlocale_variation5.phpt]
Test sprintf() function : usage variations - hexa formats with float values [ext/standard/tests/strings/sprintf_variation35.phpt]
Test sprintf() function : usage variations - int formats with float values [ext/standard/tests/strings/sprintf_variation4.phpt]
Test sprintf() function : usage variations - unsigned formats with float values [ext/standard/tests/strings/sprintf_variation41.phpt]
Test strcspn() function : usage variations - unexpected values of start argument [ext/standard/tests/strings/strcspn_variation3.phpt]
Test strncasecmp() function : usage variations - unexpected values for 'len' [ext/standard/tests/strings/strncasecmp_variation5.phpt]
Test strncmp() function : usage variations - different lengths(all types) [ext/standard/tests/strings/strncmp_variation5.phpt]
Test strrpos() function : usage variations - unexpected inputs for 'offset' argument [ext/standard/tests/strings/strrpos_variation14.phpt]
Test strrpos() function : usage variations - unexpected inputs for 'haystack', 'needle' & 'offset' arguments [ext/standard/tests/strings/strrpos_variation15.phpt]
Test strspn() function : usage variations - unexpected values of start argument [ext/standard/tests/strings/strspn_variation3.phpt]
Test vsprintf() function : usage variations - unsigned formats with unsigned values [ext/standard/tests/strings/vsprintf_variation15.phpt]
Test vsprintf() function : usage variations - unsigned formats with signed and other types of values [ext/standard/tests/strings/vsprintf_variation16.phpt]
Test vsprintf() function : usage variations - int formats with non-integer values [ext/standard/tests/strings/vsprintf_variation4.phpt]
=====================================================================
Please let me know if this worked for you, or if the fix seems reasonable. Also, if you have any thoughts about the failures I'd appreciate it. I know enough about compiling to get by, but not enough to know whether or not errors and failed tests are serious.
lamcam, I haven't used iconv, the config statement in the documentation runs well on Leopard. There where if I remember correctly 2 failures on the test but they where minor. I will run it again this week and post the errors.
I've checked the errors and I have the same, but I don't see any problems in using this version of PHP using Wordpress, postfixadmin, phpmyadmin as PHP based applications. If you do a make test, please let the script send a bug report, it will help...
macxpert 31 Dec 2007
I'm not sure if my problem is related, but I'm hoping someone here can help as I've been fighting this for literally 2 months straight....
When I config and then make PHP on my system I get the following error:
Undefined symbols:
\"_EVP_CIPHER_CTX_block_size\", referenced from:
_zif_openssl_seal in openssl.o
\"_xmlTextReaderSchemaValidate\", referenced from:
_zim_xmlreader_setSchema in php_xmlreader.o
\"_xmlTextReaderSetup\", referenced from:
_zim_xmlreader_XML in php_xmlreader.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
Here is the config command I used (top two lines added based on replies in this thread, but to no avail):
so after messing with far too many internal components (openssl libs in particular) and pretty much killing my system, I installed a clean copy of Leopard on another drive and experienced none of these same 'symbol(s) not found' problems.
I think I'll start from scratch and reinstall everything instead of struggling with these odd problems now that I know a clean install works fine.
Sorry, missed your earlier post. Hope all stays right and working...
marianopeterson 19 Jan 2008
I had the same problems with iconv and openssl. I found the following syntax solved the problem (I installed iconv and openssl using macports to /opt/local):
13 Nov 2007
I'm trying to compile my own version of php with a lot of options, but I can't get iconv to work. I read some reports on the internet about this problem but can't find a fix.
my configurate command:
I've tested a few options
But I get this error every time when I try to "make":
And when I use
--without-iconveverything installs fine..I hope somebody knows how to fix this
13 Nov 2007
Did you install the http://www.gnu.org/software/libiconv/ iconv library ?
13 Nov 2007
Yes, tried it in two ways. Manually compiling and macports..
13 Nov 2007
If you look at the config.log file, is the iconv stuff properly recognized ?
It looks like the library isn't found during linking.
Do you know where the lib is installed? Did you specify the full path to the lib, like for instance '--with-iconv=/usr/local'
14 Nov 2007
There seems to be some error in my config.log file concerning iconv:
cut some #define stuff here
And yes I used a full path to my lib which is in /usr/local.. (tried: --with-iconv=/usr/local)
14 Nov 2007
I'm a bit a loss here as I can't try this myself, haven't got the time for to try this now. I' still working on the Leopard compatibility list for the mailserver.
A last shot would be: try to compile iconv lib and php using the extra line before the configure statement as with all the tiger configures: CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk" \
16 Nov 2007
I tried that, didn't work either.
I have built php without iconv now, oh btw there are problems with pear too. So to get it to work on my system I had to disable pear and iconv.
Someone will come op with a fix sometime, I hope :)
17 Nov 2007
Sorry, I don't use both. When I've got some time I will look into it. It's now on the TODO list!
02 Dec 2007
I've used the MAMP instructions from the Switching blog on Tiger, with good success, so I thought I'd make some modifications for Leopard. I'm doing this with a clean install of Leopard on a secondary drive so I can afford to screw things up.
I was having the iconv problem until i moved the
--with-iconvtowards the top of the configure list. The compile went fine, butmake testrevealed several errors, some (most?) of which appear to be related to iconv, though not necessarily isolated to Leopard.make installworked fine.I don't know if these are even serious errors, so I don't know if I'm going to make the move to Leopard with this build, or wait another month or two until people get these problems worked-out... I just can't afford to have a partially working dev box.
Richard, what are the FAIL results on your PHP make test? Mine are below.
Failed results on
make testPlease let me know if this worked for you, or if the fix seems reasonable. Also, if you have any thoughts about the failures I'd appreciate it. I know enough about compiling to get by, but not enough to know whether or not errors and failed tests are serious.
Thanks!!
~Cameron
02 Dec 2007
lamcam, I haven't used iconv, the config statement in the documentation runs well on Leopard. There where if I remember correctly 2 failures on the test but they where minor. I will run it again this week and post the errors.
09 Dec 2007
I've checked the errors and I have the same, but I don't see any problems in using this version of PHP using Wordpress, postfixadmin, phpmyadmin as PHP based applications. If you do a make test, please let the script send a bug report, it will help...
31 Dec 2007
I'm not sure if my problem is related, but I'm hoping someone here can help as I've been fighting this for literally 2 months straight....
When I config and then make PHP on my system I get the following error:
Here is the config command I used (top two lines added based on replies in this thread, but to no avail):
Help please!
01 Jan 2008
so after messing with far too many internal components (openssl libs in particular) and pretty much killing my system, I installed a clean copy of Leopard on another drive and experienced none of these same 'symbol(s) not found' problems.
I think I'll start from scratch and reinstall everything instead of struggling with these odd problems now that I know a clean install works fine.
02 Jan 2008
Sorry, missed your earlier post. Hope all stays right and working...
19 Jan 2008
I had the same problems with iconv and openssl. I found the following syntax solved the problem (I installed iconv and openssl using macports to /opt/local):
--with-iconv=shared,/opt/local \
--with-openssl=shared,/opt/local \
Good luck.