Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to apply Devel::PatchPerl 1.94 on old perls #42

Closed
skaji opened this issue May 24, 2020 · 2 comments
Closed

failed to apply Devel::PatchPerl 1.94 on old perls #42

skaji opened this issue May 24, 2020 · 2 comments

Comments

@skaji
Copy link
Contributor

skaji commented May 24, 2020

Here are what I did.

❯ perl -MDevel::PatchPerl\ 999999
Devel::PatchPerl version 999999 required--this is only version 1.94.
BEGIN failed--compilation aborted.

❯ wget -q https://www.cpan.org/src/5.0/perl-5.8.1.tar.gz
❯ tar xf perl-5.8.1.tar.gz
❯ cd perl-5.8.1

❯ patchperl
Auto-guessed '5.8.1'
patching Configure
patching ext/Errno/Errno_pm.PL
patching Configure
patching utils/h2ph.PL
patching pp.c
patching Configure
2 out of 6 hunks FAILED -- saving rejects to file Configure.rej
Died at /Users/skaji/env/plenv/versions/relocatable-5.30.2.0/lib/site_perl/5.30.2/Devel/PatchPerl.pm line 443.

❯ echo $?
25

❯ cat Configure.rej
***************
*** 4646,4658 ****
  case "$hint" in
  default|recommended)
  	case "$gccversion" in
- 	1*) dflt="$dflt -fpcc-struct-return" ;;
  	esac
  	case "$optimize:$DEBUGGING" in
  	*-g*:old) dflt="$dflt -DDEBUGGING";;
  	esac
  	case "$gccversion" in
- 	2*) if $test -d /etc/conf/kconfig.d &&
  			$contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
  		then
  			# Interactive Systems (ISC) POSIX mode.
--- 4646,4658 ----
  case "$hint" in
  default|recommended)
  	case "$gccversion" in
+ 	1.*) dflt="$dflt -fpcc-struct-return" ;;
  	esac
  	case "$optimize:$DEBUGGING" in
  	*-g*:old) dflt="$dflt -DDEBUGGING";;
  	esac
  	case "$gccversion" in
+ 	2.*) if $test -d /etc/conf/kconfig.d &&
  			$contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
  		then
  			# Interactive Systems (ISC) POSIX mode.
***************
*** 22446,22452 ****

  : add -D_FORTIFY_SOURCE if feasible and not already there
  case "$gccversion" in
- [456789].*)	case "$optimize$ccflags" in
  	*-O*)	case "$ccflags$cppsymbols" in
  		*_FORTIFY_SOURCE=*) # Don't add it again.
  			echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4
--- 22446,22452 ----

  : add -D_FORTIFY_SOURCE if feasible and not already there
  case "$gccversion" in
+ [456789].*|[1-9][0-9]*)	case "$optimize$ccflags" in
  	*-O*)	case "$ccflags$cppsymbols" in
  		*_FORTIFY_SOURCE=*) # Don't add it again.
  			echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4

return unless $num < 5.031006;
return if $num >= 5.030002;

Could you make sure these version checks are correct?

bingos added a commit that referenced this issue May 25, 2020
#42

Will successfully patch all the way back to v5.6.0
@bingos
Copy link
Owner

bingos commented May 25, 2020

Sorry about that. I have spent a couple of hours this morning resolving the issue 15cdb6b

1.96 just uploaded to CPAN

@skaji
Copy link
Contributor Author

skaji commented May 25, 2020

@bingos Thanks!

@skaji skaji closed this as completed May 25, 2020
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jun 6, 2020
Upstream changes:
version 2.00 at 2020-06-04 10:20:07 +0000
-----------------------------------------

  Change: 0ab4bf0d8b02af79e1afed7fac9e91b75f1c1fda
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-06-04 11:20:07 +0000

    Resolve patching issues with v5.22.x and v5.24.x

    bingos/devel-patchperl#44

    Configure changes had been backported to the v5.22 and v5.24 maint
    releases, so what worked for .0 releases didn't work for later maint
    releases.

    I have adjusted and tested the patch application criteria for all
    v5.22.x and v5.24.x releases.

-----------------------------------------
version 1.98 at 2020-05-25 18:17:30 +0000
-----------------------------------------

  Change: 25ccc65e1b2bd688983ced340c23561888456921
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-05-25 19:17:30 +0000

    Added command line switches to patchperl

    --version prints version of Devel::PatchPerl and exits

    --patchlevel will update patchlevel.h even in a git repository

    One may also set the PERL5_PATCHPERL_PATCHLEVEL env var to have the
    same effect as --patchlevel

-----------------------------------------
version 1.96 at 2020-05-25 11:21:50 +0000
-----------------------------------------

  Change: 15cdb6b32538d3cefc779735413f0fe8522aa27b
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-05-25 12:21:50 +0000

    Resolve reported issue with 1.94 release

    bingos/devel-patchperl#42

    Will successfully patch all the way back to v5.6.0

-----------------------------------------
version 1.94 at 2020-05-24 12:52:39 +0000
-----------------------------------------

  Change: 14c825fc079cb8f0d626b6b9769d048db9771bc0
  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
  Date : 2020-05-24 13:52:39 +0000

    Added Configure patch for GCC10

    Perl/perl5@9f4e630
    0b91e219

    Fedora 32 now ships with GCC 10 as the system compiler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants