Bug 2435519

Summary: OCR functionality in Spectacle does not work unless tesseract-devel is installed (due to bad library discovery code in Spectacle)
Product: [Fedora] Fedora Reporter: pg_tips <pg_forums>
Component: spectacleAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 44CC: agurenko, alekcejk, awilliam, farchord, kde-sig, kparal, marcdeop, ngompa13
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: AcceptedFreezeException
Fixed In Version: spectacle-6.6.0-2.fc45 spectacle-6.6.0-2.fc44 spectacle-6.6.3-2.fc44 spectacle-6.6.3-2.fc43 spectacle-6.6.3-2.fc42 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-03-28 00:19:00 UTC Type: ---
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: 2362358    

Description pg_tips 2026-01-30 17:19:06 UTC
In Rawhide (updated as of 2026-01-30), OCR functionality is not available even when tesseract has been installed.

When I start Spectacle and go to Options >> Configure Spectacle, the "Text Recognition (OCR)" section of the dialog says "OCR functionality is not available". 

Clicking the (i) button next to that gives a popup saying "Please install the required packages: * tesseract * tesseract language data (e.g., tesseract-ocr-eng for English).

This is despite the fact that the 'tesseract' and 'tesseract-langpack-eng' packages are both installed.

When I do the above by starting Spectacle from a terminal, I see these messages:

spectacle: Unable to load Tesseract candidate "libtesseract.so.5" : "Cannot load library libtesseract.so.5: libtesseract.so.5: cannot open shared object file: No such file or directory"
spectacle: Unable to load Tesseract candidate "libtesseract.so.4" : "Cannot load library libtesseract.so.4: libtesseract.so.4: cannot open shared object file: No such file or directory"
spectacle: Unable to load Tesseract candidate "libtesseract.so" : "Cannot load library libtesseract.so: libtesseract.so: cannot open shared object file: No such file or directory"
spectacle: Unable to locate a suitable Tesseract shared library
spectacle: Tesseract runtime library not available
spectacle: OCR is not available; language selector will remain empty.

The actual locations of the installed libtesseract.so* are:

$ sudo find /usr -name "libtesseract.so*"
/usr/lib64/libtesseract.so.5.5
/usr/lib64/libtesseract.so.5.5.2

So it appears that Spectacle isn't looking for the libraries in any place that Fedora has them.

Reproducible: Always

Steps to Reproduce:
1. Install Fedora KDE Rawhide and go through initial setup
2. sudo dnf install tesseract
3. Open Spectacle
4. Go to "Options >> Configure Spectacle"
Actual Results:
The configuration screen says "OCR functionality is not available".

Expected Results:
OCR functionality should be available and configurable in this screen.

Comment 1 pg_tips 2026-01-30 17:22:29 UTC
Full list of tesseract-related packages installed:

$ dnf list --installed "tesseract*"
Installed packages
tesseract.x86_64              5.5.2-1.fc44  rawhide
tesseract-common.noarch       5.5.2-1.fc44  updates
tesseract-langpack-eng.noarch 4.1.0-12.fc44 updates
tesseract-libs.x86_64         5.5.2-1.fc44  updates
tesseract-tessdata-doc.noarch 4.1.0-12.fc44 updates

Comment 2 pg_tips 2026-01-30 17:41:32 UTC
And Spectacle:

$ dnf list --installed spectacle
Installed packages
spectacle.x86_64 1:6.5.90-2.fc44 updates

Comment 3 pg_tips 2026-02-18 09:36:14 UTC
As per https://discussion.fedoraproject.org/t/spectacle-6-5-5-on-fedora-43-missing-ocr-extract-text-feature-despite-tesseract-being-installed/180072/5:

Installing the tesseract-devel package resolves this and makes the OCR feature available.

The key seems to be that tesseract-devel installs "/usr/lib64/libtesseract.so", which Spectacle can successfully find.

Comment 4 pg_tips 2026-02-18 10:59:00 UTC
Retitled the bug to frame it as a package dependency problem - spectacle should have a dependency on tesseract-devel.

Comment 5 Neal Gompa 2026-02-18 22:22:00 UTC
This is being worked on.

Comment 6 Fedora Update System 2026-02-18 22:33:26 UTC
FEDORA-2026-cc2553c18d (spectacle-6.6.0-2.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-cc2553c18d

Comment 7 Fedora Update System 2026-02-18 22:36:44 UTC
FEDORA-2026-cc2553c18d (spectacle-6.6.0-2.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2026-02-18 22:37:50 UTC
FEDORA-2026-ffbad0fb19 (spectacle-6.6.0-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ffbad0fb19

Comment 9 Fedora Blocker Bugs Application 2026-02-18 22:40:21 UTC
Proposed as a Freeze Exception for 44-beta by Fedora user ngompa using the blocker tracking app because:

 This fixes Spectacle's ability to load and enable OCR functionality, which is a core feature of it as a screenshot tool.

Comment 10 Adam Williamson 2026-02-18 23:20:58 UTC
Changing the description to make things clearer. Declaring a dependency on tesseract-devel is not the correct fix, and is not what the update does.

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

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

Comment 12 Kamil Páral 2026-02-23 18:44:03 UTC
Discussed during blocker review meeting on 2026-02-23 [1]:

agreed 2435519 - AcceptedFreezeException (Beta) - this is accepted as the fix for a major new feature of a default KDE application

[1] https://meetbot-raw.fedoraproject.org//blocker-review_matrix_fedoraproject-org/

Comment 13 Fedora Update System 2026-02-25 05:24:44 UTC
FEDORA-2026-ffbad0fb19 (spectacle-6.6.0-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 pg_tips 2026-03-26 18:48:53 UTC
This has regressed in spectacle 6.6.3-1.

On a system with "tesseract-libs" installed (but not "tesseract-devel"), Spectacle again fails to find Tesseract, with the message:

```
spectacle: Unable to load Tesseract candidate "tesseract" : "Cannot load library tesseract: tesseract: cannot open shared object file: No such file or directory"
spectacle: Unable to locate a suitable Tesseract shared library
spectacle: Tesseract runtime library not available
```

Experienced by me and another Discourse user: https://discussion.fedoraproject.org/t/spectacle-6-5-5-on-fedora-43-missing-ocr-extract-text-feature-despite-tesseract-being-installed/180072/10

Added a comment to the upstream bug - https://bugs.kde.org/show_bug.cgi?id=516162#c9

Comment 15 Steve Cossette 2026-03-26 19:56:15 UTC
My system has the same tesseract version installed and spectacle launches properly:

spectacle: Attempting to use Tesseract library "libtesseract.so.5.5"
spectacle: Detected Tesseract version "5.5.2"
spectacle: Loaded Tesseract runtime library from "libtesseract.so.5.5"

What tesseract packages do you have installed? Here are mine:

rpm -qa | grep tesseract
tesseract-tessdata-doc-4.1.0-12.fc44.noarch
tesseract-common-5.5.2-1.fc44.noarch
tesseract-langpack-eng-4.1.0-12.fc44.noarch
tesseract-libs-5.5.2-1.fc44.x86_64
tesseract-5.5.2-1.fc44.x86_64

Comment 16 pg_tips 2026-03-26 20:06:54 UTC
I have:

$ rpm -qa | grep tesseract
tesseract-tessdata-doc-4.1.0-11.fc43.noarch
tesseract-langpack-eng-4.1.0-11.fc43.noarch
tesseract-common-5.5.2-1.fc43.noarch
tesseract-libs-5.5.2-1.fc43.x86_64

and:

$ rpm -qa | grep spectacle
spectacle-6.6.3-1.fc43.x86_64

(I did try installing "tesseract" itself, but that didn't fix the issue.)

Also, I do have "libtesseract.so.5.5.2" and "libtesseract.so.5.5":

$ sudo find /usr -name "libtesseract*"
/usr/lib64/libtesseract.so.5.5.2
/usr/lib64/libtesseract.so.5.5

So it seems like we both have those library files - but your logs show that your Spectacle detects those files, whereas my Spectacle doesn't (per logs in comment #14).

Comment 17 Steve Cossette 2026-03-27 01:28:38 UTC
Nevermind I'm an idiot, I was still on 6.6.2.

I'll reapply the previous patch....

Comment 18 Fedora Update System 2026-03-27 02:03:20 UTC
FEDORA-2026-f2d6456adb (spectacle-6.6.3-2.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-f2d6456adb

Comment 19 Fedora Update System 2026-03-27 02:03:21 UTC
FEDORA-2026-189fe0a162 (spectacle-6.6.3-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-189fe0a162

Comment 20 Fedora Update System 2026-03-28 00:19:00 UTC
FEDORA-2026-189fe0a162 (spectacle-6.6.3-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2026-03-28 00:46:25 UTC
FEDORA-2026-f2d6456adb (spectacle-6.6.3-2.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2026-03-28 01:06:50 UTC
FEDORA-2026-c942cb4e4d (spectacle-6.6.3-2.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.