Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 886507 - perl-core/Encode-3.120.0 fails to compile with Perl-5.36.0-r1
Summary: perl-core/Encode-3.120.0 fails to compile with Perl-5.36.0-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-17 23:01 UTC by viperlin
Modified: 2022-12-18 01:03 UTC (History)
1 user (show)

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


Attachments
Patch to fix -I and cflags (isystem.patch,4.00 KB, patch)
2022-12-17 23:02 UTC, viperlin
Details | Diff
Ebuild updated to include patch (Encode-3.120.0-r1.ebuild,513 bytes, text/plain)
2022-12-17 23:03 UTC, viperlin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description viperlin 2022-12-17 23:01:17 UTC
Perl 5.36 doesn't like "-I" or forcing cflag 



Duplicated fixes from Irssi project, mask cflag and use "-isystem" instead of "-II" 



Reproducible: Always

Steps to Reproduce:
1. Upgrade to Perl 5.36 
2. Install perl-core/Encode-3.120.0 
3. It fails
Actual Results:  
In file included from /usr/lib64/perl5/5.36/x86_64-linux-thread-multi/CORE/perl.h:7244,
                 from Encode.xs:8:
/usr/lib64/perl5/5.36/x86_64-linux-thread-multi/CORE/inline.h: In function ‘Perl_cop_file_avn’:
/usr/lib64/perl5/5.36/x86_64-linux-thread-multi/CORE/inline.h:3489:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]


Expected Results:  
Encode installs successfully 

Works with Perl stable at the moment but this will need patching/modding when Perl 5.36 goes stable - possibly pushing to their actual project as a fix :) 

Patches included
Comment 1 viperlin 2022-12-17 23:02:51 UTC
Created attachment 843281 [details, diff]
Patch to fix -I and cflags
Comment 2 viperlin 2022-12-17 23:03:21 UTC
Created attachment 843283 [details]
Ebuild updated to include patch
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-17 23:05:22 UTC
You shouldn't actually need perl-core/Encode, I think, as the virtual is satisfied by Perl 5.36 which contains a newer version.

Is it in your world file or something?

perl-core/* is only ever for satisfying a virtual/perl-* to provide a newer version of a module that is bundled with dev-lang/perl.

Anyway, please include the full build.log and emerge --info.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-18 01:02:28 UTC
We discussed this on IRC and turned out the package.accept_keywords list was wrong. I'll still just throw in the patch at https://github.com/dankogai/p5-encode/commit/7c9c5be4e658a5b37632b46925a2735123f65c6e as it's trivial.
Comment 5 Larry the Git Cow gentoo-dev 2022-12-18 01:03:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=038c222a22b535f2b118c02091c7b53e2d9cb7a6

commit 038c222a22b535f2b118c02091c7b53e2d9cb7a6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-18 01:03:14 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-18 01:03:34 +0000

    perl-core/Encode: backport -Werror patch
    
    It's not strictly needed (as this version isn't pulled in w/ Perl 5.36) but the patch
    exists and it's cheap to pull in, so if it avoids someone wasting some time looking
    into it, why not?
    
    Closes: https://bugs.gentoo.org/886507
    Signed-off-by: Sam James <sam@gentoo.org>

 perl-core/Encode/Encode-3.120.0.ebuild             |  5 +++-
 perl-core/Encode/files/Encode-3.120.0-Werror.patch | 29 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)