miurahr / aqtinstall

aqt: Another (unofficial) Qt CLI Installer on multi-platforms
https://aqtinstall.readthedocs.io/en/latest/
MIT License
914 stars 84 forks source link

No RCC command on linux with Qt 6.5.2 #717

Closed tamlok closed 1 year ago

tamlok commented 1 year ago

Hi,

I install Qt 6.5.2 in CI:

- name: Install Qt
        uses: jurplel/install-qt-action@v3
        with:
          version: 6.5.2
          target: desktop
          modules: 'qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat'
          cache: 'true'

But got error:

make[1]: Entering directory '/home/runner/work/vnote/build/src'
/home/runner/work/vnote/Qt/6.5.2/gcc_64/bin/rcc -name extra -binary ../../vnote/src/data/extra/extra.qrc -o vnote_extra.rcc
make[1]: /home/runner/work/vnote/Qt/6.5.2/gcc_64/bin/rcc: Command not found
make[1]: *** [Makefile:2076: vnote_extra.rcc] Error 127
make[1]: Leaving directory '/home/runner/work/vnote/build/src'
make: *** [Makefile:74: sub-src-make_first] Error 2

A tree of the Qt bin dir:

Run qmake -v
QMake version 3.1
Using Qt version 6.5.2 in /home/runner/work/vnote/Qt/6.5.2/gcc_64/lib
/home/runner/work/vnote/Qt
└── 6.5.2
    └── gcc_64
        ├── bin
        │   ├── androiddeployqt
        │   ├── androiddeployqt6
        │   ├── androidtestrunner
        │   ├── assistant
        │   ├── designer
        │   ├── lconvert
        │   ├── linguist
        │   ├── lrelease
        │   ├── lupdate
        │   ├── pixeltool
        │   ├── qdbus
        │   ├── qdbuscpp2xml
        │   ├── qdbusviewer
        │   ├── qdbusxml2cpp
        │   ├── qdistancefieldgenerator
        │   ├── qdoc
        │   ├── qmake
        │   ├── qmake6
        │   ├── qml
        │   ├── qmldom
        │   ├── qmleasing
        │   ├── qmlformat
        │   ├── qmllint
        │   ├── qmlls
        │   ├── qmlplugindump
        │   ├── qmlpreview
        │   ├── qmlprofiler
        │   ├── qmlscene
        │   ├── qmltc
        │   ├── qmltestrunner
        │   ├── qmltime
        │   ├── qt-cmake
        │   ├── qt-configure-module
        │   ├── qt.conf
        │   ├── qtdiag
        │   ├── qtdiag6
        │   ├── qtpaths
        │   ├── qtpaths6
        │   └── qtplugininfo
        ├── doc

Thanks!

miurahr commented 1 year ago

You may find a rcc in 6.5.2/gcc_64/libexec/rcc I can say same for moc and uic. There are in gcc_64/bin/ in Qt 5.15.2.

The change was happened in Qt 6.2. QTBUG-88791 Move build tools like moc and rcc into $prefix/libexec

tamlok commented 1 year ago

@miurahr So do we need to manually add this folder to the PATH? The rcc is called within the make process according to the qmake pro file.

miurahr commented 1 year ago

@tamlok The path of rcc should be handled by qmake or cmake. you seems set it in your qmake configurations; https://github.com/vnotex/vnote/blob/master/src/src.pro#L74-L80

win32 {
    rcc_binary.commands = $$shell_path($$[QT_HOST_BINS]/rcc.exe) -name ${QMAKE_FILE_IN_BASE} -binary ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
    rcc_binary.depend_command = $$shell_path($$[QT_HOST_BINS]/rcc.exe) -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
} else {
    rcc_binary.commands = $$[QT_HOST_BINS]/rcc -name ${QMAKE_FILE_IN_BASE} -binary ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
    rcc_binary.depend_command = $$[QT_HOST_BINS]/rcc -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
}

You can change it somethings like

rcc_binary.commands = $$[QT_HOST_LIBEXECS]/rcc
tamlok commented 1 year ago

Thanks! I forgot I declared the rcc here.