php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57957 Compile error
Submitted: 2007-12-07 07:03 UTC Modified: 2007-12-13 13:45 UTC
From: jan at horde dot org Assigned:
Status: Closed Package: intl (PECL)
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jan at horde dot org
New email:
PHP Version: OS:

 

 [2007-12-07 07:03 UTC] jan at horde dot org
Description:
------------
The PHP version is actually 5.2.5. ICU libs are 3.4.

This is the error during compilation:

 gcc -I/usr/include -I. -I/tmp/pear/cache/intl-1.0.0beta -DPHP_ATOM_INC -I/var/tmp/pear-build-root/intl-1.0.0beta/include -I/var/tmp/pear-build-root/intl-1.0.0beta/main -I/tmp/pear/cache/intl-1.0.0beta -I/usr/local/apache/php/include/php -I/usr/local/apache/php/include/php/main -I/usr/local/apache/php/include/php/TSRM -I/usr/local/apache/php/include/php/Zend -I/usr/local/apache/php/include/php/ext -I/usr/local/apache/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/cache/intl-1.0.0beta/common/common_error.c  -fPIC -DPIC -o common/.libs/common_error.o
/tmp/pear/cache/intl-1.0.0beta/common/common_error.c: In function 'intl_expose_icu_error_codes':
/tmp/pear/cache/intl-1.0.0beta/common/common_error.c:243: error: 'U_IDNA_ZERO_LENGTH_LABEL_ERROR' undeclared (first use in this function)
/tmp/pear/cache/intl-1.0.0beta/common/common_error.c:243: error: (Each undeclared identifier is reported only once
/tmp/pear/cache/intl-1.0.0beta/common/common_error.c:243: error: for each function it appears in.)

And just for completion: the configure stage worked fine, and I used "pecl install" for installation.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-12 15:58 UTC] stas at zend dot com
We actually checked against ICU 3.6. Any specific reason why 3.4 is used?
 [2007-12-12 17:10 UTC] jan at horde dot org
That's the version that came with my distro, and it's the version that's checked by configure, so I reckoned it should work with it.
 [2007-12-12 19:24 UTC] stas at zend dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

You may try this patch:
http://cvs.php.net/viewvc.cgi/pecl/intl/common/common_error.c?r1=1.1.2.3&r2=1.1.2.4&view=patch
 [2007-12-13 05:13 UTC] jan at horde dot org
Thanks. Now I get different warnings and another fatal compile error. Here's the complete make log:

/bin/sh /home/jan/cvs/pecl/intl/libtool --mode=compile gcc -I/usr/include -I. -I/home/jan/cvs/pecl/intl -DPHP_ATOM_INC -I/home/jan/cvs/pecl/intl/include -I/home/jan/cvs/pecl/intl/main -I/home/jan/cvs/pecl/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend  -DHAVE_CONFIG_H  -g -O2   -c /home/jan/cvs/pecl/intl/php_intl.c -o php_intl.lo
mkdir .libs
 gcc -I/usr/include -I. -I/home/jan/cvs/pecl/intl -DPHP_ATOM_INC -I/home/jan/cvs/pecl/intl/include -I/home/jan/cvs/pecl/intl/main -I/home/jan/cvs/pecl/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -DHAVE_CONFIG_H -g -O2 -c /home/jan/cvs/pecl/intl/php_intl.c  -fPIC -DPIC -o .libs/php_intl.o
In file included from /home/jan/cvs/pecl/intl/php_intl.c:33:
/home/jan/cvs/pecl/intl/collator/collator_create.h:25: warning: data definition has no type or storage class
/home/jan/cvs/pecl/intl/collator/collator_create.h:25: warning: parameter names (without types) in function declaration
In file included from /home/jan/cvs/pecl/intl/php_intl.c:40:
/home/jan/cvs/pecl/intl/formatter/formatter_main.h:25: warning: data definition has no type or storage class
/home/jan/cvs/pecl/intl/formatter/formatter_main.h:25: warning: parameter names (without types) in function declaration
In file included from /home/jan/cvs/pecl/intl/php_intl.c:43:
/home/jan/cvs/pecl/intl/msgformat/msgformat.h:25: warning: data definition has no type or storage class
/home/jan/cvs/pecl/intl/msgformat/msgformat.h:25: warning: parameter names (without types) in function declaration
In file included from /home/jan/cvs/pecl/intl/php_intl.c:51:
/home/jan/cvs/pecl/intl/normalizer/normalizer_create.h:22: warning: data definition has no type or storage class
/home/jan/cvs/pecl/intl/normalizer/normalizer_create.h:22: warning: parameter names (without types) in function declaration
/home/jan/cvs/pecl/intl/php_intl.c:78: error: expected ')' before numeric constant
/home/jan/cvs/pecl/intl/php_intl.c:260: warning: parameter names (without types) in function declaration
/home/jan/cvs/pecl/intl/php_intl.c:269: error: 'intl_functions' undeclared here (not in a function)
/home/jan/cvs/pecl/intl/php_intl.c:276: error: 'intl' undeclared here (not in a function)
/home/jan/cvs/pecl/intl/php_intl.c:276: error: initializer element is not constant
/home/jan/cvs/pecl/intl/php_intl.c:276: error: (near initialization for 'intl_module_entry.global_startup_func')
/home/jan/cvs/pecl/intl/php_intl.c:277: error: initializer element is not constant
/home/jan/cvs/pecl/intl/php_intl.c:277: error: (near initialization for 'intl_module_entry.global_shutdown_func')
/home/jan/cvs/pecl/intl/php_intl.c:278: warning: initialization makes integer from pointer without a cast
/home/jan/cvs/pecl/intl/php_intl.c:279: warning: initialization makes integer from pointer without a cast
/home/jan/cvs/pecl/intl/php_intl.c:280: warning: excess elements in struct initializer
/home/jan/cvs/pecl/intl/php_intl.c:280: warning: (near initialization for 'intl_module_entry')
/home/jan/cvs/pecl/intl/php_intl.c:281: warning: excess elements in struct initializer
/home/jan/cvs/pecl/intl/php_intl.c:281: warning: (near initialization for 'intl_module_entry')
/home/jan/cvs/pecl/intl/php_intl.c: In function 'PHP_GINIT_FUNCTION':
/home/jan/cvs/pecl/intl/php_intl.c:291: error: incompatible type for argument 1 of 'memset'
make: *** [php_intl.lo] Fehler 1
 [2007-12-13 13:05 UTC] stas at zend dot com
We'd prefer different bugs submitted separately. 

I couldn't reproduce this. As the line that errors out in your  report is PHP_METHOD(Collator, __construct) - it looks like something is wrong with your PHP includes, as it is interpreted as function definition.
 [2007-12-13 13:15 UTC] jan at horde dot org
Hm, in my checkout (freshly updated from CVS), this line is:

memset( intl_globals, 0, sizeof(zend_intl_globals) );

http://cvs.php.net/viewvc.cgi/pecl/intl/php_intl.c?annotate=1.9#l291
 [2007-12-13 13:16 UTC] stas at zend dot com
I was talking about:

/home/jan/cvs/pecl/intl/msgformat/msgformat.h:25: warning: data
definition has no type or storage class
 [2007-12-13 13:28 UTC] jan at horde dot org
But that's not the fatal error that keeps me from compiling the extension. I appreciate that you try to nuke the warnings too, but for now I would be happy if i could finish compilation at all :)

To rule out any leftovers from earlier attempts, I tried a completely fresh checkout with the same result.
And that line in msgformat.h is of course:

PHP_METHOD( MessageFormatter, __construct );

You probably meant collator_create.h
 [2007-12-13 13:32 UTC] jan at horde dot org
Your comment about php includes being wrong got me on a track. Looks like phpize doesn't create build tools with the correct path to the php libs and headers.
 [2007-12-13 13:34 UTC] jan at horde dot org
Yeah, that got me further. Providing an explicit path to php-config fixed those problems. But there are more. Now I get:

 gcc -I/usr/include -I. -I/home/jan/cvs/pecl/intl -DPHP_ATOM_INC -I/home/jan/cvs/pecl/intl/include -I/home/jan/cvs/pecl/intl/main -I/home/jan/cvs/pecl/intl -I/usr/local/apache/php/include/php -I/usr/local/apache/php/include/php/main -I/usr/local/apache/php/include/php/TSRM -I/usr/local/apache/php/include/php/Zend -I/usr/local/apache/php/include/php/ext -I/usr/local/apache/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/jan/cvs/pecl/intl/collator/collator_sort.c  -fPIC -DPIC -o collator/.libs/collator_sort.o
/home/jan/cvs/pecl/intl/collator/collator_sort.c: In function 'collator_regular_compare_function':
/home/jan/cvs/pecl/intl/collator/collator_sort.c:67: error: 'IS_UNICODE' undeclared (first use in this function)
/home/jan/cvs/pecl/intl/collator/collator_sort.c:67: error: (Each undeclared identifier is reported only once
/home/jan/cvs/pecl/intl/collator/collator_sort.c:67: error: for each function it appears in.)
/home/jan/cvs/pecl/intl/collator/collator_sort.c: In function 'collator_numeric_compare_function':
/home/jan/cvs/pecl/intl/collator/collator_sort.c:143: error: 'IS_UNICODE' undeclared (first use in this function)
/home/jan/cvs/pecl/intl/collator/collator_sort.c: In function 'zif_collator_sort_with_sort_keys':
/home/jan/cvs/pecl/intl/collator/collator_sort.c:397: error: 'IS_UNICODE' undeclared (first use in this function)
make: *** [collator/collator_sort.lo] Fehler 1
 [2007-12-13 13:36 UTC] stas at zend dot com
looks like you have checked out HEAD instead of PHP_5_2. For PHP 5 builds, you need PHP_5_2 branch.
 [2007-12-13 13:45 UTC] jan at horde dot org
That did it. Failed unit tests are coming in a new ticket. :)
Thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC