Bug 2249662 - Updating Fedora 38 to 39 breaks octave-8.3.0
Summary: Updating Fedora 38 to 39 breaks octave-8.3.0
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: qt5-qtbase
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: "FeRD" (Frank Dana)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-14 17:00 UTC by R Jenssen
Modified: 2024-01-29 00:04 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
Stack trace for octave-8.3.0 (8.08 KB, text/plain)
2023-11-14 17:01 UTC, R Jenssen
no flags Details
Build development version of octave-9 (22.20 KB, text/plain)
2024-01-28 05:32 UTC, R Jenssen
no flags Details
Script to build/install octave-9 to /usr/local (run as regular user; uses sudo) (22.30 KB, application/x-shellscript)
2024-01-29 00:02 UTC, "FeRD" (Frank Dana)
no flags Details
Script to build/install octave-9 to /usr/local (run as regular user; uses sudo) (22.31 KB, application/x-shellscript)
2024-01-29 00:04 UTC, "FeRD" (Frank Dana)
no flags Details

Description R Jenssen 2023-11-14 17:00:11 UTC
Updating Fedora 38 to 39 breaks octave-8.3.0 (precompiled from Fedora) and octave-8.4.0(compiled from source). When I run

    $ /usr/bin/octave --gui

    (octave-gui:1632543): Gtk-WARNING **: 18:58:40.527: Theme parsing error: <data>:1:0: Expected a valid selector

and the window hangs.


Reproducible: Always

Steps to Reproduce:
1./usr/bin/octave --gui
2.
3.
Actual Results:  
octave window is unresponsive 

Expected Results:  
Show octave console

See attached stack trace.

Comment 1 R Jenssen 2023-11-14 17:01:06 UTC
Created attachment 1999367 [details]
Stack trace for octave-8.3.0

Comment 2 R Jenssen 2023-11-15 06:07:06 UTC
Fixed by downloading qt5-qtbase-5.15.11-3.fc39.src.rpm

--- SOURCES/0014-QGtk3Theme-Improve-fixed-font-delivery.patch.orig	2023-10-16 11:00:00.000000000 +1100
+++ SOURCES/0014-QGtk3Theme-Improve-fixed-font-delivery.patch	2023-10-16 11:00:00.000000000 +1100
@@ -54,7 +54,7 @@
 +    GtkCssProvider *cssProvider = nullptr;
 +    if (type == QPlatformTheme::FixedFont) {
 +        cssProvider = gtk_css_provider_new();
-+        const char *fontSpec = "{font-family: monospace;}";
++        const char *fontSpec = "* {font-family: monospace;}";
 +        gtk_css_provider_load_from_data(cssProvider, fontSpec, -1, NULL);
 +        gtk_style_context_add_provider(con, GTK_STYLE_PROVIDER(cssProvider),
 +                                       GTK_STYLE_PROVIDER_PRIORITY_USER);

as per https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platformthemes/gtk3/qgtk3interface.cpp
and rebuilding.

Comment 3 "FeRD" (Frank Dana) 2023-11-15 17:47:57 UTC
Hmm. Well, rawhide has 8.4.0 already... if we have to rebuild anyway, might as well bite the bullet and upgrade?

Comment 4 "FeRD" (Frank Dana) 2023-11-15 17:49:33 UTC
Building 8.4.0 for fc39 now at https://koji.fedoraproject.org/koji/taskinfo?taskID=109076812

Comment 5 R Jenssen 2023-11-15 21:17:43 UTC
Just pointing out that it seems to me that this is actually not a bug in octave-8.3.0 but that it is a bug in qt5-qtbase-5.15.11-3.fc39.src.rpm. Changing the component field to that.

Comment 6 Fedora Update System 2023-11-15 23:55:02 UTC
FEDORA-2023-289ef7a458 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-289ef7a458

Comment 7 "FeRD" (Frank Dana) 2023-11-16 00:03:22 UTC
(In reply to R Jenssen from comment #5)
> Just pointing out that it seems to me that this is actually not a bug in
> octave-8.3.0 but that it is a bug in qt5-qtbase-5.15.11-3.fc39.src.rpm.
> Changing the component field to that.

Oh, perhaps I misunderstood your comment #2 — are you saying you had to _patch_ qt5-qtbase-5.15.11-3.fc39 (beyond the original contents of the package)? 

And when you said, "...and rebuilding", did you mean rebuilding Octave, or rebuilding qt5-qtbase?

If the problem is in the current qt5-qtbase-5.15.11-3.fc39 package, then the octave-8.4.0 build I just did against it is probably equally broken.

Comment 8 R Jenssen 2023-11-16 04:05:35 UTC
Yes. The patch is in comment #2. I patched the file SOURCES/0014-QGtk3Theme-Improve-fixed-font-delivery.patch in qt5-qtbase-5.15.11-3.fc39.src.rpm, rebuilt the rpms and then reinstalled the rpms. The problem showed up with octave-8.3.0 but is due to the missing initial "*"in the CSS string in the function 
"QFont QGtk3Interface::font(QPlatformTheme::Font type) const" in the file "src/plugins/platformthemes/gtk3/qgtk3interface.cpp". Apologies for the confusion.

Comment 9 Fedora Update System 2023-11-16 04:14:25 UTC
FEDORA-2023-289ef7a458 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-2023-289ef7a458`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-289ef7a458

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

Comment 10 Michael Katzmann 2024-01-28 02:42:25 UTC
This problem is still occurring .. is there a work around to be able to use the GUI?

Comment 11 R Jenssen 2024-01-28 05:32:12 UTC
Created attachment 2011083 [details]
Build development version of octave-9

The next version of octave updates to qt6. It should be released soon. If you can't wait, try building a local Fedora version with the attached script. You may have to install a lot of dependencies first.

Comment 12 R Jenssen 2024-01-28 09:07:13 UTC
In the uploaded script, for the "octave --gui" version, you'll need to remove the line 
"--disable-java \" from the octave "configure" command.

Comment 13 R Jenssen 2024-01-28 09:28:37 UTC
Michael, try running your version of Octave as root.

Comment 14 Michael Katzmann 2024-01-28 15:33:39 UTC
yes, this actually worked..

Comment 15 "FeRD" (Frank Dana) 2024-01-29 00:02:55 UTC
Created attachment 2011310 [details]
Script to build/install octave-9 to /usr/local (run as regular user; uses sudo)

Ugh, I didn't realize the Qt5 CSS issue wasn't going to get fixed in F39, sorry about that. I'll back this down from "ON_QA" status, and see what I can do about addressing it. Perhaps a local Qt style sheet.

When Octave 9 is released, we would be able to upgrade F39, since the current package is broken — in fact, we could upgrade it now, building from the development sources; I'll try to find some time to explore that.

In the meantime, though, a local build is the quickest solution I'm afraid.

Thanks for providing that script, @robertjenssen.au. I've gone through it and updated the install and privileged commands to use sudo, rather than having to run the entire build as root. Feels a bit safer. Updated version attached. (I didn't remove --disable-java.)

Comment 16 "FeRD" (Frank Dana) 2024-01-29 00:04:45 UTC
Created attachment 2011311 [details]
Script to build/install octave-9 to /usr/local (run as regular user; uses sudo)

And, of course, I immediately caught an error in my script. Attaching a fixed version.


Note You need to log in before you can comment on or make changes to this bug.