From:             [EMAIL PROTECTED]
Operating system: NetBSD/Alpha 1.5W-current
PHP version:      4.0.6
PHP Bug Type:     Sablotron XSL
Bug description:  configure fails on iconv_open

Sablot-0.60 (also 0.5x), PHP-4.0.7-dev

i tried 'configure' with and without --iconv-dir=/usr/pkg flag. in either case, i get 
the following error:

---cut---
configure:46596: checking for iconv_open in -lc
configure:46615: gcc -o conftest -DLIBICONV_PLUG  -DNETBSD -DEAPI -DUSE_EXPAT 
-I/usr/pkg/include
-Wl,-export-dynamic   -Wl,-R/usr/lib -L/usr/lib   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib   
-Wl,-R/usr/
local/lib -L/usr/local/lib   -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/pkg/lib 
-R/usr/pkg/lib
-L/usr/pkg/lib -R/usr/local/lib/mysql -L/usr/local/lib/mysql -R/usr/local/lib 
-L/usr/local/lib co
nftest.c -lc  -lexpat -lexpat -lsablot -lpq -lmysqlclient -lz -lgd -lttf -lz -lcrypt 
-lresolv -lm
 -lz -lpng -lm -lc -lpng -ljpeg -lttf -lintl -lXpm -lX11 -lresolv -lgcc 1>&5
/tmp/ccpa03fT.o: In function `main':
conftest.c(.text+0x18): undefined reference to `iconv_open'
conftest.c(.text+0x1c): undefined reference to `iconv_open'
collect2: ld returned 1 exit status
configure: failed program was:
#line 46604 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char iconv_open();

int main() {
iconv_open()
; return 0; }
---cut---

the type declared above doesn't match with libiconv's type for iconv_open (should be 
iconv_t instead of char). in addition, iconv_open is an alias function for 
libiconv_open and therefore will fail if "#include <iconv.h>" isn't included.

here is my env setup:

---cut---
rm config.cache 
export LIBS="-lz -lpng -lm -lc -lpng -ljpeg -lttf -lintl -lXpm -lX11" && \
export LDFLAGS="-Wl,-export-dynamic \
  -Wl,-R/usr/lib -L/usr/lib \
  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib \
  -Wl,-R/usr/local/lib -L/usr/local/lib \
  -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib"

./configure \
--with-apxs \
--disable-pear \
--with-gd=/usr/pkg \
--with-sablot=/usr/local \
--with-expat-dir=/usr/local \
--without-iconv \ <== tried w/ --with-iconv=/usr/local also
--with-pgsql=/usr/local \
--with-mysql=/usr/local \
--enable-libgcc \
--with-gnu-ld \
--with-zlib \
--with-system-regex \
--with-config-file-path=/usr/local/etc \
--enable-track-vars \
--enable-force-cgi-redirect \
--enable-discard-path \
--enable-memory-limit \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-ttf=/usr/pkg \
--enable-freetype-4bit-antialias-hack

---cut---

please note, according to the docs from Sablot, iconv support is optional. i think 
php's config needs to change to reflect the use of libiconv with Sablot 0.5X - 0.60.


-- 
Edit Bug report at: http://bugs.php.net/?id=11654&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to