Bug 481272 - Perl 5.28 being required prevents use in openSUSE LEAP 15.5 and potentially other non-rolling-release distros
Summary: Perl 5.28 being required prevents use in openSUSE LEAP 15.5 and potentially o...
Status: RESOLVED WORKSFORME
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-02-12 16:06 UTC by Marco Martin
Modified: 2024-04-03 03:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Martin 2024-02-12 16:06:31 UTC
with kdesrc-build from master, always produce errors on startup, regardless is launched with or without command line arguments and regardless if there is a configuration installed in the system or not, might be perhaps the fairly old perl version opensuse has? (v5.26.1)

without any commandline argument

diau@phobos ~/kf6 $ kdesrc-build 
Encountered an error in the execution of the script.
--> Error in option spec: "ignore-modules|!=s{,}"
 at /usr/lib/perl5/5.26.1/Getopt/Long.pm line 478.
        Getopt::Long::GetOptionsFromArray(ARRAY(0x557588627b00), HASH(0x5575885a0440), "dependency-tree", "dependency-tree-fullpath", "help|h", "metadata-only", "no-metadata", "query=s", ...) called at /home/diau/kf6/bin/share/kdesrc-build/modules/ksb/Cmdline.pm line 260
        ksb::Cmdline::readCommandLineOptionsAndSelectors() called at /home/diau/kf6/bin/share/kdesrc-build/modules/ksb/Application.pm line 240
        ksb::Application::generateModuleList(ksb::Application=HASH(0x5575889bbd30)) called at /home/diau/kf6/bin/share/kdesrc-build/modules/ksb/Application.pm line 83
        ksb::Application::new("ksb::Application") called at /home/diau/kf6/bin/bin/kdesrc-build line 185
        eval {...} called at /home/diau/kf6/bin/bin/kdesrc-build line 184



launching with "ark" as command line paramenter

diau@phobos ~/kf6 $ kdesrc-build ark
Encountered an error in the execution of the script.
--> Error in option spec: "ignore-modules|!=s{,}"
 at /usr/lib/perl5/5.26.1/Getopt/Long.pm line 478.
        Getopt::Long::GetOptionsFromArray(ARRAY(0x5655290c1778), HASH(0x565529039ee0), "dependency-tree", "dependency-tree-fullpath", "help|h", "metadata-only", "no-metadata", "query=s", ...) called at /home/diau/kf6/bin/share/kdesrc-build/modules/ksb/Cmdline.pm line 260
        ksb::Cmdline::readCommandLineOptionsAndSelectors("ark") called at /home/diau/kf6/bin/share/kdesrc-build/modules/ksb/Application.pm line 240
        ksb::Application::generateModuleList(ksb::Application=HASH(0x56552938ff28), "ark") called at /home/diau/kf6/bin/share/kdesrc-build/modules/ksb/Application.pm line 83
        ksb::Application::new("ksb::Application", "ark") called at /home/diau/kf6/bin/bin/kdesrc-build line 185
        eval {...} called at /home/diau/kf6/bin/bin/kdesrc-build line 184

Please submit a bug against kdesrc-build on https://bugs.kde.org/
Comment 1 Andrew Shark 2024-02-20 19:33:05 UTC
Currently we require 5.28 as a minimum (mpyne wrote in perl-upgrade-notes.pod).
Previously the `:s` was incorrecly applied, meaning that parameter could be optional. Now the correct `=s` is applied. See 2aedf7af commit.
I do not know if that was previously working in OpenSuse Leap or even if OpenSuse Leap was supported by kdesrc-build.

Try replacing = with : here: https://invent.kde.org/ashark/kdesrc-build/-/commit/2aedf7af5c8753def23f75618681d42cd4bef8a6#9cca8ad07f12b7b754bac5e08c4e360e4c8ab1a3_497_494

The only option that is currently using this specifier is ignore-modules (the --run previously also used that, but now is handled differently).
I could manually parse the ignore-modules also, but I am not sure it is worth it, as we will loose the ability to use options after that.

Also try upgrading perl and see if error persists. Also, try kde-builder, it should work normally.
Comment 2 Marco Martin 2024-02-21 10:19:46 UTC
(In reply to Andrew Shark from comment #1)
> Try replacing = with : here:
> https://invent.kde.org/ashark/kdesrc-build/-/commit/
> 2aedf7af5c8753def23f75618681d42cd4bef8a6#9cca8ad07f12b7b754bac5e08c4e360e4c8a
> b1a3_497_494

It doesn't seem to work, but doesn't matter good to know is just a perl dependency issue

> Also try upgrading perl and see if error persists. Also, try kde-builder, it
> should work normally.

yep, tried it and right now it seems to work very well for me, on this machine I switched full time to use only kde-builder :)
Comment 3 David Redondo 2024-02-22 13:43:29 UTC
https://invent.kde.org/sdk/kdesrc-build/-/commit/3482e71cc3c79a3daf9aba2aa2803ceead840167 dropped the minimum from 5.28, 5.26.

I think the documentation is just mistaken here.
The code and the README still say 5.26.

I ask you to reconsider this and restore 5.26 compatibility. kdesrc-build is important as it is the tool we point new contributors to and needs to work on a wide range of common distros. It  even enables people to contribute by also be enabling to build key 3rd-party deps if the distro ones are outdated. 

Breaking compatibility with the LATEST OpenSuseLeap is not optimal because of this.
Comment 4 Nate Graham 2024-02-22 17:04:16 UTC
Agreed, we shouldn't break compatibility with non-rolling-release distros.
Comment 5 Andrew Shark 2024-02-22 17:36:55 UTC
The compatibility got broken 10 years ago? I see those specifiers were introduced in this commit: https://invent.kde.org/sdk/kdesrc-build/-/commit/319eb52b9b4604b4f4a9a43aa8202b85eb644d37#35fbf7cdd1f4b0f744a5921e1be06f93d359d182_89_239
Comment 6 David Redondo 2024-02-23 09:51:28 UTC
But in practice Marco was able to run it before he filed the bug report?
Comment 7 Andrew Shark 2024-03-02 17:00:46 UTC
I also would like to know if that was working ever, marking as NEEDSINFO.
Other than that, I recommend using kde-builder anyway (it supports not so fresh python versions also).
Comment 8 Andrew Shark 2024-03-03 06:17:59 UTC
I have explored what happened.

The OpenSuse Leap 15.5  uses perl 5.26.1.
That perl version  uses GetOpt::Long 2.49 specification:

perl -MGetopt::Long -e 'print $Getopt::Long::VERSION, "\n";'
2.49

Here is the doc for this specification: https://perldoc.perl.org/5.26.1/Getopt::Long

It can be seen that this spec already supports such specification of number of args:
> It is also possible to specify the minimal and maximal number of arguments an option takes. foo=s{2,4} indicates an option that takes at least two and at most 4 arguments. foo=s{1,} indicates one or more values; foo:s{,} indicates zero or more option values.

The issue appeared after introducing the short version of option as exclamation mark in this commit:
https://invent.kde.org/sdk/kdesrc-build/-/commit/5b155c5e29dd2d377fd1f84fb42d0e629a9f368b#9cca8ad07f12b7b754bac5e08c4e360e4c8ab1a3_448_460

This was half of year ago, and nobody complained. Because newer versions of perl allow exclamation mark. This proves nobody uses outdated distros like OpenSuse Leap for development.
Comment 9 David Redondo 2024-03-04 08:44:43 UTC
> This was half of year ago, and nobody complained. Because newer versions of perl allow exclamation mark. This proves nobody uses outdated distros like OpenSuse Leap for development.

Becaue people don't regularly update kdesrc-build except when it stops working. Which your reorganizations forced people to do.


I would bet that Marco Martin is a KDE developer.
Comment 10 Andrew Shark 2024-03-04 08:54:01 UTC
I know Marco is a KDE developer.

But note, that people were expected to update kdesrc-build, because it had module-definitions included in its repo.
If you were keeping the kdesrc-build outdated, that was incorrect usage.

Note that now distro-dependencies and module-definitions moved to repo-metadata. So they will be up to date automatically at each kde-builder run. But still, it is assumed you are a recent version of kde-builder and update regularly.
Comment 11 Marco Martin 2024-03-04 09:14:00 UTC
I know I should have updated it more often, but it's really a thing one thinks about when it stops working. Should really update itself (though risks of breaking itself mid-running)
On one machine I do use such an outdated distro by purpose, to make sure things do actually build and run on distros that even if outdated are still their current release and have users
Comment 12 Andrew Shark 2024-03-04 09:31:25 UTC
About self-update I have some thoughts, but that may be discussed in another issue.
For the note, in case you really would need to use kdesrc-build in suse leap (for testing for example), you can manually remove that "|!" from specifier. I am not doing that for kdesrc-build, because to remove it properly, it needs to be replaced by something, and documentation needs to be changed, and I switched development to kde-builder.
Comment 13 Bug Janitor Service 2024-03-19 03:46:20 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Bug Janitor Service 2024-04-03 03:47:08 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!