Could not find a package configuration file provided by "Qt5UiTools"

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
freman
Posts: 1271
Joined: Tue Nov 27, 2018 10:30 pm

Could not find a package configuration file provided by "Qt5UiTools"

Postby freman » Mon Oct 07, 2019 8:59 am

Hi,

I am trying to move from the default py2/qt4 build of master to py3/qt5 since, despite not being the default build, it does seem to be the only thing which is supported by those working on the code.

py2/qt4 build of current master fails to open toolmanager so no existing tools can be accessed and no new tools can be added, it is unusable. In short py2 build is now DEAD despite being the default build option.

https://forum.freecadweb.org/viewtopic.php?f=15&t=39869

following the wiki guide for py3/qt5 I seem to be missing some package:

Code: Select all

CMake Error at cMake/FreeCAD_Helpers/SetupQt.cmake:72 (find_package):
  By not providing "FindQt5UiTools.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5UiTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5UiTools" with
  any of the following names:

    Qt5UiToolsConfig.cmake
    qt5uitools-config.cmake
This would seem to be about qttools but I already have these pkgs installed:

Code: Select all

Package qt5-qttools-devel-5.11.3-1.fc29.x86_64 is already installed.
Package qt5-qttools-5.11.3-1.fc29.x86_64 is already installed.
Since I have what I believe to be to corresponding package, it may be the lib sniffing is making some unwarranted assumptions about names and simply not finding what is in fact already there.

Any idea how I can fix that, is there another package I'm missing?
thx.

Info from my last working FreeCAD master.

OS: Linux (LXDE/LXDE)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18272 (Git)
Build type: Unknown
Branch: master
Hash: 88637aeb202b481a16cbd82c8767a0cc2745cfe1
Python version: 2.7.16
Qt version: 4.8.7


PS. looking at CmakeError.log it does not say anything about QT5 but fails to find pthread :

Code: Select all

Run Build Command(s):/bin/gmake cmTC_ec635/fast
/bin/gmake -f CMakeFiles/cmTC_ec635.dir/build.make CMakeFiles/cmTC_ec635.dir/build
gmake[1]: Entering directory '/~/freecad-master-py3-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ec635.dir/CheckFunctionExists.c.o
/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_ec635.dir/CheckFunctionExists.c.o   -c /usr/share/cmake/Modules/Check$
Linking C executable cmTC_ec635
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ec635.dir/link.txt --verbose=1
/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_ec635.dir/CheckFunctionExists.c.o  -o cmTC_ec635 -lpthreads
/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_ec635.dir/build.make:87: cmTC_ec635] Error 1
gmake[1]: Leaving directory '/~/freecad-master-py3-build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_ec635/fast] Error 2
Is one a corollary of the other and misreporting the root cause, or is this worse than we thought?
Last edited by freman on Thu Nov 14, 2019 8:07 pm, edited 1 time in total.
openBrain
Posts: 4868
Joined: Fri Nov 09, 2018 5:38 pm

Re: Could not find a package configuration file provided by "Qt5UiTools"

Postby openBrain » Mon Oct 07, 2019 11:08 am

This is weird as your packages seems to have non standard names.
Should be qttools5-dev instead of qt5-qttools-devel... Maybe this explains that CMake don't find it. ;)

There is also a package with a close name called qttools5-dev-tools but I'm not sure if it has a role here...
User avatar
freman
Posts: 1271
Joined: Tue Nov 27, 2018 10:30 pm

Re: Could not find a package configuration file provided by "Qt5UiTools"

Postby freman » Mon Oct 07, 2019 11:32 am

thanks, *-dev is the debian based distro nomenclature; *-devel is rpm based distros.

Fedora uses qt5- prefix since it supports qt4 versions on the same system.

This is just the package naming, it does not affect what is installed.

I did hit a naming problem last year where cmake was failing to find something and I had to edit the Makefile but I can't find it in my notes. ( It may have been on one of the dependancy libraries I also has to build locally.
Last edited by freman on Mon Oct 07, 2019 3:57 pm, edited 1 time in total.
openBrain
Posts: 4868
Joined: Fri Nov 09, 2018 5:38 pm

Re: Could not find a package configuration file provided by "Qt5UiTools"

Postby openBrain » Mon Oct 07, 2019 1:43 pm

Did you clear your building directory before compiling with Qt5 ? Are you compiling in-source or out-source ?
User avatar
freman
Posts: 1271
Joined: Tue Nov 27, 2018 10:30 pm

Re: Could not find a package configuration file provided by "Qt5UiTools"

Postby freman » Mon Oct 07, 2019 3:51 pm

thx, out of source build. Yes, I did rm -rf * before running cmake
NB there is no "compiling with " this does not complete cmake.

Also I don't find any mention of the qttools issue in CMakeError.log or CMakeOutput.log
User avatar
freman
Posts: 1271
Joined: Tue Nov 27, 2018 10:30 pm

Re: Could not find a package configuration file provided by "Qt5UiTools"

Postby freman » Fri Apr 17, 2020 8:34 am

Yes, IIRC the missing package for the qt tools on Fedora is qt5-qttools-static. Rather poorly named, it is not a static build.

Code: Select all

dnf install qt5-qttools-static
User avatar
PrzemoF
Posts: 3056
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Could not find a package configuration file provided by "Qt5UiTools"

Postby PrzemoF » Fri Apr 17, 2020 9:04 am

Great! In case you have future problem spec from the source code [1] is always a good starting point. Or checking what is being installed and executed in the nightly builds [2].

[1] https://gitlab.com/freecad/FreeCAD/-/bl ... eecad.spec
[2] https://copr.fedorainfracloud.org/coprs ... d/nightly/