Re: Qt 5 Fedora 21 packages
On 16/10/14 16:27, Kevin Kofler wrote: Michael Schwendt wrote: Some confusion here trying to use Fedora's Qt 5 packages, and it seems they cannot be use quickly. Depends on the build system you (or the upstream project you're packaging) use: * CMake: just works * qmake: call qmake-qt5 and it'll find all the rest just fine * qbs: hopefully just works too, but not tested by me yet Qbs needs an intial manual configuration at the moment. But the auto-detection creates profiles for each qt version. So if you compile you either have set a default profile before or specify the profile name on the commandline. Semi-OT: Qbs review request for fedora pending: https://bugzilla.redhat.com/show_bug.cgi?id=979124 (I will try to update it to the latest release today) Regards, Erik -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Qt 5 Fedora 21 packages
Some confusion here trying to use Fedora's Qt 5 packages, and it seems they cannot be use quickly. $ rpm -qa qt5\*|sort qt5-qtbase-5.3.2-3.fc21.x86_64 qt5-qtbase-devel-5.3.2-3.fc21.x86_64 qt5-qtbase-gui-5.3.2-3.fc21.x86_64 qt5-qtbase-ibase-5.3.2-3.fc21.x86_64 qt5-qtbase-mysql-5.3.2-3.fc21.x86_64 qt5-qtbase-odbc-5.3.2-3.fc21.x86_64 qt5-qtbase-postgresql-5.3.2-3.fc21.x86_64 qt5-qtbase-tds-5.3.2-3.fc21.x86_64 No moc in PATH, no uic either. Just moc-qt5 and uic-qt5. $ pkg-config --variable=moc Qt5 /usr/lib64/qt5/bin/moc $ pkg-config --variable=uic Qt5 $ $ rpm -qf /usr/lib64/qt5/bin/moc qt5-qtbase-devel-5.3.2-3.fc21.x86_64 No documentation in that package: $ rpm -qd qt5-qtbase-devel $ It seems to be specific to Fedora. Looking up the qt5-qtbase spec file, even the Qt5.pc file is generated there. The moc variable is added there to help finding MOC, but why not also UIC? All binaries get renamed to avoid a conflict, but I couldn't find a helper script to make them available in path again. I think of a shell file in a fixed location one could source. And why isn't any of this documented in the package description? It looks like one could simply prepend /usr/lib64/qt5/bin to $PATH to make available the executables, which are renamed to avoid conflicts with other Qt versions. $ rpm -qi qt5-qtbase-devel|tail -2 Description : Development files for qt5-qtbase. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Qt 5 Fedora 21 packages
There are several strategies: * The bin-qt5 convention is already used by most distributions, so many applications/tools have adapted to it already. If you're aware of any that haven't yet, I'd be happy to help produce upstreamable patches to implement such support. * qt5-qtbase-devel provides rpm macros (in /usr/lib/rpm/macros.d/macros.qt5) that are useful during package creation, including: %_qt5_qmake %_qt5_bindir As you noted, one way to ensure Qt5 gets used is to prepend %_qt5_bindir to $PATH. This is essentially what kf5's %_cmake_kf5 (and similarly %_cmake_kde4) macros do. * As far as 'moc', that's not *usually* a tool an end-user typically runs, so we've never seen a need to provide easy access (via pkg-config, or rpm macro). If you have a justifiable use-case, we can certainly add it. * there's a developer tool 'qtchooser' that allows users to switch between default Qt developer environments. For the Qt5 qmake case, $ qtchooser -qt=qt5 -run-tool=qmake qtchooser is a little controversial (not universally endorsed by the kde- sig), so currently it is not recommended to rely on it in any fedora package builds. -- Rex Michael Schwendt wrote: Some confusion here trying to use Fedora's Qt 5 packages, and it seems they cannot be use quickly. $ rpm -qa qt5\*|sort qt5-qtbase-5.3.2-3.fc21.x86_64 qt5-qtbase-devel-5.3.2-3.fc21.x86_64 qt5-qtbase-gui-5.3.2-3.fc21.x86_64 qt5-qtbase-ibase-5.3.2-3.fc21.x86_64 qt5-qtbase-mysql-5.3.2-3.fc21.x86_64 qt5-qtbase-odbc-5.3.2-3.fc21.x86_64 qt5-qtbase-postgresql-5.3.2-3.fc21.x86_64 qt5-qtbase-tds-5.3.2-3.fc21.x86_64 No moc in PATH, no uic either. Just moc-qt5 and uic-qt5. $ pkg-config --variable=moc Qt5 /usr/lib64/qt5/bin/moc $ pkg-config --variable=uic Qt5 $ $ rpm -qf /usr/lib64/qt5/bin/moc qt5-qtbase-devel-5.3.2-3.fc21.x86_64 No documentation in that package: $ rpm -qd qt5-qtbase-devel $ It seems to be specific to Fedora. Looking up the qt5-qtbase spec file, even the Qt5.pc file is generated there. The moc variable is added there to help finding MOC, but why not also UIC? All binaries get renamed to avoid a conflict, but I couldn't find a helper script to make them available in path again. I think of a shell file in a fixed location one could source. And why isn't any of this documented in the package description? It looks like one could simply prepend /usr/lib64/qt5/bin to $PATH to make available the executables, which are renamed to avoid conflicts with other Qt versions. $ rpm -qi qt5-qtbase-devel|tail -2 Description : Development files for qt5-qtbase. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Qt 5 Fedora 21 packages
On Thu, 16 Oct 2014 07:24:53 -0500, Rex Dieter wrote: There are several strategies: * The bin-qt5 convention is already used by most distributions, so many applications/tools have adapted to it already. If you're aware of any that haven't yet, I'd be happy to help produce upstreamable patches to implement such support. * qt5-qtbase-devel provides rpm macros (in /usr/lib/rpm/macros.d/macros.qt5) that are useful during package creation, including: %_qt5_qmake %_qt5_bindir As you noted, one way to ensure Qt5 gets used is to prepend %_qt5_bindir to $PATH. This is essentially what kf5's %_cmake_kf5 (and similarly %_cmake_kde4) macros do. That (even if shortened) would be a great addition to %description or a README.Fedora. I mean, those are customisations and could/should be mentioned somewhere, so using the RPM packages does not require listing files and trying to solve the puzzle. * As far as 'moc', that's not *usually* a tool an end-user typically runs, so we've never seen a need to provide easy access (via pkg-config, or rpm macro). If you have a justifiable use-case, we can certainly add it. Did you mean UIC and not MOC? I'm aware of Qt based programs (my own ones included) that pregenerate source files from UI forms prior to wrapping up the source tarball release - but do other programs nowadays really ship files pregenerated using MOC? Btw, the program I've had to build is Audacious from git, the ongoing port to Qt with --enable-qt. It expects moc in path, and the plugins package expects uic in path. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Qt 5 Fedora 21 packages
Michael Schwendt wrote: Some confusion here trying to use Fedora's Qt 5 packages, and it seems they cannot be use quickly. Depends on the build system you (or the upstream project you're packaging) use: * CMake: just works * qmake: call qmake-qt5 and it'll find all the rest just fine * qbs: hopefully just works too, but not tested by me yet * anything else: see below I couldn't find a helper script to make them available in path again. [snip] It looks like one could simply prepend /usr/lib64/qt5/bin to $PATH to make available the executables, which are renamed to avoid conflicts with other Qt versions. There you have your wrapper script: export PATH=%{_qt5_bindir}:$PATH IMHO, it doesn't make sense to install a one-line script, one that would also have to be sourced rather than run normally. In addition, as Rex Dieter said, the upstream project's build setup should be fixed to look for the binaries with -qt5 suffixes in the long run. Kevin Kofler -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Qt 5 Fedora 21 packages
Rex Dieter wrote: * there's a developer tool 'qtchooser' that allows users to switch between default Qt developer environments. For the Qt5 qmake case, $ qtchooser -qt=qt5 -run-tool=qmake qtchooser is a little controversial (not universally endorsed by the kde- sig), so currently it is not recommended to rely on it in any fedora package builds. The reason I (and last we discussed this, also Than Ngo) don't endorse qtchooser is that it is IMHO the entirely wrong approach: What Qt version to use is a property of the project you're trying to build, not of your system or your user account. It shouldn't be the person building a project to decide what version of Qt to build it against (where usually only one will actually work), but the project's build setup. To be clear, using -run-tool as in Rex Dieter's example: qtchooser -qt=qt5 -run-tool=qmake will only work for qmake, where you can also just run qmake-qt5 directly and not use qtchooser at all. For other build systems, which run tools more than once and want to run just moc and uic, if you use qtchooser, you actually need to select the Qt version user-account-wide (eww!). And the same effect as qtchooser can be had with the simple: export PATH=%{_qt5_bindir}:$PATH which also has the advantage of only affecting that particular shell, and thus not break concurrent builds using other Qt versions. (And if you REALLY want to set it user-account-wide, that's what ~/.bash_profile is for.) Therefore, I see no reason whatsoever to even ship qtchooser in Fedora at all (as Rex Dieter is now doing, over my and Than's objections), let alone support it. It is really unfortunate that upstream decided to promote this broken solution instead of officially renaming the binaries to suffixed versions as we distributors have been doing for years. Kevin Kofler -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: Qt 5 Fedora 21 packages
On Thu, 16 Oct 2014 16:27:57 +0200, Kevin Kofler wrote: It looks like one could simply prepend /usr/lib64/qt5/bin to $PATH to make available the executables, which are renamed to avoid conflicts with other Qt versions. There you have your wrapper script: export PATH=%{_qt5_bindir}:$PATH As pointed out, I would have preferred a brief %description or README.Fedora as a quickstart rather than examining package contents and trying to figure out whether something is is the right way to do it and not only a work-around. It could also have been that setting environment variables would be _the_ way to point Qt detection configure scripts at the right places. Obviously, adjusting $PATH is what I've done as a work-around, albeit not using the RPM macro, because I only looked in /etc/rpm because I always forget about the new directory. It could have been more convenient to use the rpms. That's all! IMHO, it doesn't make sense to install a one-line script, one that would also have to be sourced rather than run normally. I mentioned a helper script based on the assumption that there might be more environment variables that need adjustment. ;-) -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct