Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

how to build and install qt5.12.5 plugin for raspbian-buster in raspberry 4?



  • I use the raspberry 4 with raspbian-buster, I need to use tts, but qt5.12.5 in my board do not contain qtspeech plugin. so I download the qtspeech-everywhere-src-5.12.5.zip.
    and do as follow:
    ///////////////////////////////////////////////////////////////////

    1. qmake qtspeech.pro;
    2. make
      /////////////////////////////////////////////////////////////////////
      but in the 1 step, after I qmake , errors as bellow, show in the config.log file:

    executing config test flite

    • cd /home/qt5_install/qtspeech-everywhere-src-5.12.5/build/config.tests/flite && /usr/lib/qt5.12/bin/qmake -spec /usr/lib/qt5.12/mkspecs/linux-rpi3-g++ "CONFIG -= qt debug_and_release app_bundle lib_bundle" /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/flite
    • cd /home/qt5_install/qtspeech-everywhere-src-5.12.5/build/config.tests/flite && MAKEFLAGS= make

    g++ -c -pipe -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -O2 -fno-exceptions -Wall -W -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/flite -I. -I/usr/lib/qt5.12/mkspecs/linux-rpi3-g++ -o .obj/flite.o /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/flite/flite.cpp
    /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/flite/flite.cpp:37:10: fatal error: flite/flite.h: 没有那个文件或目录
    #include <flite/flite.h>
    ^~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:533:.obj/flite.o] 错误 1
    test flite FAILED
    executing config test flite_alsa

    • cd /home/qt5_install/qtspeech-everywhere-src-5.12.5/build/config.tests/flite_alsa && /usr/lib/qt5.12/bin/qmake -spec /usr/lib/qt5.12/mkspecs/linux-rpi3-g++ "CONFIG -= qt debug_and_release app_bundle lib_bundle" /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/flite_alsa
    • cd /home/qt5_install/qtspeech-everywhere-src-5.12.5/build/config.tests/flite_alsa && MAKEFLAGS= make

    g++ -c -pipe -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -O2 -fno-exceptions -Wall -W -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/flite_alsa -I. -I/usr/lib/qt5.12/mkspecs/linux-rpi3-g++ -o .obj/flite.o /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/flite/flite.cpp
    /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/flite/flite.cpp:37:10: fatal error: flite/flite.h: 没有那个文件或目录
    #include <flite/flite.h>
    ^~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:533:.obj/flite.o] 错误 1
    test flite_alsa FAILED
    executing config test speechd

    • cd /home/qt5_install/qtspeech-everywhere-src-5.12.5/build/config.tests/speechd && /usr/lib/qt5.12/bin/qmake -spec /usr/lib/qt5.12/mkspecs/linux-rpi3-g++ "CONFIG -= qt debug_and_release app_bundle lib_bundle" /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/speechd
    • cd /home/qt5_install/qtspeech-everywhere-src-5.12.5/build/config.tests/speechd && MAKEFLAGS= make

    g++ -c -pipe -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -O2 -fno-exceptions -Wall -W -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/speechd -I. -I/usr/lib/qt5.12/mkspecs/linux-rpi3-g++ -o .obj/speechd.o /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/speechd/speechd.cpp
    /home/qt5_install/qtspeech-everywhere-src-5.12.5/config.tests/speechd/speechd.cpp:37:10: fatal error: libspeechd.h: 没有那个文件或目录
    #include <libspeechd.h>
    ^~~~~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:530:.obj/speechd.o] 错误 1
    test speechd FAILED


  • Qt Champions 2019

    @stevewu said in how to build and install qt5.12.5 plugin for raspbian-buster in raspberry 4?:

    qtspeech-everywhere-src-5.12.5.zip

    You should download qtspeech-everywhere-src-5.12.5.tar.gz. The ZIP version is meant for Windows.

    Install libflite and libflite-dev packages.
    Same for libspeechd.



  • @stevewu said in how to build and install qt5.12.5 plugin for raspbian-buster in raspberry 4?:

    linux-rpi3-g++
    I install some libs, the config.log errors disappear.
    after step 2, make
    the build directory has some files or directories as below:
    /bin /include /lib Makefile /mkspecs /src

    do not have the /plugin directory;
    in the /lib directory, there are libQt5TextToSpeech.so;
    in the /bin directory, empty;

    is any one can tell me , how to success build the qtspeech-everywhere-src-5.12.5, and deploy it to the qt5.12.5 libs?


  • Qt Champions 2019

    @stevewu said in how to build and install qt5.12.5 plugin for raspbian-buster in raspberry 4?:

    is any one can tell me , how to success build the qtspeech-everywhere-src-5.12.5, and deploy it to the qt5.12.5 libs?

    Did you forget "make install"?



  • @jsulm thank you so much , I install as you said,
    aptitude install speechd-el
    aptitude install speechd-el-doc-cs
    aptitude install speechd-up

    after 2nd setp, make, as below
    573bef4b-92ec-43b2-8f60-c8089a4a2162-图片.png

    I do the 3rd step, make install after make,
    2124c12a-3c80-4ef3-be67-6bcd2f163e8e-图片.png

    8a22597a-596d-4c6f-993c-a21d618b7f2e-图片.png

    but , in the path /usr/lib/qt5.12/plugins, still no qtspeech...
    5ad196b1-6035-4829-8418-d6faab506876-图片.png


  • Qt Champions 2019

    @stevewu Acoording to the "make install" output it was installed in lib subdirectory, not plugins.



  • where is the subdirectory?
    I check the path /usr/bin/qt5.12.5
    322dd011-210c-47c1-b92f-637b1cb2438e-图片.png

    and the build path,
    cb1a358f-ca32-4945-a020-9d900d7c2d1f-图片.png
    and the source path,
    e82b57b9-d240-46f1-bfa1-bdfd79c2684a-图片.png
    but can not find it,,,,

    the same code , I build in windows, it seems that everything is OK! I can get the /bin /lib and /plugins.... after build.
    bca09b10-8e81-4d0f-96b3-ce22e70bfc53-图片.png

    bb5640a0-f858-4d90-b01d-28cf2f7eaf28-图片.png
    c951baae-3d57-4b50-9c4b-5659d85abc59-图片.png


  • Qt Champions 2019

    @stevewu said in how to build and install qt5.12.5 plugin for raspbian-buster in raspberry 4?:

    where is the subdirectory?

    Did you check the output from "make install" you posted?
    It is right there: /usr/lib/qt5.12/lib...



  • @jsulm thank you for reply, I check the /usr/lib/qt5.12/lib, find no subdirectory.
    after “make install” ,
    5fb38310-7ad2-4757-94f3-5ed3239fae02-图片.png

    I check the out put from “make ”, and find that ,
    it only build the code in path “/home/qt5_install/qtspeech_build/src/tts”,
    so i can get "libQt5TextToSpeech.so...etc" in the /lib, after "make" ,new add libs as below:
    41e57b5d-a860-4e45-866b-52621e60e8c5-图片.png
    but when it enters in “/home/qt5_install/qtspeech_build/src/plugins/tts”,
    put out information "nothing need to do for the first" and left, so the /plugin not be built.


  • Qt Champions 2019

    @stevewu said in how to build and install qt5.12.5 plugin for raspbian-buster in raspberry 4?:

    I check the /usr/lib/qt5.12/lib, find no subdirectory

    lib in/usr/lib/qt5.12/ IS the subdirectory I'm talking about.



  • @jsulm OK, thanks, I got it,,,
    but only "libQt5TextToSpeech.so..." in /usr/lib/qt5.12/lib, is OK for the plugin "text-to-speech"?
    "make" does not build the path “/home/qt5_install/qtspeech_build/src/plugins/tts”, it dose not matter?

    I run a test code(which can work in the win10) on the raspberry pi4, it can build success, but run error, put out "No text-to-speech plug-ins were found."


  • Qt Champions 2019

    @stevewu I guess you also need to build the tts plug-in from the plugins directory



  • ok, tks, I will try it later.....



  • @jsulm hi, I enter the /src/plugins and make,, but it still does not work.

    d377aa8b-2a86-4a77-ac25-0cfeae868b06-图片.png

    could you please tell me how to fix it?



  • @jsulm thank you very much , what you said is right...
    I reinstall all the libs about libflite and libspeechd, and it works..



  • @stevewu said in how to build and install qt5.12.5 plugin for raspbian-buster in raspberry 4?:

    and it works..

    great, if your issue is solved please mark your post as such!



  • @Pablo-J-Rogina OK.....


Log in to reply