PHP compiling error?

Vladimir A. Pavlov pv4 at bk.ru
Tue Sep 5 10:52:34 PDT 2006


On Monday 04 September 2006 22:32, tom wrote:
> In file included from
> /sources/php-5.1.4/ext/mbstring/oniguruma/regerror.c:37:
> /usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include/varargs.h:4:2: error:
> #error "GCC no longer implements <varargs.h>."
> /usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include/varargs.h:5:2: error:
> #error "Revise your code to use <stdarg.h>."
> ...
> Compiled it Like:
>
> sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' \
>     ext/dba/dba_db4.c &&
> ../configure --prefix=/usr \
>             --sysconfdir=/etc \
>             --with-apxs2 \
>             --enable-force-cgi-redirect \
>             --enable-discard-path \
>             --with-config-file-path=/etc \
>             --with-zlib \
>             --enable-bcmath \
>             --with-bz2 \
>             --enable-calendar \
>             --enable-dba \
>             --enable-exif \
>             --enable-ftp \
>             --with-gettext \
>             --enable-mbstring \
>             --with-ncurses \
>             --with-mysql \
>             --with-curl \
>             --with-readline

Firstly, it seems to be due to PHP source code incompatibility with the 
latest gcc versions. I think PHP developers would be happy to get this 
bug report.

Secondly, the error would disappear if you disable mbstring feature by 
using --disable-mbstring rather then --enable-mbstring.

Another solution is to install gcc-3.x and to try to compile PHP using 
it.

-- 
Nothing but perfection
pv



More information about the blfs-support mailing list