Bug 2232294

Summary: perl-Wx needs a rebuild with perl(Alien::wxWidgets::Config::gtk_3_2_2_uni_gcc_3_4)
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: perl-WxAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: mhroncok, mspacek, perl-devel, spotrh, swt
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/perl-Wx-GLCanvas?collection=f40
Whiteboard:
Fixed In Version: perl-Wx-0.9932-33.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-02-09 01:25:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2261452    

Description Petr Pisar 2023-08-16 07:52:36 UTC
perl-Wx-GLCanvas-0.09-36.fc40 fails to build in Fedora 40 and 39:

+ perl Makefile.PL INSTALLDIRS=vendor 'OPTIMIZE=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/include/wx-3.2'
Searching configuration for:
wxWidgets (any version) for (any toolkit); compiler compatibility: (any compiler) (any version); 
Available configurations:
wxWidgets 3.002002 for gtk; compiler compatibility: gcc 3.4; options: no debug, unicode, no mslu
error: Bad exit status from /var/tmp/rpm-tmp.lil3RF (%build)

A difference between passing and failing build roots is at <https://koschei.fedoraproject.org/build/15900815>.

Comment 1 Miro Hrončok 2023-08-17 13:51:17 UTC
Petr, do you know why it happens and what the actual problem is? The output is not very helpful.

(I won't be able to investigate this myself until ~September. Then, I can probably strat by bisecting the problematic update that caused this.)

Comment 2 Michal Josef Spacek 2023-08-17 14:37:43 UTC
<mock-chroot> sh-5.2# perl Makefile.PL
Searching configuration for:
wxWidgets (any version) for (any toolkit); compiler compatibility: (any compiler) (any version);

Available configurations:
wxWidgets 3.002002 for gtk; compiler compatibility: gcc 3.4; options: no debug, unicode, no mslu

<mock-chroot> sh-5.2# echo $?
2

Comment 3 Michal Josef Spacek 2023-08-17 15:06:55 UTC
Message about configuration is error (via die) from:
Makefile.PL:wxWriteMakefile(
-> /usr/lib64/perl5/vendor_perl/Wx/build/MakeMaker.pm:my %options = Wx::build::Options->get_makemaker_options( is_wxPerl_tree() ? () : ( 'saved' ) );
---> /usr/lib64/perl5/vendor_perl/Wx/build/Options.pm:Alien::wxWidgets->load( key => $alien_key );
Where $alien_key is 'gtk_3_2_1_uni_gcc_3_4'

And not found this version.

Comment 4 Michal Josef Spacek 2023-08-17 15:33:22 UTC
There is generated file /usr/lib64/perl5/vendor_perl/Wx/build/Opt.pm
The output of this file in the system which we have:
$VAR1 = {
          'extra_cflags' => '',
          'extra_libs' => '',
          'alien_key' => 'gtk_3_2_1_uni_gcc_3_4'
        };

And we need to have gtk_3_2_2_uni_gcc_3_4

The fix is to rebuild perl-Wx package on the system, where is Wx 3.2.2

There are questions:
* How to prevent this kind of issue?
* How to report real issue from the build system in a better way? The error message is horrible.

Comment 5 Miro Hrončok 2023-08-18 07:55:56 UTC
> How to prevent this kind of issue?

We could add something like this to perl-Wx:

  Requires: wxGTK = %(rpm -q wxGTK --qf='%%{VERSION}')

That way, when wxGTK is updated, we would be forced to rebuild it. The maintainer of wxGTK would obviously need to be aware of this.

Comment 6 Miro Hrončok 2023-08-18 07:57:53 UTC
However, perl-Wx-0.9932-29.fc39 was built with wxGTK 3.2.2.1-3.fc39

See https://koji.fedoraproject.org/koji/buildinfo?buildID=2248887

Comment 7 Scott Talbert 2023-08-19 14:24:58 UTC
(In reply to Miro Hrončok from comment #5)
> > How to prevent this kind of issue?
> 
> We could add something like this to perl-Wx:
> 
>   Requires: wxGTK = %(rpm -q wxGTK --qf='%%{VERSION}')
> 
> That way, when wxGTK is updated, we would be forced to rebuild it. The
> maintainer of wxGTK would obviously need to be aware of this.

Actually...perl-Alien-wxWidgets has a Provides like perl(Alien::wxWidgets::Config::gtk_3_2_2_uni_gcc_3_4), so perhaps perl-Wx should have a Requires on this exact Depends (that it was built with) instead?  On the other hand, perl-Alien-wxWidgets should probably have a Requires on the exact wxGTK version it was built with.  I think?

In any event, I'm aware of these issues now and won't go updating wxGTK carelessly anymore.  ;)  Feel free to make me a co-maintainer of all these packages (perl-Alien-wxWidgets, perl-wx, perl-wx-glcanvas) and I can do rebuilds in a side tag when there's an update.

Comment 8 Michal Josef Spacek 2023-08-21 07:41:37 UTC
(In reply to Miro Hrončok from comment #6)
> However, perl-Wx-0.9932-29.fc39 was built with wxGTK 3.2.2.1-3.fc39
> 
> See https://koji.fedoraproject.org/koji/buildinfo?buildID=2248887

There is 'gtk_3_2_1_uni_gcc_3_4' still in /usr/lib64/perl5/vendor_perl/Wx/build/Opt.pm in this package

Comment 9 Miro Hrončok 2023-08-21 11:22:01 UTC
perl-Alien-wxWidgets-0.69-24.fc39 was built with wxGTK-3.2.2.1-3.fc39
it provides perl(Alien::wxWidgets::Config::gtk_3_2_2_uni_gcc_3_4)


perl-Alien-wxWidgets-0.69-23.fc38 was built with wxGTK--3.2.1-5.fc38
it provides perl(Alien::wxWidgets::Config::gtk_3_2_1_uni_gcc_3_4)


perl-Wx-0.9932-29.fc39 was built with perl-Alien-wxWidgets-0.69-23.fc38 and apparently no longer functions with perl-Alien-wxWidgets-0.69-24.fc39

Hence I suppose we need to rebuild perl-Wx once more to fix this now and add the requirement on perl(Alien::wxWidgets::Config::gtk_XXX) to prevent this in the future as Scott says.

Comment 10 Tom "spot" Callaway 2024-01-30 18:31:32 UTC
With the help of some rpm dark magic, I was able to create a dynamic Requires on perl(Alien::wxWidgets::Config::gtk_$$$$) that matches what is provided by perl-Alien-wxWidgets at perl-Wx build time.

This is present in perl-Wx-0.9932-33, currently in rawhide, and rebuilding now for F39.

Comment 11 Fedora Update System 2024-01-31 16:18:10 UTC
FEDORA-2024-e1f11870f6 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-e1f11870f6

Comment 12 Fedora Update System 2024-02-01 02:46:11 UTC
FEDORA-2024-e1f11870f6 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-e1f11870f6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-e1f11870f6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2024-02-09 01:25:09 UTC
FEDORA-2024-e1f11870f6 (perl-Wx-0.9932-33.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.