Bug 491361 - Target "spectacle" links to: KF6::PrisonScanner
Summary: Target "spectacle" links to: KF6::PrisonScanner
Status: RESOLVED NOT A BUG
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: git-master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-06 20:19 UTC by migtex
Modified: 2024-08-19 06:51 UTC (History)
1 user (show)

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


Attachments
Qt 6.7 (3.42 KB, text/plain)
2024-08-06 20:19 UTC, migtex
Details
Error seen (10.00 KB, text/x-log)
2024-08-06 20:20 UTC, migtex
Details
Spectale error #2 (10.16 KB, text/x-log)
2024-08-09 22:54 UTC, migtex
Details
qt6 config (2.18 KB, text/plain)
2024-08-09 23:11 UTC, migtex
Details
SpectacleWide (350.08 KB, image/png)
2024-08-12 08:16 UTC, migtex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description migtex 2024-08-06 20:19:44 UTC
Created attachment 172359 [details]
Qt 6.7

SUMMARY

Cannot build with Qt 6.7

STEPS TO REPRODUCE
1. New environment with the attached kdesrc-buildrc
2. $ kde-builder spectacle --refresh-build 

OBSERVED RESULT
On master 900bc566b098b452d4f22fe94b39fe765fbd53a6
Check attached error.log

EXPECTED RESULT
Build is successful : - )

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Debian 13
KDE Plasma Version: 6.1.8
KDE Frameworks Version:6.5.0
Qt Version: 6.7

ADDITIONAL INFORMATION
kde/log/latest/spectacle/error.log
Comment 1 migtex 2024-08-06 20:20:41 UTC
Created attachment 172360 [details]
Error seen
Comment 2 Noah Davis 2024-08-09 14:47:39 UTC
It seems that you don't have KF6::PrisonScanner installed and that you are compiling from source via kdesrc-build.
Spectacle seems to have its CMake set up correctly, so I checked Prison's CMake.
zxing-cpp is a mandatory dependency of Prison while Qt Multimedia is not. KF6::PrisonScanner will not be part of the build if zxing-cpp or Qt Multimedia aren't available, so perhaps you built Prison without Qt Multimedia? Spectacle already requires Qt Multimedia, but perhaps you didn't install Qt Multimedia until after Prison was built?

I'm pretty confident that this is a setup issue and not a bug, although maybe Prison should have a dedicated package for KF6::PrisonScanner or make KF6::PrisonScanner mandatory? At this time, you must find the Prison package to use the KF6::PrisonScanner target and there's not really anything else to do in CMake for the app using KF6::PrisonScanner.

> On master 900bc566b098b452d4f22fe94b39fe765fbd53a6

❯ git show 900bc566b098b452d4f22fe94b39fe765fbd53a6
fatal: bad object 900bc566b098b452d4f22fe94b39fe765fbd53a6

I think the commit hash may be invalid.
Comment 3 migtex 2024-08-09 22:54:55 UTC
Created attachment 172459 [details]
Spectale error #2
Comment 4 migtex 2024-08-09 23:10:28 UTC
Thanks for replying!

> I'm pretty confident that this is a setup issue and not a bug,

Highly likely. Please correct my procedure as you see fit. This is my first time building kde from source on a beta release so please review my report with that in mind.
 Am sure that only the kdesrc-build qt sources are being used. qtmultimedia is present in the module-definitions. I've added the ~/.local/state/sysadmin-repo-metadata/module-definitions/qt6.ksb attached.

I've made a new attempt. The following is sum of my actions after I saw your message.

$ cd kde/src/spectacle
$ git fetch && git pull
$ git log
> commit daff03d71888a8b58ca5733d6e80ba71a0c53b40 (HEAD -> master, origin)

$cd kde/src/prison
$ git fetch && git pull
$ git log 
> commit  d7d5635ac4381e6ac89f4a315e20df69ff97377

$ kde-builder prison --refresh-build --resume-from prison
Fetching remote changes to sysadmin-repo-metadata
Merging sysadmin-repo-metadata changes from branch master
Holding performance profile
Error accessing dbus: org.freedesktop.DBus.Error.ServiceUnknown: The name net.hadess.PowerProfiles was not provided by any .service files

Building prison from frameworks (1/1)
	Fetching remote changes to prison
	Merging prison changes from branch master
	* You had local changes to prison, which have been re-applied.
	Source update complete for prison: no files affected
	 Rebuilding because the option refresh-build was set
	Preparing build system for prison.
	Removing files in build directory for prison
	Old build system cleaned, starting new build system.
	Running cmake targeting Ninja...
	Compiling... succeeded (after 10 seconds)
	Note: - 2 - compile warnings
	Installing prison succeeded (after 2 seconds)

$ kdesrc-build spectacle --refresh-build 

Issue is still reproducible, with the same error. Added the error.log
Comment 5 migtex 2024-08-09 23:11:25 UTC
Created attachment 172460 [details]
qt6 config
Comment 6 migtex 2024-08-11 17:40:37 UTC
Hey @NoahDavis, in the meanwhile, do you know of a workaround?
How can I install KF6:PrisonScanner?
Thank you
Comment 7 Noah Davis 2024-08-11 19:08:04 UTC
(In reply to migtex from comment #6)
> Hey @NoahDavis, in the meanwhile, do you know of a workaround?
> How can I install KF6:PrisonScanner?
> Thank you

It should just be installed when you install Prison as long as you build Prison with both zxing-cpp and Qt Multimedia. I don't know why you don't have it. Are you building zxing-cpp from source? If not, are you sure you have the `-dev` package for zxing-cpp installed?
Comment 8 migtex 2024-08-12 08:16:46 UTC
Created attachment 172531 [details]
SpectacleWide
Comment 9 migtex 2024-08-12 08:31:38 UTC
(In reply to Noah Davis from comment #7)
> (In reply to migtex from comment #6)
> > Hey @NoahDavis, in the meanwhile, do you know of a workaround?
> > How can I install KF6:PrisonScanner?
> > Thank you
> 
> It should just be installed when you install Prison as long as you build
> Prison with both zxing-cpp and Qt Multimedia. I don't know why you don't
> have it. Are you building zxing-cpp from source? If not, are you sure you
> have the `-dev` package for zxing-cpp installed?

Thanks @NoahDavis!
Sure enough installing libzxing-dev through the package manager, and rebuilding prison solved the issue. I am able to take screenshots =D
Added SpectacleWide Attachment. Needed a restart for the hotkeys to work, mind you 

So no bug? but shouldn't libzxing-dev be a required package instead of optional?
---
One other topic. I tried the recording option using spectacle and we get this error message
"An error occurred while attempting to record the screen. Failed to connect PipeWire context"
Probably another setup issue... any hints on how to solve this? thanks in advance for your patience
Comment 10 Noah Davis 2024-08-19 06:51:10 UTC
(In reply to migtex from comment #9)
> So no bug? but shouldn't libzxing-dev be a required package instead of
> optional?

Spectacle depends on Prison, but prison doesn't necessarily require zxing-cpp. Neither is technically wrong, except that Prison should probably have a way to require zxing-cpp for apps using PrisonScanner. Perhaps you could make a bug report for Prison?

> One other topic. I tried the recording option using spectacle and we get
> this error message
> "An error occurred while attempting to record the screen. Failed to connect
> PipeWire context"
> Probably another setup issue... any hints on how to solve this? thanks in
> advance for your patience

It seems that the message is coming from KWin, so maybe KWin needed to be restarted or something else. Might be worth asking KWin devs.

Anyway, I'm marking this as not a bug since Spectacle isn't responsible for the zxing-cpp dependency and isn't responsible for creating a PipeWire context.