astro/stellarium finds Qt6 if devel/qt6-base is installed, but as astro/stellarium/Makefile is created for Qt5, fails to build if x11-toolkits/qt6-charts is not installed. As Qt6 is not yet widely used on ports, it would be better ignoring Qt6 and force Qt5 for now.
Created attachment 237163 [details] Patch to force Qt5 even if devel/qt6-base is installed. Patch to force Qt5 even if devel/qt6-base is installed. Applicable over /usr/ports. This fixed build at least for me.
Forgot to quote error mode. ===> Performing out-of-source build /bin/mkdir -p /usr/ports/astro/stellarium/work/.build -- Found CMake 3.24.0 -- The C compiler identification is Clang 14.0.5 -- The CXX compiler identification is Clang 14.0.5 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Platform: FreeBSD-13.1-STABLE (amd64) -- Building Stellarium 1.0 (v1.22.3; Mode: Release) -- Found Threads: TRUE -- Found Qt6: /usr/local/lib/qt6/bin/qmake (found suitable version 6.4.0) -- Found OpenGL: /usr/local/lib/libOpenGL.so -- Found WrapOpenGL: TRUE -- Found XKB: /usr/local/lib/libxkbcommon.so (found suitable version "1.4.1", minimum required is "0.5.0") -- Found WrapVulkanHeaders: /usr/local/include -- Could NOT find Qt6Charts (missing: Qt6Charts_DIR) CMake Error at CMakeLists.txt:572 (FIND_PACKAGE): Found package configuration file: /usr/local/lib/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 required Qt component "Charts". Expected Config file at "/usr/local/lib/cmake/Qt6Charts/Qt6ChartsConfig.cmake" does NOT exist Configuring with --debug-find-pkg=Qt6Charts might reveal details why the package was not found. Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some of the path variables that find_package uses to try and find the package. -- Configuring incomplete, errors occurred! See also "/usr/ports/astro/stellarium/work/.build/CMakeFiles/CMakeOutput.log". See also "/usr/ports/astro/stellarium/work/.build/CMakeFiles/CMakeError.log". *** Error code 1 Stop. make[1]: stopped in /usr/ports/astro/stellarium *** Error code 1 Stop. make: stopped in /usr/ports/astro/stellarium egrep: empty (sub)expression ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20221009-42535-rdudr6 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=stellarium-0.22.2 UPGRADE_PORT_VER=0.22.2 make WITH+="NVIDIA,NVIDIA_GL" ** Fix the problem and try again.
Moin moin it would likely make sense to add qt5/qt6 flavors to the port. mfg Toibas
(In reply to Tobias C. Berner from comment #3) > it would likely make sense to add qt5/qt6 flavors to the port. Yes, it would be nice I guess, but it feels like our Qt6 framework is a bit premature and counterintuitive. E.g. find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED) maps straight to ``USE_QT=core gui'' with Qt5, but there are no such components with Qt6, etc.
(In reply to Alexey Dokuchaev from comment #4) The idea is to split Qt6 once the package/ports have sub-packages. mfg Tobias
(In reply to Alexey Dokuchaev from comment #4) devel/qt6-base incorporates multiple components including core, concurrent, dbus, gui and some more. And some more are ported independently. Not sure all components required by stellarium are already ported to FreeBSD. But first of all, to allow Qt6 build of stellarium, all dependencies should be FLAVORized without conflicting each other. It could be a lot of work to avoid conflicting. A quick and rough investigation, astro/calcmysky and devel/qxlsx seems to be able to build with Qt6. (Just looking into upstream CMakeLists.txt.) But maybe built package would conflict each other as is.
(In reply to Tomoaki AOKI from comment #6) If it only requires core, then it USES=qt:6 and USE_QT=base is enough. The only thing that the ports tree is missing for Qt6 is the webengine related stuff. mfg Tobias
(In reply to Tomoaki AOKI from comment #6) > A quick and rough investigation, astro/calcmysky and devel/qxlsx seems to be > able to build with Qt6. Yes, they are. > But maybe built package would conflict each other as is. Right, that's one of the reasons why I've eventually dropped the "two flavors" idea. Maybe I'll revisit it later, but prefer to stick to Qt5 for the time being.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a76969f7c21a86ac26dc3af3a4d8907960934552 commit a76969f7c21a86ac26dc3af3a4d8907960934552 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2022-11-04 09:43:12 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2022-11-04 09:43:12 +0000 astro/{calcmysky,stellarium}: update both ports to the latest versions It's unfortunate transition time when they cannot be updated separately, not at least without some ugly patching. Make Stellarium use static release tarball instead of the generated by GitHub one. While currently it does not win us much, next version will be additionally offering smaller .tar.xz distfile which we'll switch to more easily. Enforce Qt5 build for now. While Stellarium and its dependencies are Qt6-ready, providing correct and coherent flavors for all of them is too much work for little gain. Everyone should be using Qt5 anyways. PR: 266915 astro/calcmysky/Makefile | 4 +- astro/calcmysky/distinfo | 6 +- astro/calcmysky/pkg-descr | 4 +- astro/calcmysky/pkg-plist | 8 +- astro/stellarium/Makefile | 22 ++---- astro/stellarium/distinfo | 12 ++- astro/stellarium/pkg-plist | 180 +-------------------------------------------- 7 files changed, 26 insertions(+), 210 deletions(-)