Bug 2345428 - The `qml` binary isn't in `$PATH` in `qt6-qtdeclarative-6.7.0-2`, but is in `qt5-qtdeclarative-5.15.13`.
Summary: The `qml` binary isn't in `$PATH` in `qt6-qtdeclarative-6.7.0-2`, but is in `...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: qt6-qtdeclarative
Version: 41
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jan Grulich
QA Contact:
URL: https://forum.qt.io/topic/156283/how-...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-12 22:29 UTC by Mr. Beedell, Roke Julian Lockhart (RJLB)
Modified: 2025-02-14 07:22 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-13 07:26:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mr. Beedell, Roke Julian Lockhart (RJLB) 2025-02-12 22:29:06 UTC
Summary
-------

As [`github.com/qt/qtdoc/blob/6f57506953cc1efaf474368393ecb1df38c9f46a/doc/src/qmlapp/qml.qdoc`][1] explains, the `qml` tool has allowed me in the past (when developing with Qt5) to run `.QML` files from the terminal, without needing to get IDE-specific stuff like [`github.com/orcun-gokbulut/qml-debug/blob/69b74cf92e547fb7383f8aa6f03ddea71fadfd4b/README.md#description`][2] working.

However, although installing [`qt5-qtdeclarative-5.15.13-1.fc40`][3] allows me to run `qml`, I intend to utilize Qt6, and [`qt6-qtdeclarative-6.7.0-2.fc40`][4] does not install the `qml` binary to `qEnvironmentVariable("PATH")`.

Reproducibility
---------------

Always

Steps to Reproduce
------------------

~~~sh
#!/usr/bin/env sh
dnf provides qml
~~~

Actual Results
--------------

> ~~~YAML
> Updating and loading repositories:
> Repositories loaded.
> qt5-qtdeclarative-devel-5.15.15-1.fc41.i686 : Development files for qt5-qtdeclarative
> Repo         : fedora
> Matched From : 
> Filename     : /usr/bin/qml
> 
> qt5-qtdeclarative-devel-5.15.15-1.fc41.x86_64 : Development files for qt5-qtdeclarative
> Repo         : fedora
> Matched From : 
> Filename     : /usr/bin/qml
> ~~~

Expected Results
----------------

It should list `qt6-qtdeclarative`.

Additional Information
----------------------

[1]: https://github.com/qt/qtdoc/blob/6f57506953cc1efaf474368393ecb1df38c9f46a/doc/src/qmlapp/qml.qdoc#L1-L145
[2]: https://github.com/orcun-gokbulut/qml-debug/blob/69b74cf92e547fb7383f8aa6f03ddea71fadfd4b/README.md#description
[3]: https://kojipkgs.fedoraproject.org//packages/qt5-qtdeclarative/5.15.13/1.fc40/x86_64/qt5-qtdeclarative-5.15.13-1.fc40.x86_64.rpm
[4]: https://kojipkgs.fedoraproject.org//packages/qt6-qtdeclarative/6.7.0/2.fc40/x86_64/qt6-qtdeclarative-6.7.0-2.fc40.x86_64.rpm

Comment 1 Jan Grulich 2025-02-13 07:26:37 UTC
There is qml-qt6 binary to use. The real binary is installed into /usr/lib64/qt6/bin/qml and symlinked to /usr/bin as qml-qt6 to not conflict with the Qt5 version.

Comment 2 Mr. Beedell, Roke Julian Lockhart (RJLB) 2025-02-13 13:30:19 UTC
> The real binary is installed into `/usr/lib64/qt6/bin/qml` and symlinked to `/usr/bin as qml-qt6`.

That doesn't *appear* to apply to my installation:

Prerequisite
------------

1.	1.	~~~sh
		#!/usr/bin/env sh
		dnf provides qml-qt6
		~~~

	2.	> ~~~YAML
		> Updating and loading repositories:
		> Repositories loaded.
		> qt6-qtdeclarative-devel-6.8.2-1.fc41.i686 : Development files for qt6-qtdeclarative
		> Repo         : updates
		> Matched From : 
		> Filename     : /usr/bin/qml-qt6
		> 
		> qt6-qtdeclarative-devel-6.8.2-1.fc41.x86_64 : Development files for qt6-qtdeclarative
		> Repo         : updates
		> Matched From : 
		> Filename     : /usr/bin/qml-qt6
		> 
		> qt6-qtdeclarative-devel-6.7.2-3.fc41.i686 : Development files for qt6-qtdeclarative
		> Repo         : fedora
		> Matched From : 
		> Filename     : /usr/bin/qml-qt6
		> 
		> qt6-qtdeclarative-devel-6.7.2-3.fc41.x86_64 : Development files for qt6-qtdeclarative
		> Repo         : fedora
		> Matched From : 
		> Filename     : /usr/bin/qml-qt6
		> ~~~

2.	1.	~~~sh
		#!/usr/bin/env sh
		sudo dnf install qt6-qtdeclarative
		~~~

	2.	> ~~~YAML
		> Updating and loading repositories:
		> Repositories loaded.
		> Package "qt6-qtdeclarative-6.8.2-1.fc41.x86_64" is already installed.
		> 
		> Nothing to do.
		> ~~~

Strange
-------

3.	1.	~~~sh
		#!/usr/bin/env sh
		file /usr/bin/qml-qt6
		~~~

	2.	> ~~~YAML
		> /usr/bin/qml-qt6: cannot open `/usr/bin/qml-qt6' (No such file or directory)
		> ~~~

4.	1.	~~~sh
		#!/usr/bin/env sh
		file /usr/lib64/qt6/bin/qml
		~~~

	2.	> ~~~YAML
		> /usr/lib64/qt6/bin/qml: cannot open `/usr/lib64/qt6/bin/qml' (No such file or directory)
		> ~~~

Can you explain this, or am I being stupid?

Comment 3 Jan Grulich 2025-02-13 13:35:01 UTC
It's in qt6-qtdeclarative-devel and not in the main qt6-qtdeclarative package.

Comment 4 Mr. Beedell, Roke Julian Lockhart (RJLB) 2025-02-13 14:00:46 UTC
Right. Real apologies for being stupid. However, I'm pretty confident I've not misunderstood this - I've just installed `qt6-qtdeclarative-devel`, and although `/usr/lib64/qt6/bin/qml` exists, there is no `/usr/bin/qml` symlink, so it's still not in `$PATH` like before. I'd can bring receipts like before if of use, but can you check whether you *definitely* have a `/usr/bin/qml` symlink?

This time, I don't think I'm wasting your time:

- > `/usr/bin/qml`: cannot open `/usr/bin/qml` (No such file or directory)
- > `/usr/lib64/qt6/bin/qml`: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter `/lib64/ld-linux-x86-64.so.2`, `BuildID[sha1]=7a8723b47dbb1a280e710d4b84ab8e6c898c5a1b`, for GNU/Linux 3.2.0, stripped

Comment 5 Jan Grulich 2025-02-13 19:17:59 UTC
(In reply to Jan Grulich from comment #1)
> There is qml-qt6 binary to use. The real binary is installed into
> /usr/lib64/qt6/bin/qml and symlinked to /usr/bin as qml-qt6 to not conflict
> with the Qt5 version.

Read it one more time please. It's qml-qt6.

Comment 6 Mr. Beedell, Roke Julian Lockhart (RJLB) 2025-02-13 19:49:55 UTC
(In reply to Jan Grulich from comment #5)  
> Read it one more time please. It's qml-qt6.

I'm so sorry. It's exactly where you said it is. Hopefully you found this as hilarious as I now do.

Comment 7 Jan Grulich 2025-02-14 07:22:51 UTC
(In reply to Mr. Beedell, Roke Julian Lockhart from comment #6)
> I'm so sorry. It's exactly where you said it is. Hopefully you found this as
> hilarious as I now do.

No problem :). I'm glad it's solved now.


Note You need to log in before you can comment on or make changes to this bug.