php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27791 PHP5 + Apache2 + Mandrake 10/RC1 Fails w/o -D_LARGEFILE64_SOURCE
Submitted: 2004-03-31 01:40 UTC Modified: 2004-08-23 11:55 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: manish_dharwadker at yahoo dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 5CVS, 4CVS (2004-04-07) OS: linux (64b)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
50 - 47 = ?
Subscribe to this entry?

 
 [2004-03-31 01:40 UTC] manish_dharwadker at yahoo dot com
Description:
------------
OS: Mandrake 10.0 RC1 
Binutils: binutils-2.14.90.0.7-2mdk 
Make: GNU Make 3.80 
AutoConf: 2.13 
Apache: Latest 2.0 CVS Pull 3/31 AND 2.0.49 (Stable) 
PHP5: Latest 5.0 RC1 Build Pull 3/31 (AND php4-stable) 
OpenSSL: 0.9.7d 
MySQL: 4.0.48/4.1.1-alpha/5.0-dev (ALL) 
Error Occurence: With ALL PHP Builds 4 stable AND 5 dev 
 
I checked the bug list and could not find one. Basically, 
the sapi/.../mod_php5.lo fails with various parse errors, 
etc. in apr.h. Please advise. - Manish. 
 
Compiled With: 
./configure --prefix=/web --with-apxs2=/web/bin/apxs 
--enable-shared --enable-debug   --enable-safe-mode 
--enable-sigchild --with-zlib=/usr  --enable-memory-limit 
--with-openssl=/web --with-mysql=/web 
 
 

Reproduce code:
---------------
Standard code ... no modifications

Expected result:
----------------
Fully compiled libphp4/5.so and other binaries 

Actual result:
--------------
Log: 
gcc -I/web/include -I/web/include -I/web/include 
-Isapi/apache2handler/ 
-I/software/php-5.0.0RC1/sapi/apache2handler/ 
-DPHP_ATOM_INC -I/software/php-5.0.0RC1/include 
-I/software/php-5.0.0RC1/main -I/software/php-5.0.0RC1 
-I/software/php-5.0.0RC1/Zend -I/usr/local/include/libxml2 
-I/web/include -I/web/include/mysql 
-I/software/php-5.0.0RC1/TSRM -g -Wall 
-c /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c  
-fPIC -DPIC -o sapi/apache2handler/mod_php5.lo 
In file included from /web/include/ap_config.h:19, 
                 from /web/include/httpd.h:29, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:24, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/apr.h:262: error: parse error before 
"apr_off_t" 
/web/include/apr.h:262: warning: type defaults to `int' in 
declaration of `apr_off_t' 
/web/include/apr.h:262: warning: data definition has no 
type or storage class 
In file included from /web/include/apr_file_io.h:28, 
                 from /web/include/apr_network_io.h:25, 
                 from /web/include/httpd.h:38, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:24, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/apr_file_info.h:184: error: parse error before 
"apr_off_t" 
/web/include/apr_file_info.h:184: warning: no semicolon at 
end of struct or union 
/web/include/apr_file_info.h:186: warning: type defaults to 
`int' in declaration of `csize' 
/web/include/apr_file_info.h:186: warning: data definition 
has no type or storage class 
/web/include/apr_file_info.h:192: error: `ctime' redeclared 
as different kind of symbol 
/usr/include/time.h:254: error: previous declaration of 
`ctime' 
/web/include/apr_file_info.h:199: error: parse error before 
'}' token 
In file included from /web/include/apr_network_io.h:25, 
                 from /web/include/httpd.h:38, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:24, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/apr_file_io.h:503: error: parse error before 
"apr_off_t" 
/web/include/apr_file_io.h:692: error: parse error before 
"apr_off_t" 
In file included from /web/include/httpd.h:38, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:24, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/apr_network_io.h:535: error: parse error 
before "apr_off_t" 
In file included from /web/include/apr_buckets.h:31, 
                 from /web/include/httpd.h:39, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:24, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/apr_mmap.h:133: error: parse error before 
"apr_off_t" 
/web/include/apr_mmap.h:160: error: parse error before 
"apr_off_t" 
In file included from /web/include/httpd.h:39, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:24, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/apr_buckets.h:241: error: parse error before 
"apr_off_t" 
/web/include/apr_buckets.h:241: warning: no semicolon at 
end of struct or union 
/web/include/apr_buckets.h:243: error: conflicting types 
for `data' 
/software/php-5.0.0RC1/main/php.h:261: error: previous 
declaration of `data' 
/web/include/apr_buckets.h:251: error: `free' redeclared as 
different kind of symbol 
/usr/include/stdlib.h:569: error: previous declaration of 
`free' 
/web/include/apr_buckets.h:254: error: parse error before 
'}' token 
/web/include/apr_buckets.h:633: error: field `b' has 
incomplete type 
/web/include/apr_buckets.h:701: error: parse error before 
"apr_off_t" 
/web/include/apr_buckets.h:724: error: parse error before 
"apr_off_t" 
/web/include/apr_buckets.h:760: error: parse error before 
"apr_off_t" 
/web/include/apr_buckets.h:1154: error: parse error before 
"apr_off_t" 
/web/include/apr_buckets.h:1353: error: parse error before 
"apr_off_t" 
/web/include/apr_buckets.h:1367: error: parse error before 
"apr_off_t" 
/web/include/apr_buckets.h:1417: error: parse error before 
"apr_off_t" 
/web/include/apr_buckets.h:1433: error: parse error before 
"apr_off_t" 
In file included 
from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:24, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/httpd.h:778: error: parse error before 
"apr_off_t" 
/web/include/httpd.h:778: warning: no semicolon at end of 
struct or union 
/web/include/httpd.h:780: warning: type defaults to `int' 
in declaration of `bytes_sent' 
/web/include/httpd.h:780: warning: data definition has no 
type or storage class 
/web/include/httpd.h:791: error: parse error before 
"clength" 
/web/include/httpd.h:791: warning: type defaults to `int' 
in declaration of `clength' 
/web/include/httpd.h:791: warning: data definition has no 
type or storage class 
/web/include/httpd.h:794: error: parse error before 
"remaining" 
/web/include/httpd.h:794: warning: type defaults to `int' 
in declaration of `remaining' 
/web/include/httpd.h:794: warning: data definition has no 
type or storage class 
/web/include/httpd.h:796: error: parse error before 
"read_length" 
/web/include/httpd.h:796: warning: type defaults to `int' 
in declaration of `read_length' 
/web/include/httpd.h:796: warning: data definition has no 
type or storage class 
/web/include/httpd.h:927: error: parse error before '}' 
token 
In file included from /web/include/http_core.h:22, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:26, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/util_filter.h:140: error: parse error before 
"apr_off_t" 
/web/include/util_filter.h:276: error: parse error before 
"apr_off_t" 
In file included 
from /software/php-5.0.0RC1/sapi/apache2handler/php_apache.h:26, 
                 from /software/php-5.0.0RC1/sapi/apache2handler/mod_php5.c:26: 
/web/include/http_core.h:204: error: parse error before 
"ap_get_limit_req_body" 
/web/include/http_core.h:204: warning: type defaults to 
`int' in declaration of `ap_get_limit_req_body' 
/web/include/http_core.h:204: warning: data definition has 
no type or storage class 
/web/include/http_core.h:263: error: `ap_auth_type' 
redeclared as different kind of symbol 
/web/include/httpd.h:850: error: previous declaration of 
`ap_auth_type' 
/web/include/http_core.h:617: error: parse error before 
"apr_off_t" 
/web/include/httpd.h:875: error: storage size of `finfo' 
isn't known 
make: *** [sapi/apache2handler/mod_php5.lo] Error 1 
 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-03 22:13 UTC] manish_dharwadker at yahoo dot com
Ok .. I got this fixed by running apr-config --cppflags 
--cflags and including the output as EXTRA_CFLAGS in the 
resulting Makefile i.e. 
EXTRA_CFLAGS = -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
-D_LARGEFILE64_SOURCE -g -O2 -pthread 
 
This results in lots of warnings but get compiled and 
passes all bbut 3 tests. Developers please take over and 
make appropriate changes. 
 
Thanks! 
  
Manish.
 [2004-04-04 21:19 UTC] manish_dharwadker at yahoo dot com
Ok ... cleaned it up .. Just -D_LARGEFILE64_SOURCE needed to get this thing compiled. Can someone change the configure to check for 64 bits for large file sizes ? Thanks! - Manish.
 [2004-05-13 14:22 UTC] axel at pearbough dot net
I have experienced the same.
Apache 2.1 CVS from yesterday.
PHP5 CVS from today.

CFLAGS='-O3 -march=pentium' \
CXXFLAGS='-O3 -march=pentium' \
'./configure' \
'--disable-cgi' \
'--enable-force-cgi-redirect' \
'--enable-safe-mode' \
'--enable-magic-quotes' \
'--enable-libgcc' \
'--enable-exif' \
'--enable-calendar' \
'--enable-gd-native-ttf' \
'--enable-ftp' \
'--enable-sysvmsg' \
'--enable-sysvshm' \
'--enable-sysvsem' \
'--with-apxs2=/usr/local/apache2/bin/apxs' \
'--with-openssl' \
'--with-curl' \
'--with-db4' \
'--with-mysql=/usr' \
'--with-mysql-sock=/tmp/mysql.sock' \
'--with-gettext'

/bin/sh /usr/local/src/db/php-src/libtool --silent --preserve-dup-deps --mode=compile /usr/local/src/db/php-src/meta_ccld  -I/usr/local/apache2/include  -I/usr/local/apache2/include   -I/usr/local/apache2/include  -Isapi/apache2handler/ -I/usr/local/src/db/php-src/sapi/apache2handler/ -DPHP_ATOM_INC -I/usr/local/src/db/php-src/include -I/usr/local/src/db/php-src/main -I/usr/local/src/db/php-src -I/usr/local/src/db/php-src/Zend -I/usr/include/libxml2 -I/usr/include/mysql  -D_REENTRANT -I/usr/local/src/db/php-src/TSRM  -O3 -march=pentium -pthread -DZTS  -prefer-pic -c /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c -o sapi/apache2handler/mod_php5.lo
In file included from /usr/local/apache2/include/ap_config.h:19,
                 from /usr/local/apache2/include/httpd.h:29,
                 from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:24,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/apr.h:262: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr.h:262: warning: data definition has no type or storage class
In file included from /usr/local/apache2/include/apr_file_io.h:28,
                 from /usr/local/apache2/include/apr_network_io.h:25,
                 from /usr/local/apache2/include/httpd.h:38,
                 from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:24,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/apr_file_info.h:187: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_file_info.h:187: warning: no semicolon at end of struct or union
/usr/local/apache2/include/apr_file_info.h:189: warning: data definition has no type or storage class
/usr/local/apache2/include/apr_file_info.h:195: error: 'ctime' redeclared as different kind of symbol
/usr/include/time.h:254: error: previous declaration of 'ctime' was here
/usr/local/apache2/include/apr_file_info.h:195: error: 'ctime' redeclared as different kind of symbol
/usr/include/time.h:254: error: previous declaration of 'ctime' was here
/usr/local/apache2/include/apr_file_info.h:202: error: parse error before '}' token
In file included from /usr/local/apache2/include/apr_network_io.h:25,
                 from /usr/local/apache2/include/httpd.h:38,
                 from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:24,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/apr_file_io.h:503: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_file_io.h:692: error: parse error before "apr_off_t"
In file included from /usr/local/apache2/include/httpd.h:38,
                 from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:24,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/apr_network_io.h:535: error: parse error before "apr_off_t"
In file included from /usr/local/apache2/include/apr_buckets.h:31,
                 from /usr/local/apache2/include/httpd.h:39,
                 from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:24,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/apr_mmap.h:133: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_mmap.h:160: error: parse error before "apr_off_t"
In file included from /usr/local/apache2/include/httpd.h:39,
                 from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:24,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/apr_buckets.h:241: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_buckets.h:241: warning: no semicolon at end of struct or union
/usr/local/apache2/include/apr_buckets.h:243: error: conflicting types for 'data'
/usr/local/src/db/php-src/main/php.h:261: error: previous declaration of 'data' was here
/usr/local/apache2/include/apr_buckets.h:243: error: conflicting types for 'data'
/usr/local/src/db/php-src/main/php.h:261: error: previous declaration of 'data' was here
/usr/local/apache2/include/apr_buckets.h:251: error: 'free' redeclared as different kind of symbol
/usr/include/stdlib.h:567: error: previous declaration of 'free' was here
/usr/local/apache2/include/apr_buckets.h:251: error: 'free' redeclared as different kind of symbol
/usr/include/stdlib.h:567: error: previous declaration of 'free' was here
/usr/local/apache2/include/apr_buckets.h:254: error: parse error before '}' token
/usr/local/apache2/include/apr_buckets.h:633: error: field `b' has incomplete type
/usr/local/apache2/include/apr_buckets.h:701: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_buckets.h:724: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_buckets.h:760: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_buckets.h:1154: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_buckets.h:1353: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_buckets.h:1367: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_buckets.h:1417: error: parse error before "apr_off_t"
/usr/local/apache2/include/apr_buckets.h:1433: error: parse error before "apr_off_t"
In file included from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:24,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/httpd.h:778: error: parse error before "apr_off_t"
/usr/local/apache2/include/httpd.h:778: warning: no semicolon at end of struct or union
/usr/local/apache2/include/httpd.h:780: warning: data definition has no type or storage class
/usr/local/apache2/include/httpd.h:791: error: parse error before "clength"
/usr/local/apache2/include/httpd.h:791: warning: data definition has no type or storage class
/usr/local/apache2/include/httpd.h:794: error: parse error before "remaining"
/usr/local/apache2/include/httpd.h:794: warning: data definition has no type or storage class
/usr/local/apache2/include/httpd.h:796: error: parse error before "read_length"
/usr/local/apache2/include/httpd.h:796: warning: data definition has no type or storage class
/usr/local/apache2/include/httpd.h:927: error: parse error before '}' token
In file included from /usr/local/apache2/include/http_core.h:22,
                 from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:26,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/util_filter.h:140: error: parse error before "apr_off_t"
/usr/local/apache2/include/util_filter.h:276: error: parse error before "apr_off_t"
In file included from /usr/local/src/db/php-src/sapi/apache2handler/php_apache.h:26,
                 from /usr/local/src/db/php-src/sapi/apache2handler/mod_php5.c:26:
/usr/local/apache2/include/http_core.h:204: error: parse error before "ap_get_limit_req_body"
/usr/local/apache2/include/http_core.h:204: warning: data definition has no type or storage class
/usr/local/apache2/include/http_core.h:263: error: 'ap_auth_type' redeclared as different kind of symbol
/usr/local/apache2/include/httpd.h:850: error: previous declaration of 'ap_auth_type' was here
/usr/local/apache2/include/http_core.h:617: error: parse error before "apr_off_t"
/usr/local/apache2/include/httpd.h:875: error: storage size of `finfo' isn't known
make: *** [sapi/apache2handler/mod_php5.lo] Error 1
 [2004-05-13 17:31 UTC] manish_dharwadker at yahoo dot com
Just change your CFLAGS to include -D_LARGEFILE64_SOURCE, should allow for the compilation.
 [2004-08-23 11:55 UTC] derick@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


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