php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60740 compilation of main/main.c stops: 'zend_stream' has no member named 'mmap64'
Submitted: 2012-01-13 10:26 UTC Modified: 2017-09-28 10:02 UTC
Votes:3
Avg. Score:2.7 ± 1.2
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:-1 (-100.0%)
From: lzsiga at freemail dot c3 dot hu Assigned:
Status: Open Package: Compile Failure
PHP Version: 7.1.9 OS: AIX 6.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lzsiga at freemail dot c3 dot hu
New email:
PHP Version: OS:

 

 [2012-01-13 10:26 UTC] lzsiga at freemail dot c3 dot hu
Description:
------------
Compilation of main/main.c fails, the error message is:

/usr/local/src/php-5.3.9/main/main.c:1230: error: 'zend_stream' has no member named 'mmap64'
/usr/local/src/php-5.3.9/main/main.c:1230: error: 'zend_stream' has no member named 'mmap64'
/usr/local/src/php-5.3.9/main/main.c:1239: error: 'zend_stream' has no member named 'mmap64'
/usr/local/src/php-5.3.9/main/main.c:1240: error: 'zend_stream' has no member named 'mmap64'

The compilation went with largefile support (-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES), which caused sys/mman.h to define mmap as mmap64; I suppose it would work, if 

1. I compiled without largefile support (I don't like this idea)
2. The member 'mmap' of 'struct _zend_stream' had a less problematic name ('zmmap' for example)
3. Header 'zend_stream.h' included 'sys/mman.h'
4. I predefined 'mmap' as 'mmap64': -Dmmap=mmap64
5. I compiled in 64 bits (I'm afraid to do so, to be frank)

Platform: AIX 6.1 (oslevel -r = 6100-05); gcc (gcc --version = 4.4.5)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-15 16:57 UTC] lzsiga at freemail dot c3 dot hu
Or simply the inclusion of <sys/mman.h> could come before the inclusion of "config.h"
 [2012-01-17 13:44 UTC] lzsiga at freemail dot c3 dot hu
"Good" news: on AIX, compiling with large-file-support raises other problems, too; for example there won't be function 'fopen' only function 'fopen64'
 [2017-09-27 15:54 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2017-09-27 15:54 UTC] cmb@php.net
Is this still an issue with current PHP versions?
 [2017-09-28 04:22 UTC] lzsiga at freemail dot c3 dot hu
Sorry, I couldn't tell: I have moved onto 64-bit years ago, that eliminated the Large-File-Problem.

But I've just checked the source of zend_stream.h in 7.1.9 -- the field's name is still 'mmap', so it still might cause problem on systems where large-file-support is solved via '#define mmap mmap64' 

Note: gcc-based systems use __asm__("mmap64"), so thex don't face this problem.
 [2017-09-28 10:02 UTC] cmb@php.net
-Status: Feedback +Status: Open -PHP Version: 5.3.9 +PHP Version: 7.1.9 -Assigned To: cmb +Assigned To:
 [2017-09-28 10:02 UTC] cmb@php.net
Thanks, I see. I've updated the PHP version field accordingly.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC