php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11761 LC_CTYPE undeclared
Submitted: 2001-06-27 20:44 UTC Modified: 2001-08-22 18:26 UTC
From: unix-guy at pacbell dot net Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.0.6 OS: HP-UX 11.00
Private report: No CVE-ID: None
 [2001-06-27 20:44 UTC] unix-guy at pacbell dot net
Compile with either that static or DSO method fails on HP-UX 11.00.

Config command (from static):

./configure --prefix=/opt/php4 --with-apache=../apache_1.3.19 --disable-debug --enable-inline-optimization --with-exec-dir=/opt/php4/bin --with-d
bm --enable-debugger --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-track-vars --enable-yp --enable-ftp --without-mysql --without-oracle --without-oci8

End of make output:

        gcc  -I. -I/tmp/php-4.0.6/ext/pcre -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6 -I/tmp/apache_1.3.19/src/include -I/tmp/apache_1.3.19/src/os/unix -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/ext/xml/expat/xmltok -I/tmp/php-4.0.6/ext/xml/expat/xmlparse -I/tmp/php-4.0.6/TSRM  -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2  -c php_pcre.c && touch php_pcre.lo
In file included from /tmp/php-4.0.6/Zend/../main/php_config.h:1931,
                 from /tmp/php-4.0.6/Zend/zend_config.h:1,
                 from /tmp/php-4.0.6/Zend/zend.h:44,
                 from /tmp/php-4.0.6/main/php.h:34,
                 from php_pcre.c:25:
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/string.h:26: warning: `__va__list' redefined
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: this is the location of the previous definition
php_pcre.c: In function `pcre_get_compiled_regex':
php_pcre.c:158: `LC_CTYPE' undeclared (first use in this function)
php_pcre.c:158: (Each undeclared identifier is reported only once
php_pcre.c:158: for each function it appears in.)
php_pcre.c:158: warning: initialization makes pointer from integer without a cast
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

Tried with LANG=C and LANG undefined - no difference...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-28 11:33 UTC] sniper@php.net
Do you have /usr/include/locale.h ?
Can you find this line in php4/main/php_config.h:

#define HAVE_LOCALE_H 1


 [2001-06-29 17:12 UTC] unix-guy at pacbell dot net
I do have /usr/include/locale.h. In the php_config.h file, the only line matching 'HAVE_LOCALE_H' is:

/* #undef HAVE_LOCALE_H */

Is configure not finding my header file?



 [2001-06-29 17:14 UTC] unix-guy at pacbell dot net
I was able to work around the problem by adding:

#define HAVE_LOCALE_H 1

in main/php_config.h

However, I am still concerned at why that particular header file was not found.
 [2001-06-29 17:48 UTC] unix-guy at pacbell dot net
I was able to work around the problem by adding:

#define HAVE_LOCALE_H 1

in main/php_config.h

However, I am still concerned at why that particular header file was not found.
 [2001-06-29 20:40 UTC] sniper@php.net
User feedback (next time, use the WEB interface to answer):
-----------------------------------------------------------
I do have /usr/include/locale.h. In the php_config.h file, the only line
matching 'HAVE_LOCALE_H' is:

/* #undef HAVE_LOCALE_H */

Is configure not finding my header file?
-----------------------------------------------------------


 [2001-07-02 11:19 UTC] unix-guy at pacbell dot net
I was able to work around the problem by adding:

#define HAVE_LOCALE_H 1

in main/php_config.h

However, I am still concerned at why that particular header file was not found.
 [2001-08-18 15:34 UTC] sniper@php.net
Does this happen with latest CVS snapshot:

http://snaps.php.net/

--Jani

 [2001-08-20 12:21 UTC] unix-guy at pacbell dot net
I pulled the latest snapshot and ran the same configure command. I still see the following in main/php_config.h:

/* #undef HAVE_LOCALE_H */

It appears the problem still exists...
 [2001-08-20 12:53 UTC] sniper@php.net
What is in config.log about locale.h ?

--Jani

 [2001-08-20 13:16 UTC] unix-guy at pacbell dot net
The file config.log contains the following block regarding locale.h:

configure:6312: checking for locale.h
configure:6322: gcc -E  -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT -DSHARED_CORE conftest.c >/dev/null 2>conftest.out
In file included from /usr/include/locale.h:157,
                 from configure:6318:
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: `__va__list' redefined
/usr/include/locale.h:26: warning: this is the location of the previous definition
configure: failed program was:
#line 6317 "configure"
#include "confdefs.h"
#include <locale.h>

 [2001-08-22 04:15 UTC] sniper@php.net
Are you sure your system isn't a bit broken here?
Nobody else has reported this problem but you.

--Jani

 [2001-08-22 11:21 UTC] unix-guy at pacbell dot net
I haven't tried this on another system, but it was freshly installed and patched at the time I first encountered this problem. All associated software (gcc, flex, bison, etc) was installed just prior to building PHP.

What's even more confusing is that the config.log shows that it FOUND /usr/include/locale.h:

In file included from /usr/include/locale.h:157

So how is it that configure thinks locale.h can't be found?

I don't really have time to pursue the issue on another system at this time. Since I was able to successfully build PHP by simply adding the #define to php_config.h, I wasn't overly concerned.

I'm sure it's possible that the problem is compiler related - maybe nobody else has used gcc 2.95.3 on HP-UX 11 to build PHP4, but I doubt it.
 [2001-08-22 12:53 UTC] sniper@php.net
Reason for the HAVE_LOCALE_H to get set to 0 is this:

"In file included from /usr/include/locale.h:157,
 from configure:6318:
              /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning:
  `__va__list' redefined
/usr/include/locale.h:26: warning: this is the location of the previous definition"

Now, we could discuss whether it's a bug in autoconf or
in gcc (on HP-UX)..but I'd rather not. :)

Anyway, not a bug in PHP.

--Jani

 [2001-08-22 12:55 UTC] sniper@php.net
I forgot to add this: I found couple of mentions
about this same problem. You could try with different
version of GCC.

--Jani

 [2001-08-22 13:21 UTC] unix-guy at pacbell dot net
I'll try a newer version of GCC and see what happens...
 [2001-08-22 13:24 UTC] sniper@php.net
Great. Anyway, this is _not_ a bug in PHP so please
submit further reports to the correct places.

(Either to autoconf or GCC bug systems :)

 [2001-08-22 14:08 UTC] unix-guy at pacbell dot net
If I find a solution, do you NOT want it noted in the PHP Bug database? I would think at least a bug ID # from the other database for future reference?
 [2001-08-22 15:23 UTC] sniper@php.net
Of course. If you find the solution, please add it here.
But keep this bug 'closed'.

 [2001-08-22 16:52 UTC] unix-guy at pacbell dot net
I've installed GCC 3.0 and no longer see the problem with locale.h. However, now I do see the problem in Bug id #12842.


 [2001-08-22 18:26 UTC] sniper@php.net
Note added to #12842. 


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC