php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23291 Missing iconv when linking
Submitted: 2003-04-20 20:15 UTC Modified: 2003-04-29 10:20 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: hson at ludd dot luth dot se Assigned:
Status: No Feedback Package: ICONV related
PHP Version: 4.3.1 OS: Solaris8 i386
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hson at ludd dot luth dot se
New email:
PHP Version: OS:

 

 [2003-04-20 20:15 UTC] hson at ludd dot luth dot se
The Makefile is missing '-liconv' when linking, manually adding it to "EXTRA_LIBS" solves the linking problem, but there seems to be some kind of problem with the autoconf...
(The problem also exists in php4-STABLE-200304190130 )

This is my config.
Solaris8 i386 
Sun Forte 6 update1 (5.2) compiler
libiconv-1.8 installed with /usr/local as prefix
-----------------------------------------------------
setenv CC cc
setenv CXX CC
setenv CFLAGS "-xCC -xO3"
setenv CXXFLAGS "-xO3"
./configure --with-apxs --with-mysql=/usr/local/mysql \
--with-imap=../mail/uw-imap/imap-2001a --with-openssl \
--with-imap-ssl --with-gettext --with-xml --with-mcrypt \
--with-zlib --enable-calendar --with-mm --with-dom \
--with-dom-xslt --enable-mime-magic --with-iconv \
--enable-mbstring --enable-ftp
-----------------------------------------------------


Some lines from config.log
-----------------------------------------------------
configure:33590: checking for iconv support
configure:33641: checking for iconv
configure:34040: checking if iconv supports errno
configure:34076: cc -o conftest -xCC -xO3  -I$(top_builddir)/Zend -I/usr/local/s
sl/include -I/usr/local/include/libxml2 -I/usr/local/include  -D_POSIX_PTHREAD_S
EMANTICS -DSOLARIS2=280 -DMOD_SSL=208114 -DEAPI -DEAPI_MM -DUSE_EXPAT  -R/usr/uc
blib -L/usr/ucblib -R/usr/local/ssl/lib -L/usr/local/ssl/lib -R/usr/local/lib -L
/usr/local/lib conftest.c -lintl -lxsltbreakpoint -lxml2 -lxslt -lz -lz -lcrypt 
-lssl -lcrypto -lresolv -lm -ldl -lnsl -lsocket  -lcrypt -lxml2 -lz -lm -lsocket
 -lnsl 1>&5
"conftest.c", line 1: warning: 34045 is invalid in #line directive
"configure", line 34062: warning: improper pointer/integer combination: op "="
Undefined                       first referenced
 symbol                             in file
libiconv_open                       conftest.o
libiconv_close                      conftest.o
ld: fatal: Symbol referencing errors. No output written to conftest
-----------------------------------------------------


Last lines of output from 'make'
-----------------------------------------------------
/bin/bash libtool --silent --mode=link cc -export-dynamic -xCC -xO3  -avoid-version -module -L/usr/ucblib -L/usr/local/ssl/lib -L/usr/local/lib -L/home/hson/src/mail/uw-imap/imap-2001a/lib -L/usr/local/mysql/lib/mysql  -R /usr/ucblib -R /usr/local/ssl/lib -R /usr/local/lib -R /home/hson/src/mail/uw-imap/imap-2001a/lib -R /usr/local/mysql/lib/mysql ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/calendar/calendar.lo ext/calendar/dow.lo ext/calendar/french.lo ext/calendar/gregor.lo ext/calendar/jewish.lo ext/calendar/julian.lo ext/calendar/easter.lo ext/calendar/cal_unix.lo ext/ctype/ctype.lo ext/domxml/php_domxml.lo ext/ftp/php_ftp.lo ext/ftp/ftp.lo ext/gettext/gettext.lo ext/iconv/iconv.lo ext/imap/php_imap.lo ext/mbstring/mbfilter_ja.lo ext/mbstring/mbfilter_cn.lo ext/mbstring/mbfilter_tw.lo ext/mbstring/mbfilter_kr.lo ext/mbstring/mbfilter_ru.lo ext/mbstring/mbfilter.lo ext/mbstring/mbstring.lo ext/mbstring/mbregex.lo ext/mbstring/php_mbregex.lo ext/mbstring/html_entities.lo ext/mbstring/php_unicode.lo ext/mcrypt/mcrypt.lo ext/mime_magic/mime_magic.lo ext/mysql/php_mysql.lo ext/openssl/openssl.lo ext/overload/overload.lo ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo ext/tokenizer/tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/streams.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/memory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo 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_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypto -lssl -lc-client -lmm -lmysqlclient -lmcrypt -lltdl -lcrypt -lpam -lintl -lxsltbreakpoint -lxml2 -lxslt -lz -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl -lsocket -lcrypt -lxml2 -lz -lm -lsocket -lnsl  -o sapi/cli/php
Undefined                       first referenced
 symbol                             in file
libiconv                            ext/iconv/iconv.lo
libiconv_open                       ext/iconv/iconv.lo
libiconv_close                      ext/iconv/iconv.lo
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php'
hson@solpc-01 1:49  ~/src/mail/php-4.3/php-4.3.1 >
-----------------------------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-21 09:34 UTC] sniper@php.net
Try this configure line (with the latest STABLE CVS snapshot):

./configure --disable-all --disable-cgi --with-iconv

And if that does not work:

./configure --disable-all --disable-cgi --with-iconv=/usr/local


 [2003-04-23 16:49 UTC] hson at ludd dot luth dot se
(No I haven't tried the last stable yet)
The problem seems to be that Solaris already has a iconv library and when I installed a new one(1.8) the configure-script seems to find the new one (it has libiconv_open which the Solaris default doesn't).

So when I removed the new one it worked just fine.

But there still is a problem when configure finds one library but doesn't use it (adding -liconv)

Btw, my LD_LIBRARY_PATH is set to /usr/lib:/usr/local/lib
 [2003-04-24 03:02 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

IIRC, this should actually be fixed in it..

 [2003-04-29 10:20 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 14:01:30 2024 UTC