After updating yesterday from dev-lang/perl-5.24.3-r1 to dev-lang/perl-5.26.2, all fvwm functions which use the FvwmPerl module to execute inline Perl code silently fail. This is the simplest example function I have: DestroyFunc SetPidginPage AddToFunc SetPidginPage + I . GotoPage %{ (localtime(time()))[6]%6 ? 0 : 1 }% 1 This function, which I call immediately before launching Pidgin in my StartFunction, sets the active screen page to (0,1) on weekdays or to (1,1) on weekends. It worked yesterday morning. Today, with no other invervening change except the Perl update, it no longer works. All fvwm functions that use FvwmPerl are completely failing. I was able, after much experimentation and debugging, to finally trap the following error: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\% { <-- HERE ( .*? ) } \%/ at /usr/lib64/fvwm/2.6.8/FvwmPerl line 324. The offending line: $$text_ref =~ s/\Q$quote1\E { ( .*? ) } \Q$quote2\E/ Changing it to: $$text_ref =~ s/\Q$quote1\E \{ ( .*? ) \} \Q$quote2\E/ appears to have fixed the problem, and suddenly FvwmPerl is working again.
Created attachment 560154 [details, diff] Patch to fix now-illegal regex at FvwmPerl line 324 The attached patch to fvwm-2.6.8/modules/FvwmPerl/FvwmPerl.in fixes the problem.
Created attachment 560156 [details, diff] Revised patch based at the correct filesystem level in the work dir Correction, patch is based one directory too high, rebasing it correctly in work/fvwm-2.6 8 instead of work/.
Created attachment 560158 [details, diff] Patch to update fvwm-2.6.8-r1.ebuild to fvwm-2.6.8-r2.ebuild incorporating regex patch Please feel free to rename files as appropriate. I have tested this patched ebuild and verified that it works and produces a correctly working FvwmPerl module.
NOTE: It's possible I locally fixed this after a *previous* Perl update but just never submitted patches to gentoo because I expected the fvwm maintainers to fix it upstream, and recompiling after this Perl update undid my manual fix.
Also worth mentioning I built and tested 2.6.5-r2, without issue, on Perl 5.28[1] (which is subject to all the problems with 5.26 exhibited in this bug report) The question for me is why src_test *didn't* fail, and that, when we can determine why that is, we should make it so in future, it *would* fail. Then my exhaustive testing[2] would be useful for detecting real bugs with Perl, not a waste of time 1: https://github.com/kentfredric/gentoo-perl-triage/blame/5.28.0/index/x11-wm-f 2: https://github.com/kentfredric/gentoo-perl-triage/commits/5.28.0
fvwm and FvwmPerl will BUILD just fine with this problem intact, and pass all build tests. The FvwmPerl module will even load without errors at runtime. It just won't *work*, but to make it fail you've got to actually call it, and that won't happen unless you activate at least one fvwm user-defined function that uses inline Perl.
Is it worth sending a PR upstream to the fvwm project? I can't imagine this would only affect Gentoo.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66b7a3f2cc41dbec839e53e98e97a8d86744e5ef commit 66b7a3f2cc41dbec839e53e98e97a8d86744e5ef Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2019-05-11 22:16:33 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2019-05-11 22:18:19 +0000 x11-wm/fvwm: Add Perl 5.26 / 5.28 fix, bug 674742 Closes: https://bugs.gentoo.org/674742 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> x11-wm/fvwm/files/fvwm-2.6.8-perl528.patch | 15 +++ x11-wm/fvwm/fvwm-2.6.5-r3.ebuild | 169 +++++++++++++++++++++++++++++ x11-wm/fvwm/fvwm-2.6.8-r2.ebuild | 158 +++++++++++++++++++++++++++ 3 files changed, 342 insertions(+)