Compilation testers needed

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Compilation testers needed

Post by chennes »

In PR #7647 I am making some changes to our cMake scripts as the first step toward supporting Qt6. Most critically, however, is that I need to not break everyone's current Qt5 compilations! I'd appreciate some additional testers who could check out that PR and try compiling it on their system and report back the results. You should be able to compile the same way you always have, with no apparent changes. So, if you are a self-compiler and you find yourself just sitting around today thinking "gee, I wonder how I can help out with FreeCAD"... now is your chance :D .

If you don't know how to check out a GitHub PR using git, here's a quick set of steps to get you up and running. I assume you already have a clone of the main repo, represented by the "FreeCAD-src" directory name below (change the name as needed, obviously). If that's not the case, start with a git clone https://github.com/FreeCAD/FreeCAD FreeCAD-src before the following).

Code: Select all

cd FreeCAD-src
git fetch origin pull/7647/head:pr/7647
git worktree add ../FreeCAD-pr7647-src pr/7647
cd ../
mkdir FreeCAD-pr7647-build
cd FreeCAD-pr7647-build
At this point you have a new checkout of PR 7647 that won't interfere with your original FreeCAD. Run cMake and your compiler however you usually do.

If you are feeling really adventurous you can see if cMake runs properly with FREECAD_QT_VERSION set to 6 -- it won't compile, but cMake should run (possibly after you set Qt6_DIR to your installation location, and also possibly after installing PySide6 via pip or your system package manager).

Please report back your system details and results either here or in that PR.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
jjubenv
Posts: 19
Joined: Sat Feb 09, 2019 1:41 am

Re: Compilation testers needed

Post by jjubenv »

I was able to successfully build and run the tests following the instructions above. I'd try to do your QT6 ask, but I'm not sure what results to post (if I could even do what was asked). Can I have QT5 and QT6 installed through my package manager (apt) without breaking things?

Build command:

Code: Select all

make -j$(nproc --ingore=2)
cd bin
FreeCAD --run-test 0
Let me know if you need more details.

Regards,
Jake

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.30767 +1 (Git)
Build type: Unknown
Branch: pr/7647
Hash: 738fb63da4d4de80bf7a670704eae3c2e54dce96
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.1
Locale: English/Canada (en_CA)
Installed mods: 
  * A2plus 0.4.59e
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Compilation testers needed

Post by chennes »

Thanks for testing, that's exactly what I need.
jjubenv wrote: Sat Oct 29, 2022 10:35 pm Can I have QT5 and QT6 installed through my package manager (apt) without breaking things?
I can't make any promises about the compilation of non-FreeCAD software, but FreeCAD's compilation will work just fine if you have Qt5 and Qt6 both installed. For right now, it will auto-select Qt5, but can be overridden by setting FREECAD_QT_VERSION to 6 either in the cMake GUI or your cMake command line (e.g. cmake -DFREECAD_QT_VERSION=6 ../FreeCAD-pr7647-src). To test that you just want to make sure cMake runs to completion and prints out the appropriate Qt6 version information in the summary report. No point in trying to compile it :) .
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: Compilation testers needed

Post by waebbl »

jjubenv wrote: Sat Oct 29, 2022 10:35 pm Can I have QT5 and QT6 installed through my package manager (apt) without breaking things?
IMO your package manager should warn you, if two packages can't be installed at the same time.
Haavard
Posts: 221
Joined: Wed Feb 17, 2021 10:48 pm

Re: Compilation testers needed

Post by Haavard »

I get the following error:

Code: Select all

CMake Error at /usr/lib64/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by
  "Qt5WebEngineWidgets" with any of the following names:

    Qt5WebEngineWidgetsConfig.cmake
    qt5webenginewidgets-config.cmake

  Add the installation prefix of "Qt5WebEngineWidgets" to CMAKE_PREFIX_PATH
  or set "Qt5WebEngineWidgets_DIR" to a directory containing one of the above
  files.  If "Qt5WebEngineWidgets" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  cMake/FreeCAD_Helpers/SetupQt.cmake:21 (find_package)
  CMakeLists.txt:69 (include)
I have this package installed, so it looks like the path is missing:

Code: Select all

Package qt5-qtwebengine-5.15.10-2.fc36.x86_64 is already installed.
(Fedora 36)
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: Compilation testers needed

Post by waebbl »

Haavard wrote: Sun Oct 30, 2022 9:44 am

Code: Select all

If "Qt5WebEngineWidgets" provides a separate development package or
  SDK, be sure it has been installed.
I have this package installed, so it looks like the path is missing:

Code: Select all

Package qt5-qtwebengine-5.15.10-2.fc36.x86_64 is already installed.
(Fedora 36)
Is there a separate -dev package for QtWebEngine available and installed? Or does Fedora have a separate QtWebEngineWidgets package?
Can you see if you have a QtWebEngineWidgets dir where your cmake config files are stored, i.e. /usr/lib/cmake/Qt5WebEngineWidgets and it contains a file Qt5WebEngineWidgetsConfig.cmake. Could this file be located in another path?
Haavard
Posts: 221
Joined: Wed Feb 17, 2021 10:48 pm

Re: Compilation testers needed

Post by Haavard »

waebbl wrote: Sun Oct 30, 2022 11:27 am Is there a separate -dev package for QtWebEngine available and installed?
This was the issue, thanks. qt5-qtwebengine-devel must have been removed somehow.

Anyway, compiles fine here ;)

Code: Select all

OS: Fedora Linux 36 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.30769 (Git)
Build type: Release
Branch: pr/7647
Hash: c472df9cb01ec16596773e30dfbb7e3a1aaa765f
Python 3.10.7, Qt 5.15.6, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.0
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4 0.12.4
  * fasteners 0.4.16
Haavard
Posts: 221
Joined: Wed Feb 17, 2021 10:48 pm

Re: Compilation testers needed

Post by Haavard »

chennes wrote: Sat Oct 29, 2022 8:51 pm

Code: Select all

cd ../
mkdir ../FreeCAD-pr7647-build
cd ../FreeCAD-pr7647-build
This should perhaps be

Code: Select all

cd ../
mkdir FreeCAD-pr7647-build
cd FreeCAD-pr7647-build
? :)
jjubenv
Posts: 19
Joined: Sat Feb 09, 2019 1:41 am

Re: Compilation testers needed

Post by jjubenv »

I get this with the QT6 build:

Code: Select all

-- Could NOT find Qt6UiTools (missing: Qt6UiTools_DIR)s
CMake Error at cMake/FreeCAD_Helpers/SetupQt.cmake:21 (find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt component "UiTools".

  Expected Config file at
  "/usr/lib/x86_64-linux-gnu/cmake/Qt6UiTools/Qt6UiToolsConfig.cmake" does
  NOT exist

  

Call Stack (most recent call first):
  CMakeLists.txt:69 (include)

This is the ui tools package I have installed:

Code: Select all

apt show libqt6uitools6 -a

Package: libqt6uitools6
Version: 6.3.1-2~bpo11+1
Priority: optional
Section: libs
Source: qt6-tools
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Installed-Size: 656 kB
Provides: qt6-uitools-abi (= 6.3.1)
Depends: libc6 (>= 2.14), libqt6core6 (>= 6.3.1+dfsg~), libqt6gui6 (>= 6.3.1+dfsg~), libqt6openglwidgets6 (>= 6.3.1+dfsg~), libqt6widgets6 (>= 6.3.1+dfsg~), libstdc++6 (>= 5)
Homepage: https://www.qt.io/developers/
Download-Size: 155 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian bullseye-backports/main amd64 Packages
Description: Qt 6 UI tools library
Same system info as my post above.
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Compilation testers needed

Post by chennes »

Haavard wrote: Sun Oct 30, 2022 12:09 pm This should perhaps be

Code: Select all

cd ../
mkdir FreeCAD-pr7647-build
cd FreeCAD-pr7647-build
? :)
Haha, that's what I get for writing code in the editor here, instead of using an actual command line! Yes, of course you're right -- I'll edit the post.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply