FAQ
Maybe a bug? with ext/* I wonder if it is internal, or something borrowed.

The hardpart is to get a compiler old enough to not have stdint.h I suppose,
but when that is the case the build fails and/or configure misses it.

from /data/prj/php-5.2.14

# grep -n HAVE_STDINT_H */*/*/*.h
ext/date/lib/timelib_structs.h:32:#elif defined(HAVE_STDINT_H)
ext/pcre/pcrelib/config.h:108:#ifndef HAVE_STDINT_H
ext/pcre/pcrelib/config.h:109:#define HAVE_STDINT_H 1
ext/pcre/pcrelib/pcre_internal.h:197:#elif HAVE_STDINT_H

# ls -l ext/pcre/pcrelib/config.h
-rw-r--r-- 1 1005 1005 11704 Mar 29 2010
ext/pcre/pcrelib/config.h

From the date I conclude configure has nothing to do with this, from the
line numbers I wonder why they say
#ifndef SOME_VARIABLE
#define SOME_VARIABLE 1

There are consequences! pcre_internal.h believes this! So, my question is:
whose error is it? PHP, or somewhere external?

make returns:

# make
/bin/sh /data/prj/php-5.2.14/libtool --silent --preserve-dup-deps
--mode=compile gcc -I/data/prj/php-5.2.14/ext/pcre/pcrelib -Iext/pcre/
-I/data/prj/php-5.2.14/ext/pcre/ -DPHP_ATOM_INC
-I/data/prj/php-5.2.14/include -I/data/prj/php-5.2.14/main
-I/data/prj/php-5.2.14 -I/data/prj/php-5.2.14/ext/date/lib
-I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/local/include/freetype2 -I/usr/local/mysql/include
-I/data/prj/php-5.2.14/TSRM -I/data/prj/php-5.2.14/Zend -I/usr/include
-L/usr/local/ssl/lib -L/usr/local/mysql/lib -L/usr/local/lib -c
/data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c -o
ext/pcre/pcrelib/pcre_chartables.lo
In file included from
/data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c:25:
/data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_internal.h:198:20: stdint.h: No
such file or directory
make: *** [ext/pcre/pcrelib/pcre_chartables.lo] Error 1

This is on AIX 4.3.3 and gcc.

Search Discussions

  • Michael Felt at Oct 19, 2010 at 1:36 pm
    p.s. my fix is:
    /* Define to 1 if you have the <stdint.h> header file. * /
    #ifndef HAVE_STDINT_H
    #define HAVE_STDINT_H 1
    #endif
    */
    (added space to break end-of comment, and added end of comment below block)
    On Tue, Oct 19, 2010 at 3:32 PM, Michael Felt wrote:

    Maybe a bug? with ext/* I wonder if it is internal, or something borrowed.

    The hardpart is to get a compiler old enough to not have stdint.h I
    suppose, but when that is the case the build fails and/or configure misses
    it.

    from /data/prj/php-5.2.14

    # grep -n HAVE_STDINT_H */*/*/*.h
    ext/date/lib/timelib_structs.h:32:#elif defined(HAVE_STDINT_H)
    ext/pcre/pcrelib/config.h:108:#ifndef HAVE_STDINT_H
    ext/pcre/pcrelib/config.h:109:#define HAVE_STDINT_H 1
    ext/pcre/pcrelib/pcre_internal.h:197:#elif HAVE_STDINT_H

    # ls -l ext/pcre/pcrelib/config.h
    -rw-r--r-- 1 1005 1005 11704 Mar 29 2010
    ext/pcre/pcrelib/config.h

    From the date I conclude configure has nothing to do with this, from the
    line numbers I wonder why they say
    #ifndef SOME_VARIABLE
    #define SOME_VARIABLE 1

    There are consequences! pcre_internal.h believes this! So, my question is:
    whose error is it? PHP, or somewhere external?

    make returns:

    # make
    /bin/sh /data/prj/php-5.2.14/libtool --silent --preserve-dup-deps
    --mode=compile gcc -I/data/prj/php-5.2.14/ext/pcre/pcrelib -Iext/pcre/
    -I/data/prj/php-5.2.14/ext/pcre/ -DPHP_ATOM_INC
    -I/data/prj/php-5.2.14/include -I/data/prj/php-5.2.14/main
    -I/data/prj/php-5.2.14 -I/data/prj/php-5.2.14/ext/date/lib
    -I/usr/local/include/libxml2 -I/usr/local/include
    -I/usr/local/include/freetype2 -I/usr/local/mysql/include
    -I/data/prj/php-5.2.14/TSRM -I/data/prj/php-5.2.14/Zend -I/usr/include
    -L/usr/local/ssl/lib -L/usr/local/mysql/lib -L/usr/local/lib -c
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c -o
    ext/pcre/pcrelib/pcre_chartables.lo
    In file included from
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c:25:
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_internal.h:198:20: stdint.h: No
    such file or directory
    make: *** [ext/pcre/pcrelib/pcre_chartables.lo] Error 1

    This is on AIX 4.3.3 and gcc.
  • Pierre Joye at Oct 19, 2010 at 3:59 pm
    hi,

    We do this in the bundled pcre library. Please check the exact logic
    there and try to see what is required to make it work on your box +
    compiler without breaking other platforms.

    It would rock if you could provide a patch+bug report :)

    Thanks!
    On Tue, Oct 19, 2010 at 3:36 PM, Michael Felt wrote:
    p.s. my fix is:
    /* Define to 1 if you have the <stdint.h> header file. * /
    #ifndef HAVE_STDINT_H
    #define HAVE_STDINT_H 1
    #endif
    */
    (added space to break end-of comment, and added end of comment below block)
    On Tue, Oct 19, 2010 at 3:32 PM, Michael Felt wrote:

    Maybe a bug? with ext/* I wonder if it is internal, or something borrowed.

    The hardpart is to get a compiler old enough to not have stdint.h I
    suppose, but when that is the case the build fails and/or configure misses
    it.

    from /data/prj/php-5.2.14

    # grep -n HAVE_STDINT_H */*/*/*.h
    ext/date/lib/timelib_structs.h:32:#elif defined(HAVE_STDINT_H)
    ext/pcre/pcrelib/config.h:108:#ifndef HAVE_STDINT_H
    ext/pcre/pcrelib/config.h:109:#define HAVE_STDINT_H 1
    ext/pcre/pcrelib/pcre_internal.h:197:#elif HAVE_STDINT_H

    # ls -l ext/pcre/pcrelib/config.h
    -rw-r--r--   1 1005     1005       11704 Mar 29 2010
    ext/pcre/pcrelib/config.h

    From the date I conclude configure has nothing to do with this, from the
    line numbers I wonder why they say
    #ifndef SOME_VARIABLE
    #define SOME_VARIABLE 1

    There are consequences! pcre_internal.h believes this! So, my question is:
    whose error is it? PHP, or somewhere external?

    make returns:

    # make
    /bin/sh /data/prj/php-5.2.14/libtool --silent --preserve-dup-deps
    --mode=compile gcc -I/data/prj/php-5.2.14/ext/pcre/pcrelib -Iext/pcre/
    -I/data/prj/php-5.2.14/ext/pcre/ -DPHP_ATOM_INC
    -I/data/prj/php-5.2.14/include -I/data/prj/php-5.2.14/main
    -I/data/prj/php-5.2.14 -I/data/prj/php-5.2.14/ext/date/lib
    -I/usr/local/include/libxml2 -I/usr/local/include
    -I/usr/local/include/freetype2 -I/usr/local/mysql/include
    -I/data/prj/php-5.2.14/TSRM -I/data/prj/php-5.2.14/Zend    -I/usr/include
    -L/usr/local/ssl/lib -L/usr/local/mysql/lib -L/usr/local/lib   -c
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c -o
    ext/pcre/pcrelib/pcre_chartables.lo
    In file included from
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c:25:
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_internal.h:198:20: stdint.h: No
    such file or directory
    make: *** [ext/pcre/pcrelib/pcre_chartables.lo] Error 1

    This is on AIX 4.3.3 and gcc.


    --
    Pierre

    @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
  • Rainer Jung at Oct 19, 2010 at 10:33 pm

    On 19.10.2010 15:32, Michael Felt wrote:
    Maybe a bug? with ext/* I wonder if it is internal, or something borrowed.

    The hardpart is to get a compiler old enough to not have stdint.h I suppose,
    but when that is the case the build fails and/or configure misses it.

    from /data/prj/php-5.2.14

    # grep -n HAVE_STDINT_H */*/*/*.h
    ext/date/lib/timelib_structs.h:32:#elif defined(HAVE_STDINT_H)
    ext/pcre/pcrelib/config.h:108:#ifndef HAVE_STDINT_H
    ext/pcre/pcrelib/config.h:109:#define HAVE_STDINT_H 1
    ext/pcre/pcrelib/pcre_internal.h:197:#elif HAVE_STDINT_H

    # ls -l ext/pcre/pcrelib/config.h
    -rw-r--r-- 1 1005 1005 11704 Mar 29 2010
    ext/pcre/pcrelib/config.h

    From the date I conclude configure has nothing to do with this, from the
    line numbers I wonder why they say
    #ifndef SOME_VARIABLE
    #define SOME_VARIABLE 1

    There are consequences! pcre_internal.h believes this! So, my question is:
    whose error is it? PHP, or somewhere external?

    make returns:

    # make
    /bin/sh /data/prj/php-5.2.14/libtool --silent --preserve-dup-deps
    --mode=compile gcc -I/data/prj/php-5.2.14/ext/pcre/pcrelib -Iext/pcre/
    -I/data/prj/php-5.2.14/ext/pcre/ -DPHP_ATOM_INC
    -I/data/prj/php-5.2.14/include -I/data/prj/php-5.2.14/main
    -I/data/prj/php-5.2.14 -I/data/prj/php-5.2.14/ext/date/lib
    -I/usr/local/include/libxml2 -I/usr/local/include
    -I/usr/local/include/freetype2 -I/usr/local/mysql/include
    -I/data/prj/php-5.2.14/TSRM -I/data/prj/php-5.2.14/Zend -I/usr/include
    -L/usr/local/ssl/lib -L/usr/local/mysql/lib -L/usr/local/lib -c
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c -o
    ext/pcre/pcrelib/pcre_chartables.lo
    In file included from
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c:25:
    /data/prj/php-5.2.14/ext/pcre/pcrelib/pcre_internal.h:198:20: stdint.h: No
    such file or directory
    make: *** [ext/pcre/pcrelib/pcre_chartables.lo] Error 1

    This is on AIX 4.3.3 and gcc.
    Similar problem on Solaris 8. There's no good way of replacing a
    configure based build by a fixed header file. It would be better to run
    pcre configure as part of the php configure. When building for Solaris
    8, I e.g. need to redefine several defines:

    typeset file=ext/pcre/pcrelib/config.h
    cp -p $file $file.saved
    sed \
    -e 's/#define HAVE_READLINE_HISTORY_H 1/#define
    HAVE_READLINE_HISTORY_H 0/' \
    -e 's/#define HAVE_READLINE_READLINE_H 1/#define
    HAVE_READLINE_READLINE_H 0/' \
    -e 's/#define HAVE_STDINT_H 1/#define HAVE_STDINT_H 0/' \
    -e 's/#define HAVE_STRTOQ 1/#define HAVE_STRTOQ 0/' \
    $file.saved > $file

    Regards,

    Rainer

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedOct 19, '10 at 1:32p
activeOct 19, '10 at 10:33p
posts4
users3
websitephp.net

People

Translate

site design / logo © 2022 Grokbase