Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 637330 - dev-perl/Ace-1.290.0-r2: non-void function should return a value
Summary: dev-perl/Ace-1.290.0-r2: non-void function should return a value
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 16:58 UTC by Anton
Modified: 2018-04-01 16:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,12.73 KB, application/octet-stream)
2017-11-13 16:59 UTC, Anton
Details
emerge --info '=dev-perl/Ace-1.920.0-r2::localrepo' (emerge-info.log,4.84 KB, text/plain)
2017-11-13 16:59 UTC, Anton
Details
emerge -pqv '=dev-perl/Ace-1.920.0-r2::localrepo' (emerge-pqv.log,66 bytes, text/plain)
2017-11-13 17:00 UTC, Anton
Details
Ace-1.920.0-r2.ebuild (Ace-1.920.0-r2.ebuild,2.66 KB, text/plain)
2017-11-13 17:02 UTC, Anton
Details
The patch to remove offending code (include_guard_is_not_a_constant.patch,342 bytes, patch)
2017-11-13 17:04 UTC, Anton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton 2017-11-13 16:58:43 UTC
emerge dev-perl/Ace-1.290.0-r2 fails with compilation error:
RPC.xs:157:6: error: non-void function 'constant' should return a value [-Wreturn-type]

I'd argue that the return statement that's causing it should not be there at all. The lines 154 -- 161 in RPC.xs look like this:

    case '_':
	if (strEQ(name, "_ACECLIENT_"))
#ifdef _ACECLIENT_
	    return _ACECLIENT_;
#else
	    goto not_there;
#endif
	break;

and the macro _ACECLIENT_ is the include guard in acelib/wh/aceclient.h and is defined as empty. I'm guessing it got picked up along with other constants defined in aceclient.h by some automated code generation.

My system is a Gentoo Prefix on a Mac, but I'm filing the bug as "Gentoo Linux" because it looks like it affects everyone. I have also filed it upstream at https://rt.cpan.org/Public/Bug/Display.html?id=123593

The build.log and friends will be attached in a moment.
Comment 1 Anton 2017-11-13 16:59:14 UTC
Created attachment 503846 [details]
build.log
Comment 2 Anton 2017-11-13 16:59:49 UTC
Created attachment 503848 [details]
emerge --info '=dev-perl/Ace-1.920.0-r2::localrepo'
Comment 3 Anton 2017-11-13 17:00:32 UTC
Created attachment 503850 [details]
emerge -pqv '=dev-perl/Ace-1.920.0-r2::localrepo'
Comment 4 Anton 2017-11-13 17:02:21 UTC
Created attachment 503852 [details]
Ace-1.920.0-r2.ebuild

The ebuild was modified slightly to work on Mac, see https://bugs.gentoo.org/637102
Comment 5 Anton 2017-11-13 17:04:05 UTC
Created attachment 503854 [details, diff]
The patch to remove offending code
Comment 6 Larry the Git Cow gentoo-dev 2018-04-01 16:49:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7070a6dc14c2adb697e05dbe898da461729916b0

commit 7070a6dc14c2adb697e05dbe898da461729916b0
Author:     Kent Fredric <kentnl@gentoo.org>
AuthorDate: 2018-04-01 16:47:27 +0000
Commit:     Kent Fredric <kentnl@gentoo.org>
CommitDate: 2018-04-01 16:47:58 +0000

    dev-perl/Ace: Fixes for bugs #637102 and #637330
    
    - Use toolchain-funcs for Darwin support ( #637102 )
    - Fix 'non-void function should return a value' ( #637330 )
    - Migrate sed patches to git-am patches where possible
    
    Closes: https://bugs.gentoo.org/637330
    Bug: https://bugs.gentoo.org/637102
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-perl/Ace/Ace-1.920.0-r3.ebuild            | 12 ++++++-----
 dev-perl/Ace/files/Ace-1.92-gcc-nonvoid.patch | 31 +++++++++++++++++++++++++++
 dev-perl/Ace/files/Ace-1.92-glibc26.patch     | 29 +++++++++++++++++++++++++
 dev-perl/Ace/files/Ace-1.92-rpcxs.patch       | 25 +++++++++++++++++++++
 4 files changed, 92 insertions(+), 5 deletions(-)