Bug 491167 - The building of ktextwidgets stops because some errors related to QTextToSpeech
Summary: The building of ktextwidgets stops because some errors related to QTextToSpeech
Status: RESOLVED DOWNSTREAM
Alias: None
Product: frameworks-ktextwidgets
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Laurent Montel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-02 11:49 UTC by Ganton
Modified: 2024-08-02 21:01 UTC (History)
2 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 Ganton 2024-08-02 11:49:31 UTC
Dear KDE people,

The building of ktextwidgets stops because some errors related to QTextToSpeech:
```
            In file included from /home/user/kde/src/ktextwidgets/src/widgets/krichtextedit_p.h:13,
                 from /home/user/kde/src/ktextwidgets/src/widgets/krichtextedit.cpp:11:
            /home/user/kde/src/ktextwidgets/src/widgets/ktextedit_p.h:112:5: error: ‘QTextToSpeech’ does not name a type
            112 |     QTextToSpeech *textToSpeech = nullptr;
                |     ^~~~~~~~~~~~~
```
Comment 1 Ganton 2024-08-02 11:49:48 UTC
Note: I was using kde-builder to build ktextwidgets. As a workaround, I substituted this line in ~/kde/src/ktextwidgets/CMakeLists.txt:

    option(WITH_TEXT_TO_SPEECH "Build text-to-speech support" ON)
with

    option(WITH_TEXT_TO_SPEECH "Build text-to-speech support" OFF)
and ktextwidgets could be built.

I reported it to the kde-builder people (https://invent.kde.org/sdk/kde-builder/-/issues/100), although I was told there that "Not a kde-builder problem. Please report to the corresponding project", so I reported it here.
Comment 2 Laurent Montel 2024-08-02 11:52:57 UTC
hi,
if (WITH_TEXT_TO_SPEECH)
    find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED TextToSpeech)
    add_definitions(-DHAVE_SPEECH)
endif()
Qt6 text to speech is required 
=> I don't understand why you have this error.
Comment 3 Ganton 2024-08-02 11:53:33 UTC
Additional information: 
                - Qt was built using `kde-builder qt6-set` and `~/.config/kdesrc-buildrc` was changed (the first `#` of `# qt-install-dir ~/kde/qt # Directory to install Qt6 if kde-builder supplies it` was deleted). The operating system is Kubuntu 24.04. The git version of `kde-builder` is "981ed2c51f58ae6b6e91dd737020a3697c6b648c" (the latest one). To build `ktextwidgets` this was used: `kde-builder ktextwidgets` and later `kde-builder --refresh-build ktextwidgets`.
Comment 4 Laurent Montel 2024-08-02 11:55:59 UTC
=> you build qt
=> perhaps it doesn't search Qt module in same repo as your build.
=> it finds it but doesn't use it.

for me it's a problem on your qt build.

by default CI is ok
Comment 5 fanzhuyifan 2024-08-02 16:56:02 UTC
Closing since this is a local build configuration issue for Qt. Feel free to ask for help in the matrix chat rooms or the forums.
Comment 6 Ganton 2024-08-02 21:01:22 UTC
The problem was solved in that computer after applying a workaround that Andrew Shark wrote (after having found a deeper problem). If you please, upvote it (so other people don't have this problem):
https://invent.kde.org/sysadmin/repo-metadata/-/merge_requests/430