Bug 76334

Summary: mod/php4 broken with iconv
Product: Ports & Packages Reporter: Oleg Gawriloff <barzog>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Oleg Gawriloff 2005-01-17 09:20:28 UTC
Building lang/php4-extensions fails on iconv:
checking for libiconv in -liconv... yes
checking if iconv is Konstantin Chugeuv's... no
./configure.lineno: cannot create ext/iconv/php_have_bsd_iconv.h: directory nonexistent
===>  Script "configure" failed unexpectedly.
Please report the problem to ale@FreeBSD.org [maintainer] and attach the
"/usr/ports/converters/php4-iconv/work/php-4.3.10/ext/iconv/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. an `ls /var/db/pkg`).
*** Error code 1

Stop in /usr/ports/converters/php4-iconv.
*** Error code 1
config.log:
configure:3170: checking if iconv is Konstantin Chugeuv's
configure:3191: cc -o conftest -I/usr/local/include -O -pipe -march=pentiumpro
-L/usr/local/lib  conftest.c  >&5
/tmp/ccs9aWkE.o: In function `main':
/tmp/ccs9aWkE.o(.text+0xe): undefined reference to `iconv_ccs_init'
configure:3194: $? = 1
configure: failed program was:
#line 3173 "configure"
#include "confdefs.h"
#include <iconv.h>
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
iconv_ccs_init(NULL, NULL);
  ;
  return 0;
}
configure:3211: result: no

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_prog_cc_g=yes
ac_cv_env_LDFLAGS_set=
ac_cv_c_compiler_gnu=yes
ac_cv_exeext=
ac_cv_env_CFLAGS_set=set
lt_cv_sys_max_cmd_len=65536
ac_cv_env_CPPFLAGS_set=
ac_cv_env_host_alias_set=set
ac_cv_prog_CC=cc
ac_cv_env_build_alias_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_target_alias_set=set
ac_cv_host_alias=i386-portbld-freebsd4.10
ac_cv_env_CFLAGS_value='-O -pipe -march=pentiumpro'
ac_cv_env_CC_set=set
ac_cv_build_alias=i386-portbld-freebsd4.10
ac_cv_env_CPPFLAGS_value=
ac_cv_host=i386-portbld-freebsd4.10
ac_cv_env_host_alias_value=i386-portbld-freebsd4.10
ac_cv_lib_iconv___libiconv=yes
ac_cv_prog_AWK=nawk
ac_cv_build=i386-portbld-freebsd4.10
ac_cv_env_build_alias_value=i386-portbld-freebsd4.10
ac_cv_prog_cc_cc_c_o=yes
ac_cv_prog_RE2C='exit 0;'
ac_cv_env_target_alias_value=i386-portbld-freebsd4.10
ac_cv_env_CC_value=cc
php_cv_cc_dashr=yes
ac_cv_objext=o

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define HAVE_ICONV 1

configure: exit 2

How-To-Repeat: make install in lang/php4-extensions with iconv turned on
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-01-18 06:19:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer of lang/php4-extensions.
Comment 2 toomas.aas 2005-04-19 20:31:49 UTC
Hello!

I wonder if a solution to this problem was ever found. The same thing 
just happened to me. I'm planning to upgrade php4 from 4.3.8 to 4.3.11 
on my server and following my usual practice to minimize the web 
server's downtime I first 'make build' php4-cgi port and all individual 
extensions ports, then remove the old ports and 'make install' the new 
ports. This time I hit the problem when "make build"'ing php4-iconv port

# uname -a
FreeBSD mail.tarkvarastuudio.ee 4.11-RELEASE-p2 FreeBSD 4.11-RELEASE-p2 
#0: Wed Apr 13 20:31:21 EEST 2005 
toomas@mail.tarkvarastuudio.ee:/usr/obj/usr/src/sys/SIRVI  i386

# cat /usr/ports/converters/php4-iconv/work/php-4.3.11/ext/iconv/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.53.  Invocation command line was

   $ ./configure --with-iconv=/usr/local --with-iconv-dir=/usr/local 
--with-php-config=/usr/local/bin/php-config --prefix=/usr/local 
i386-portbld-freebsd4.11

## --------- ##
## Platform. ##
## --------- ##

hostname = mail.tarkvarastuudio.ee
uname -m = i386
uname -r = 4.11-RELEASE-p2
uname -s = FreeBSD
uname -v = FreeBSD 4.11-RELEASE-p2 #0: Wed Apr 13 20:31:21 EEST 2005 
  toomas@
mail.tarkvarastuudio.ee:/usr/obj/usr/src/sys/SIRVI

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/libexec/automake15
PATH: /usr/local/libexec/autoconf253
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/games
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/X11R6/bin
PATH: /root/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1189: checking build system type
configure:1207: result: i386-portbld-freebsd4.11
configure:1215: checking host system type
configure:1229: result: i386-portbld-freebsd4.11
configure:1282: checking for i386-portbld-freebsd4.11-gcc
configure:1308: result: cc
configure:1590: checking for C compiler version
configure:1593: cc --version </dev/null >&5
2.95.4
configure:1596: $? = 0
configure:1598: cc -v </dev/null >&5
Using builtin specs.
gcc version 2.95.4 20020320 [FreeBSD]
configure:1601: $? = 0
configure:1603: cc -V </dev/null >&5
cc: argument to `-V' is missing
configure:1606: $? = 1
configure:1632: checking for C compiler default output
configure:1635: cc -O -pipe    conftest.c  >&5
configure:1638: $? = 0
configure:1671: result: a.out
configure:1676: checking whether the C compiler works
configure:1682: ./a.out
configure:1685: $? = 0
configure:1700: result: yes
configure:1707: checking whether we are cross compiling
configure:1709: result: no
configure:1712: checking for suffix of executables
configure:1714: cc -o conftest -O -pipe    conftest.c  >&5
configure:1717: $? = 0
configure:1739: result:
configure:1745: checking for suffix of object files
configure:1769: cc -c -O -pipe   conftest.c >&5
configure:1772: $? = 0
configure:1791: result: o
configure:1795: checking whether we are using the GNU C compiler
configure:1822: cc -c -O -pipe   conftest.c >&5
configure:1825: $? = 0
configure:1828: test -s conftest.o
configure:1831: $? = 0
configure:1843: result: yes
configure:1849: checking whether cc accepts -g
configure:1873: cc -c -g  conftest.c >&5
configure:1876: $? = 0
configure:1879: test -s conftest.o
configure:1882: $? = 0
configure:1892: result: yes
configure:1919: cc -c -O -pipe   conftest.c >&5
conftest.c:2: syntax error before `me'
configure:1922: $? = 1
configure: failed program was:
#ifndef __cplusplus
   choke me
#endif
configure:2036: checking whether cc understands -c and -o together
configure:2066: cc -c conftest.c -o conftest.o >&5
configure:2069: $? = 0
configure:2071: cc -c conftest.c -o conftest.o >&5
configure:2074: $? = 0
configure:2113: result: yes
configure:2128: checking if compiler supports -R
configure:2155: cc -o conftest -O -pipe    conftest.c -R /usr/lib  >&5
configure:2158: $? = 0
configure:2161: test -s conftest
configure:2164: $? = 0
configure:2176: result: yes
configure:2275: checking for PHP prefix
configure:2277: result: /usr/local
configure:2279: checking for PHP includes
configure:2281: result: -I/usr/local/include/php 
-I/usr/local/include/php/main -
I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM
configure:2283: checking for PHP extension directory
configure:2285: result: /usr/local/lib/php/20020429
configure:2327: checking for re2c
configure:2354: result: exit 0;
configure:2366: checking for gawk
configure:2395: result: no
configure:2366: checking for mawk
configure:2395: result: no
configure:2366: checking for nawk
configure:2382: found /usr/bin/nawk
configure:2392: result: nawk
configure:2406: checking for iconv support
configure:2449: result: yes, shared
configure:2722: checking for libiconv in -liconv
configure:2755: cc -o conftest -O -pipe   -R/usr/local/lib 
-L/usr/local/lib  conftest.c -liconv   >&5
configure:2758: $? = 0
configure:2761: test -s conftest
configure:2764: $? = 0
configure:2775: result: yes
configure:3170: checking if iconv is Konstantin Chuguev's
configure:3191: cc -o conftest -I/usr/local/include -O -pipe 
-L/usr/local/lib conftest.c  >&5
/tmp/cc293Qm0.o: In function `main':
/tmp/cc293Qm0.o(.text+0xe): undefined reference to `iconv_ccs_init'
configure:3194: $? = 1
configure: failed program was:
#line 3173 "configure"
#include "confdefs.h"
#include <iconv.h>
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
      extern "C"
#  endif
    int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
iconv_ccs_init(NULL, NULL);
   ;
   return 0;
}
configure:3211: result: no

## ---------------- ##
## Cache variables. ##
## --------------q-- ##

ac_cv_prog_cc_g=yes
ac_cv_env_LDFLAGS_set=
ac_cv_c_compiler_gnu=yes
ac_cv_exeext=
ac_cv_env_CFLAGS_set=set
lt_cv_sys_max_cmd_len=65536
ac_cv_env_CPPFLAGS_set=
ac_cv_env_host_alias_set=set
ac_cv_prog_CC=cc
ac_cv_env_build_alias_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_target_alias_set=set
ac_cv_host_alias=i386-portbld-freebsd4.11
ac_cv_env_CFLAGS_value='-O -pipe '
ac_cv_env_CC_set=set
ac_cv_build_alias=i386-portbld-freebsd4.11
ac_cv_env_CPPFLAGS_value=
ac_cv_host=i386-portbld-freebsd4.11
ac_cv_env_host_alias_value=i386-portbld-freebsd4.11
ac_cv_lib_iconv___libiconv=yes
ac_cv_prog_AWK=nawk
ac_cv_build=i386-portbld-freebsd4.11
ac_cv_env_build_alias_value=i386-portbld-freebsd4.11
ac_cv_prog_cc_cc_c_o=yes
ac_cv_prog_RE2C='exit 0;'
ac_cv_env_target_alias_value=i386-portbld-freebsd4.11
ac_cv_env_CC_value=cc
php_cv_cc_dashr=yes
ac_cv_objext=o

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define HAVE_ICONV 1

configure: exit 2


# pkg_info

Mesa-3.4.2_2        A graphics library similar to SGI's OpenGL
XFree86-libraries-4.3.0_3 XFree86-4 libraries and headers
Xft-2.1_8           A client-sided font API for X applications
amanda-client-2.4.4_2,1 The Advanced Maryland Automatic Network Disk
amanda-server-2.4.4_4,1 The Advanced Maryland Automatic Network Disk
apache+mod_ssl-1.3.31+2.8.19 The Apache 1.3 webserver with SSL/TLS
apcupsd-3.10.13     A daemon for controlling APC UPS
autoconf-2.53_1     Automatically configure source code on many Un*x
autoconf-2.53_3     Automatically configure source code on many Un*x
autoconf-2.59_1     Automatically configure source code on many Un*x
autoconf213-2.13.000227_5 Automatically configure source code on many
automake-1.5,1      GNU Standards-compliant Makefile generator
automake-1.5_2,1    GNU Standards-compliant Makefile generator (version
automake14-1.4.5_9  GNU Standards-compliant Makefile generator (legacy
bison-1.75_2        A parser generator from FSF, (mostly) compatible
cclient-2004,1      Mark Crispin's C-client mail access routines
cvsup-without-gui-16.1g General network file distribution system
cyrus-imapd-2.0.17  The cyrus mail server, supporting POP3 and IMAP4
cyrus-sasl-1.5.28_3 RFC 2222 SASL (Simple Authentication and Security
db3-3.3.11,1        The Berkeley DB package, revision 3
expat-1.95.7        XML 1.0 parser written in C
fontconfig-2.2.2,1  An XML-based font configuration API for X Windows
freetype2-2.1.4_1   A free and portable TrueType font rendering engine
gd-2.0.25,1         A graphics library for fast creation of images
gettext-0.13.1_1    GNU gettext package
glib-2.4.0          Some useful routines of C programming (current
gmake-3.80_2        GNU version of 'make' utility
help2man-1.29       Automatically generating simple manual pages from
imake-4.3.0         Imake and other utilities from XFree86
jpeg-6b_1           IJG's jpeg compression utilities
lcms-1.10           Light Color Management System -- a color management
libgnugetopt-1.2    GNU getopt library
libiconv-1.8_2      A character set conversion library
libltdl-1.5.6       System independent dlopen wrapper
libmcrypt-2.5.7_1   Multi-cipher cryptographic library (used in PHP)
libmng-1.0.5        Multiple-image Network Graphics (MNG) reference
libslang-1.4.8      Routines for rapid alpha-numeric terminal
libtool-1.3.4_4     Generic shared library support script
libtool-1.3.5_1     Generic shared library support script
libtool-1.5.6       Generic shared library support script (version 1.5)
libungif-4.1.3      Tools and library routines for working with GIF
libxml2-2.6.19      XML parser library for GNOME
lynx-2.8.5          A non-graphical, text-based World-Wide Web client
m4-1.4_1            GNU m4
majordomo-1.94.5_1  A mailing list manager
mc-4.6.0_9          Midnight Commander, a free Norton Commander Clone
ming-0.2a_1         LGPL'ed Flash 4/5 movie output library with many
mm-1.3.0            Shared memory allocation library for pre-forked
mysql-client-3.23.56 Multithreaded SQL database (client)
mysql-client-4.0.12_2 Multithreaded SQL database (client)
mysql-server-4.0.12_1 Multithreaded SQL database (server)
netcat-1.10_1       Simple utility which reads and writes data across
p5-DBD-mysql-2.1026_1 MySQL driver for the Perl5 Database Interface
p5-DBI-1.35         The perl5 Database Interface.  Required for DBD::*
p5-Digest-MD5-2.30  Perl5 interface to the MD5 algorithm
p5-Net-Daemon-0.36  Perl5 extension for portable daemons
p5-Net-Z3950-SimpleServer-0.08 A Perl module for developing Z39.50
p5-PlRPC-0.2016     Perl module for writing RPC servers and clients
p5-Storable-2.06    Persistency for perl data structures
p5-Test-Harness-2.26 Run perl standard test scripts with statistics
p5-Test-Simple-0.47_1 Basic utilities for writing tests in perl
pcre-4.3            Perl Compatible Regular Expressions library
pdflib-6.0.0p1      A C library for dynamically generating PDF
pecl-pdflib-2.0.1   A PECL extension to create PDF on the fly
pecl-zip-1.0        A PECL extension to read zip files
perl-5.8.6_2        Practical Extraction and Report Language
php4-bz2-4.3.8_2    The bz2 shared extension for php
php4-cgi-4.3.8_1    PHP Common Gateway Interface
php4-ctype-4.3.8_1  The ctype shared extension for php
php4-gd-4.3.8_2     The gd shared extension for php
php4-gettext-4.3.8_2 The gettext shared extension for php
php4-iconv-4.3.8_1  The iconv shared extension for php
php4-imap-4.3.8_1   The imap shared extension for php
php4-mcrypt-4.3.8_1 The mcrypt shared extension for php
php4-mysql-4.3.8_1  The mysql shared extension for php
php4-openssl-4.3.8_2 The openssl shared extension for php
php4-overload-4.3.8_1 The overload shared extension for php
php4-pcre-4.3.8_1   The pcre shared extension for php
php4-pear-4.3.8_1   PEAR framework for PHP
php4-pgsql-4.3.8_1  The pgsql shared extension for php
php4-posix-4.3.8_1  The posix shared extension for php
php4-session-4.3.8_1 The session shared extension for php
php4-tokenizer-4.3.8_1 The tokenizer shared extension for php
php4-xml-4.3.8_1    The xml shared extension for php
php4-zlib-4.3.8_1   The zlib shared extension for php
phpMyAdmin-2.5.7.1_1 A set of PHP-scripts to administer MySQL over the 
pkgconfig-0.15.0    An utility used to retrieve information about
png-1.2.6           Library for manipulating PNG images
postfix-2.0.13,1    A secure alternative to widely-used Sendmail
postgresql-7.4.2    The most advanced open-source database available
postgresql-docs-7.4.2 The PostgreSQL documentation set
proj-4.4.5          Cartographic Projections library
python-2.2.2_2      An interpreted object-oriented programming language
rc_subr-1.16        Common startup and shutdown subroutines used by
samba-3.0.7,1       A free SMB and CIFS client and server for UNIX
scponly-3.9         A tiny shell that only permits scp and sftp
t1lib-5.0.1         A Type 1 Rasterizer Library for UNIX/X11
tcl-8.3.5_2         Tool Command Language
tk-8.3.5_1          Graphical toolkit for TCL
trafshow-3.1_2      Full screen visualization of network traffic
turck-mmcache-2.4.6 An opcode cache for PHP with encoder and loader
webalizer-2.1.10_4  A web server log file analysis program
xnview-1.50         An easy graphics viewer / converter
yaz-2.0.32          Z39.50/SR client and API library
zziplib-0.10.82     A library to provide transparent read access to
Comment 3 toomas.aas 2005-04-20 00:41:10 UTC
I figured out what I was doing wrong.

It seems, one should not attempt to build php4-whatever extension ports 
when older version of php4 port is still installed. Weird things can happen.

After I installed the new php4-cgi-4.3.11 port, the build of 
php4-iconv-4.3.11 went without any problems.

Sorry for the noise.
Comment 4 Alex Dupre freebsd_committer freebsd_triage 2005-04-20 10:34:21 UTC
State Changed
From-To: open->closed

Bogus.