PHP 5 compile .. always errors out !

Discussion in 'PHP' started by ashagg, Apr 30, 2008.

  1. ashagg

    ashagg New Member

    Hi there,

    I'm trying to compile php 5.2.5 via the web-interface.

    --with-mysqli --with-mysql=/usr --with-zlib --with-gd --with-jpeg-dir --with-png-dir --enable-shmop --with-gettext --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring

    Seems it ALWAYS errors out with an libiconv warning .. I can compile php4 quite easily.

    Here is the tail of the build log :

    Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/litespeed/lsapi_main.lo sapi/litespeed/lsapilib.lo main/internal_functions.lo -lcrypt -lcrypt -lrt -lmysqlclient -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lmysqlclient -lz -lcrypt -lnsl -lm -lnss_files -lnss_dns -lresolv -lnss_files -lnss_dns -lresolv -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -o sapi/litespeed/php
    ext/gd/libgd/gdkanji.o(.text+0x5c): In function `do_convert':
    /opt/lsws/phpbuild/php-5.2.5/ext/gd/libgd/gdkanji.c:350: undefined reference to `libiconv_open'
    ext/gd/libgd/gdkanji.o(.text+0x9c):/opt/lsws/phpbuild/php-5.2.5/ext/gd/libgd/gdkanji.c:365: undefined reference to `libiconv'
    ext/gd/libgd/gdkanji.o(.text+0xab):/opt/lsws/phpbuild/php-5.2.5/ext/gd/libgd/gdkanji.c:381: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x185): In function `_php_iconv_appendl':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:348: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x249):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:385: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x2e0): In function `php_iconv_string':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:441: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x318):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:453: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x339):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:467: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x35c):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:478: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x3ad): In function `_php_iconv_strlen':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:603: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x408):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:626: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x432):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:660: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x4ae): In function `_php_iconv_strpos':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:851: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x510):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:879: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x5a0):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:993: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x751): In function `_php_iconv_mime_decode':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1354: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x7fd):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1823: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x811):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1826: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0xabb):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1465: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0xacd):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1468: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x11c3): In function `zif_iconv_substr':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:723: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x1263):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:747: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x12aa):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:802: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x12bf):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:806: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x12f6):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:755: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x1844): In function `zif_iconv_mime_encode':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1043: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x1862):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1057: undefined reference to `libiconv_open'
    ext/iconv/iconv.o(.text+0x1a9d):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1316: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x1ab7):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1319: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x1c45):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1128: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x1c77):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1160: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x1ca2):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1176: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x1f48):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1228: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x1f74):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1259: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x21b7):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:1303: more undefined references to `libiconv' follow
    ext/iconv/iconv.o(.text+0x2df0): In function `php_iconv_stream_filter_dtor':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:2465: undefined reference to `libiconv_close'
    ext/iconv/iconv.o(.text+0x2f1e): In function `php_iconv_stream_filter_append_bucket':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:2615: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x2f60):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:2615: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x2fe7):/opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:2537: undefined reference to `libiconv'
    ext/iconv/iconv.o(.text+0x3305): In function `php_iconv_stream_filter_factory_create':
    /opt/lsws/phpbuild/php-5.2.5/ext/iconv/iconv.c:2491: undefined reference to `libiconv_open'
    collect2: ld returned 1 exit status
    make: *** [sapi/litespeed/php] Error 1

    Please advice.
  2. mistwang

    mistwang LiteSpeed Staff

    Maybe something with the libiconv installation on your server, reinstall it.
  3. ashagg

    ashagg New Member

    hmm..

    I found /opt/lsws/phpbuild/libiconv-1.12.tar.gz .. extracted ... ./configure, make, make install .. all well ...

    Tried compiling php5 again .. same results ....

    Can you direct me to if I'm doing something wrong ?
  4. mistwang

    mistwang LiteSpeed Staff

    have no clue, you can try build php manually from /opt/lsws/phpbuild/php-5.2.5/,
    the code has been patched with LiteSpeed SAPI.
  5. mohdanas

    mohdanas New Member

    Hi All,

    I was also facing the same problem, googled on it a lot and finally got the result.
    You have to just install the glibc-devel rpm if it is not already installed.

    If it is, then just reinstall it forcefully. "rpm -Uvh --nodeps --force glibc-devel"

    For more info on Linux specially on Ubuntu please visit:
    http://www.linuxtrove.com

Share This Page