php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62186 readline fails to compile - void function should not return a value
Submitted: 2012-05-30 06:37 UTC Modified: 2012-05-30 23:20 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: sgtbundy at gmail dot com Assigned: johannes (profile)
Status: Closed Package: *Compile Issues
PHP Version: 5.4.3 OS: SunOS 5.10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sgtbundy at gmail dot com
New email:
PHP Version: OS:

 

 [2012-05-30 06:37 UTC] sgtbundy at gmail dot com
Description:
------------
Compilation of 5.4 source with readline enabled, using Sun Studio 12 compiler, fails with this error:

"/var/tmp/php-5.4.3/ext/readline/readline.c", line 201: void function cannot return value
cc: acomp failed for /var/tmp/php-5.4.3/ext/readline/readline.c

On investigation it seems the info function:

PHP_MINFO_FUNCTION(readline)

Attempts to return a PHP_MINFO value, however comparing the ZEND API function and other extension source it seems it should be creating an info table instead.

Test script:
---------------
Replacing:

  return PHP_MINFO(cli_readline)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);

With:

        php_info_print_table_start();
        php_info_print_table_row(2, "Readline library Version", rl_library_version );
        php_info_print_table_end();

Compiles fine

Expected result:
----------------
Successful compilation

Actual result:
--------------
"/var/tmp/php-5.4.3/ext/readline/readline.c", line 201: void function cannot return value
cc: acomp failed for /var/tmp/php-5.4.3/ext/readline/readline.c

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-30 16:50 UTC] johannes@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: johannes
 [2012-05-30 23:19 UTC] johannes@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src.git;a=commit;h=428dddd3e8dc8abaf99e22cf6ecf2cff00378fe5
Log: Fix bug #62186 readline fails to compile
 [2012-05-30 23:20 UTC] johannes@php.net
This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-05-30 23:20 UTC] johannes@php.net
-Status: Assigned +Status: Closed
 [2014-10-07 23:24 UTC] stas@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=428dddd3e8dc8abaf99e22cf6ecf2cff00378fe5
Log: Fix bug #62186 readline fails to compile
 [2014-10-07 23:35 UTC] stas@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=428dddd3e8dc8abaf99e22cf6ecf2cff00378fe5
Log: Fix bug #62186 readline fails to compile
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC