-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qml_minimal example fails to bulid due to "byte index 1 is out of bounds of ``" #590
Comments
Thanks for taking to the time to report a bug, here is fine for questions we don't have any chat channels yet, or a discussion in github is fine for non-bugs :-) This error does look curious, it seems to suggest that one of our I assume that it is stopping on these block and not getting any futher? cxx-qt/crates/cxx-qt-lib/build.rs Lines 183 to 184 in 386a7aa
Could you try commenting out some of the Otherwise I can try to get a Nix environment setup to see if the issue is reproducible :-) I also assume you are trying this from cxx-qt/crates/cxx-qt-lib/build.rs Lines 30 to 175 in 386a7aa
|
Trying this out with Qt 6 i get a different error with Nix, due to the warning: Could not open /nix/store/5vn1qrh0dh60i3hnc87adsq5llxjxzyc-qtbase-6.5.1/lib/libQt6Qml.prl file to read libraries to link: No such file or directory (os error 2) I can see the file here instead [nix-shell:~/Projects/cxx-qt]# find /nix/store/ |grep -i libQt6Qml.prl
/nix/store/nflaf93xf4q0q6i7b3hay6nqk7b4ksp3-qtdeclarative-6.5.1/lib/libQt6Qml.prl
/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib/libQt6Qml.prl
[nix-shell:~/Projects/cxx-qt]# qmake -query
Detected locale "C" with character encoding "UTF-8", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
QT_SYSROOT:
QT_INSTALL_PREFIX:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_INSTALL_ARCHDATA:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_INSTALL_DATA:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_INSTALL_DOCS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/doc
QT_INSTALL_HEADERS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/include
QT_INSTALL_LIBS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib
QT_INSTALL_LIBEXECS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/libexec
QT_INSTALL_BINS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/bin
QT_INSTALL_TESTS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/tests
QT_INSTALL_PLUGINS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib/qt-6/plugins
QT_INSTALL_QML:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib/qt-6/qml
QT_INSTALL_TRANSLATIONS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/examples
QT_INSTALL_DEMOS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/examples
QT_HOST_PREFIX:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_HOST_DATA:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_HOST_BINS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/bin
QT_HOST_LIBEXECS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/libexec
QT_HOST_LIBS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.1
QT_VERSION:6.5.1 @Be-ing Looks like another case for |
@LeonMatthesKDAB also suffers from the missing prl file in Fedora but the build doesn't fail. So I suspect my actual error here with Qt 6 is this one, failing to find
|
@ahayzen-kdab I get this error on Fedora as well:
But that doesn't cause any issues for me on Fedora 37. So I don't think this is the issue. I'm getting another error though when trying to build in a nix docker container: https://paste.rs/rYfyU.txt @spacekookie did you experience any of these issues as well? Also, please let us know what version of cxx-qt you're building. 0.5? main? |
So Qt 5 works under Nix for me (other than #593 ), i get the And as a side note it does find the [nix-shell:~/Projects/cxx-qt]# find /nix/store/ |grep -i libQt6Qml.prl
/nix/store/nflaf93xf4q0q6i7b3hay6nqk7b4ksp3-qtdeclarative-6.5.1/lib/libQt6Qml.prl
/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib/libQt6Qml.prl
[nix-shell:~/Projects/cxx-qt]# qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9
QT_INSTALL_ARCHDATA:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9
QT_INSTALL_DATA:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9
QT_INSTALL_DOCS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/share/doc/qt-5.15.9
QT_INSTALL_HEADERS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/include
QT_INSTALL_LIBS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/lib
QT_INSTALL_LIBEXECS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/libexec
QT_INSTALL_BINS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/bin
QT_INSTALL_TESTS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/tests
QT_INSTALL_PLUGINS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/lib/qt-5.15.9/plugins
QT_INSTALL_IMPORTS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/imports
QT_INSTALL_QML:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/lib/qt-5.15.9/qml
QT_INSTALL_TRANSLATIONS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/translations
QT_INSTALL_CONFIGURATION:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9
QT_INSTALL_EXAMPLES:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/examples
QT_INSTALL_DEMOS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/examples
QT_HOST_PREFIX:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9
QT_HOST_DATA:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9
QT_HOST_BINS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/bin
QT_HOST_LIBS:/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.1
QT_VERSION:5.15.9
[nix-shell:~/Projects/cxx-qt]# command -v qmltyperegistrar
/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/bin/qmltyperegistrar |
Then going back to Qt 6 with a clean build again, it does look like [nix-shell:~/Projects/cxx-qt]# command -v qmltyperegistrar
[nix-shell:~/Projects/cxx-qt]# find /nix -name qmltyperegistrar
/nix/store/nflaf93xf4q0q6i7b3hay6nqk7b4ksp3-qtdeclarative-6.5.1/libexec/qmltyperegistrar
/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/libexec/qmltyperegistrar
/nix/store/kkcf2gs5xqbirk55906zmly37pk29qwk-qtdeclarative-5.15.9-bin/bin/qmltyperegistrar
/nix/store/v25rhh4pgvwjspr3bax3kls0r97f16fi-qtdeclarative-5.15.9-dev/bin/qmltyperegistrar
/nix/store/4zmqkx9ws3vi40wc0fq6q1hrzvmwi0y3-qt-full-5.15.9/bin/qmltyperegistrar
[nix-shell:~/Projects/cxx-qt]# qmake -query
Detected locale "C" with character encoding "UTF-8", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
QT_SYSROOT:
QT_INSTALL_PREFIX:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_INSTALL_ARCHDATA:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_INSTALL_DATA:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_INSTALL_DOCS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/doc
QT_INSTALL_HEADERS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/include
QT_INSTALL_LIBS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib
QT_INSTALL_LIBEXECS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/libexec
QT_INSTALL_BINS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/bin
QT_INSTALL_TESTS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/tests
QT_INSTALL_PLUGINS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib/qt-6/plugins
QT_INSTALL_QML:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib/qt-6/qml
QT_INSTALL_TRANSLATIONS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/translations
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/examples
QT_INSTALL_DEMOS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/examples
QT_HOST_PREFIX:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_HOST_DATA:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1
QT_HOST_BINS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/bin
QT_HOST_LIBEXECS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/libexec
QT_HOST_LIBS:/nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.1
QT_VERSION:6.5.1
[nix-shell:~/Projects/cxx-qt]# ls -l /nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/libexec/qmltyperegistrar
lrwxrwxrwx 2 root root 88 Jan 1 1970 /nix/store/sy5dy9hqshc7smrq2q7cjnllsbkg1zla-qt-full-6.5.1/libexec/qmltyperegistrar -> /nix/store/nflaf93xf4q0q6i7b3hay6nqk7b4ksp3-qtdeclarative-6.5.1/libexec/qmltyperegistrar So appears for me that |
OK, so Qt 6 is now working by pointing to the right qmake executable. Appears that |
When using Nix with Qt 6 the output of qmake6 -query is incorrect and ends up pointing to the incorrect locations. But qmake -query points to the correct ones. This solves the issue for Nix but looks like Debian only has qmake for Qt 5 and qmake6 for Qt 6. Related to KDAB#590
When using Nix with Qt 6 the output of qmake6 -query is incorrect and ends up pointing to the incorrect locations. But qmake -query points to the correct ones. qt_build_utils also will iterate through the possible qmake executables and match to the major version. Related to KDAB#590
When using Nix with Qt 6 the output of qmake6 -query is incorrect and ends up pointing to the incorrect locations. But qmake -query points to the correct ones. qt_build_utils also will iterate through the possible qmake executables and match to the major version. Related to KDAB#590
Note that |
Hey! Thanks for investigating this so quickly. I've not gotten any other errors, no. I've since tried using a more recent nixpkgs, with Qt6 (and setting I don't know if the build failures you've observed on Fedora are before or after the code is supposed to make it to that macro. I'm wondering if I'm missing some other dependency? If you want me to run any commands to test things in my environment, let me know (and apologies if you already have and I missed them in the comments) |
The The failures we observed are after yours I believe, and once working around them we were able to have a successful build. |
Hi, fancy seeing you here @spacekookie :)
Could you rerun this with |
The issues other than the odd formatting one have been solved. As no one else has ever had the formatting issues again and we would need more rust traces, I'm going to close this issue as stale. |
Hey there,
sorry if this is the wrong channel to ask questions. I was looking around for a Matrix/IRC/Discord channel in the documentation but couldn't find anything.
I'm new to both cxx-qt and qt development, so apologies also if this is an obvious problem :D
I'm trying to build the
qml_minimal
example from the cxx-qt repository. I'm using a NixOS shell environment to install the build requirements into my environment (nix-shell -p rustc cargo qt5.full mold clang cmake
- it also happens with theqt6.full
package). I don't know if there's something missing from it though.I try building the
qml-minimal
example via this command:cargo run -p qml-minimal-no-cmake
And here's the full stacktrace of my build (it looks like the cxx macro fails?): https://paste.rs/GBOwa.txt
Anyway, I hope you can give me some pointers as to what is wrong on my system/ what I'm missing to make this example build. Thanks in advance!
The text was updated successfully, but these errors were encountered: