ext/iconv/iconv.o: In function `_php_iconv_appendl': iconv.c:(.text+0x432): undefined reference to `iconv' iconv.c:(.text+0x548): undefined reference to `iconv' ext/iconv/iconv.o: In function `_php_iconv_strlen': iconv.c:(.text+0x1161): undefined reference to `iconv' ext/iconv/iconv.o: In function `zif_iconv_substr': iconv.c:(.text+0x1593): undefined reference to `iconv' ext/iconv/iconv.o: In function `zif_iconv_mime_encode': iconv.c:(.text+0x256c): undefined reference to `iconv' ext/iconv/iconv.o:iconv.c:(.text+0x259d): more undefined references to `iconv' follow collect2: ld returned 1 exit status gmake: *** [sapi/cli/php] Error 1 * ERROR: dev-lang/php-5.3.10 failed (compile phase): * emake failed The problem happens because we must to use libiconv on FreeBSD and ICONV_ALIASED_LIBICONV definition. But the definition is missing after configuration. And we have undefined reference to `iconv' because don't have it in libiconv implementation. nm -D /lib64/libiconv.so.2 | grep iconv 00000000002e40d0 D _libiconv_version 0000000000015960 T iconv_canonicalize 0000000000014e60 T libiconv 0000000000014e80 T libiconv_close 0000000000014600 T libiconv_open 0000000000014e90 T libiconv_open_into 0000000000016060 T libiconv_set_relocation_prefix 00000000000156c0 T libiconvctl 0000000000015830 T libiconvlist Reproducible: Always USE="-* cli iconv xml xmlrpc" emerge --info =php-5.3.10 Portage 2.1.10.49 (default/bsd/fbsd/amd64/9.0, gcc-4.5.3, freebsd-lib-9.0, 9.0-Gentoo amd64) ================================================================= System Settings ================================================================= System uname: FreeBSD-9.0-Gentoo-amd64-64bit-ELF Timestamp of tree: Mon, 02 Apr 2012 13:00:01 +0000 app-shells/bash: 4.2_p20 dev-lang/python: 2.7.2-r3, 3.1.4-r3, 3.2.2 dev-util/cmake: 2.8.6-r4 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.4 sys-devel/autoconf: 2.68 sys-devel/automake: 1.9.6-r3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.5-r2 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-freebsd/freebsd-lib: 9.0 (virtual/os-headers) Repositories: gentoo amd64-fbsd x-portage ACCEPT_KEYWORDS="amd64 amd64-fbsd ~amd64-fbsd" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-gentoo-freebsd9.0" CFLAGS="-O2 -pipe" CHOST="x86_64-gentoo-freebsd9.0" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs chflags distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/amd64-fbsd /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64-fbsd cli iconv java5 multilib xml xmlrpc" ELIBC="FreeBSD" KERNEL="FreeBSD" USERLAND="BSD" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= dev-lang/php-5.3.10 was built with the following: USE="cli fpm iconv (java5) (multilib) -apache2 -bcmath -berkdb -bzip2 -calendar -cdb -cgi -cjk -crypt -ctype -curl -curlwrappers -debug -doc -embed -enchant -exif -fileinfo -filter (-firebird) -flatfile (-frontbase) -ftp -gd -gdbm -gmp -hash -imap -inifile -intl -iodbc -ipv6 -json (-kerberos) -kolab -ldap -ldap-sasl -libedit -mhash (-mssql) -mysql -mysqli -mysqlnd -nls (-oci8-instant-client) -odbc -pcntl -pdo -phar -pic -posix -postgres (-qdbm) -readline -recode -session -sharedmem -simplexml (-snmp) -soap -sockets -spell -sqlite -sqlite3 -ssl -suhosin (-sybase-ct) -sysvipc -threads -tidy -tokenizer -truetype -unicode -wddx -xml -xmlreader -xmlrpc -xmlwriter -xpm -xsl -zip -zlib"
Created attachment 307505 [details, diff] patch to resolve the problem
*** This bug has been marked as a duplicate of bug 364139 ***