Created attachment 245974 [details] patch to find the right sed and to use grass8 instead of grass7 Scenario: - FreeBSD 12.4 latest - ports latest - using portmaster to upgrade ports - graphics/qgis has been bumped to 3.34.0 Result: - build fails with wrong version for sed - build uses grass7 although grass8 is already available Expected result: - build should succeed and use grass8 Patch attached. -- Martin
Created attachment 245975 [details] improved patch textproc/flex is only needed on FreeBSD < 13. Update the patch.
Created attachment 245991 [details] patch to find the right sed and to use grass8 instead of grass7 One patch was missing...
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a5b13ac5f0508383b447fc52b994975662f94f0f commit a5b13ac5f0508383b447fc52b994975662f94f0f Author: Rainer Hurling <rhurlin@FreeBSD.org> AuthorDate: 2023-10-30 16:59:22 +0000 Commit: Rainer Hurling <rhurlin@FreeBSD.org> CommitDate: 2023-10-30 17:07:30 +0000 graphics/qgis: Readd patch to fix flex version For FreeBSD versions < 1300501 the existing version of FLEX in base is unsufficient. Readd old patch to install the ports version of FLEX. CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find FLEX: Found unsuitable version "2.5.37", but required is at least "2.6" (found /usr/bin/flex) Call Stack (most recent call first): /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake/Modules/FindFLEX.cmake:269 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:339 (find_package) Thanks to Martin Birgmeier <d8zNeCFG@aon.at> for reporting. PR: 274793 graphics/qgis/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)
Created attachment 245997 [details] patch to find the right sed and to use grass8 instead of grass7 should test before submitting, even if it takes a while ;-)
Hi Martin, Thanks for reporting and the patches. In a first commit (a5b13ac5f) I fixed the problem with the wrong FLEX version for OS_VERSIONS <= 1300501. With QGIS 3.34.0 I had removed this patch by mistake. Now my old patch is back :) The following line in the pre-configure target should not be removed. It is needed when multiple Python versions are installed. Then cmake has problems to find the default version without this line: ${MKDIR} ${CONFIGURE_WRKSRC}/bin && ${LN} -s ${PYTHON_CMD} ${CONFIGURE_WRKSRC}/bin/python3 I intend to switch from GRASS 7 to GRASS 8 in another commit, as suggested in your patch. There are still some tests necessary. Thanks again, Rainer
Hi Rainer, Thank you for this. In fact there still seem to be some errors when building with grass8, even if the build ultimately succeeds (and qgis seems to run fine, at least with the first simple tests). As you write, more tests are needed. -- Martin
(In reply to Rainer Hurling from comment #5) There is one issue with the pre-configure target: It inhibits restarting a make because the link already exists. It should be removed before being created. -- Martin
Created attachment 246655 [details] qgis-3.34.1 with grass 8 (In reply to Rainer Hurling from comment #5) This is just to let you know that I am running QGIS with GRASS 8 since a month. For my purposes it seems to be working. With the upgrade to 3.34.1 I just reverted the "CMAKE_OFF += WITH_GRASS8" part, and it again seems to be o.k. What kind of breakage should I be expecting with GRASS 8? -- Martin p.s. Attached the current diff from mainline ports.
(In reply to Martin Birgmeier from comment #8) Hi Martin, Thanks for the info about GRASS 8, that's good information. I have (temporarily) disabled support for GRASS 8 in QGIS because a QGIS developer (upstream) told me about pending difficulties with GRASS 8 integration in QGIS in general. He is working on it and hopes to have everything ready by the end of the year so that support for GRASS 7 can even be deprecated in QGIS. One difficulty with the port so far is that I have entries in pkg-plist for either GRASS 7 or GRASS 8. I am currently working on a patch that should temporarily allow a choice in the support of GRASS 7 or GRASS 8. This will hopefully give users who have been using GRASS 7 enough time to migrate to GRASS 8.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=89af289ed2be9979a283b58518303d7c37552f8e commit 89af289ed2be9979a283b58518303d7c37552f8e Author: Rainer Hurling <rhurlin@FreeBSD.org> AuthorDate: 2023-12-27 06:21:08 +0000 Commit: Rainer Hurling <rhurlin@FreeBSD.org> CommitDate: 2023-12-27 06:30:03 +0000 graphics/qgis: Update to 3.34.2 Introduce radio option to choose between GRASS7 and GRASS8 (default) or none of both. Changelog: https://github.com/qgis/QGIS/compare/final-3_34_1%5E...final-3_34_2 PR: 274793 graphics/qgis/Makefile | 39 +- graphics/qgis/distinfo | 6 +- .../qgis/files/patch-cmake_FindGRASS.cmake (new) | 17 + graphics/qgis/pkg-plist | 877 +++++++++++---------- 4 files changed, 491 insertions(+), 448 deletions(-)
Hi Martin, I have just committed QGIS 3.34.2. With this commit I have introduced the possibility to choose between the GRASS7 and GRASS8 options using radio buttons and even to build without GRASS. Can you please check if everything builds, installs and works as desired in your scenario. Thank you very much.
Created attachment 247281 [details] create python3 link only if it does not yet exist Hi Rainer, Thank you, it builds perfectly. I'll install and test it on my work machine in the next days, and I do not expect any issues. I have added a small patch to create the python3 link only if it does not already exist. This makes it easier to restart builds that have aborted for any reason (for example, by interrupting them manually). An alternative to the proposed solution might be to forcibly remove the link before creating it. Furthermore, I have found the following warnings in the build log. I guess the first one is an artifact of the GRASSx_CMAKE_* Makefile logic. In the second the Python3_EXECUTABLE line seems to be interesting. ---------------------------------------------------------------------------- ===> Performing out-of-source build /bin/mkdir -p /usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/graphics/qgis/work/.build CMake Warning: Ignoring extra path from command line: "/usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/graphics/qgis/work/.build/WITH_GRASS8" ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -- Generating done (4.4s) CMake Warning: Manually-specified variables were not used by the project: BOOST_PYTHON_SUFFIX ENABLE_TESTING FETCHCONTENT_FULLY_DISCONNECTED Python3_EXECUTABLE Python_ADDITIONAL_VERSIONS -- Build files have been written to: /usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/graphics/qgis/work/.build ===> Building for qgis-3.34.2 ---------------------------------------------------------------------------- Best regards, Martin
Hi Martin, Thanks for the feedback, the patch and the log issues. I will investigate, but that will take some days.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=02b2e1bdf494faf52c2827c7116cccb08e948129 commit 02b2e1bdf494faf52c2827c7116cccb08e948129 Author: Rainer Hurling <rhurlin@FreeBSD.org> AuthorDate: 2024-01-12 16:10:17 +0000 Commit: Rainer Hurling <rhurlin@FreeBSD.org> CommitDate: 2024-01-12 16:31:16 +0000 graphics/qgis: Avoid CMake warning MAKE_GRASS CMake Warning: Ignoring extra path from command line: "/usr/ports/graphics/qgis/work/.build/WITH_GRASS8" This happens, because of unneeded CMAKE_OFF=WITH_GRASSx. Not functional change, not bump of PORTREVISION necessary. PR: 274793 Reported by: Martin Birgmeier <d8zNeCFG@aon.at> MFH: 2024Q1 graphics/qgis/Makefile | 2 -- 1 file changed, 2 deletions(-)
A commit in branch 2024Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bc450d2923d85dca0c8d871adc45779c009d3115 commit bc450d2923d85dca0c8d871adc45779c009d3115 Author: Rainer Hurling <rhurlin@FreeBSD.org> AuthorDate: 2024-01-12 16:10:17 +0000 Commit: Rainer Hurling <rhurlin@FreeBSD.org> CommitDate: 2024-01-12 16:32:33 +0000 graphics/qgis: Avoid CMake warning MAKE_GRASS CMake Warning: Ignoring extra path from command line: "/usr/ports/graphics/qgis/work/.build/WITH_GRASS8" This happens, because of unneeded CMAKE_OFF=WITH_GRASSx. Not functional change, not bump of PORTREVISION necessary. PR: 274793 Reported by: Martin Birgmeier <d8zNeCFG@aon.at> MFH: 2024Q1 (cherry picked from commit 02b2e1bdf494faf52c2827c7116cccb08e948129) graphics/qgis/Makefile | 2 -- 1 file changed, 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ae0bf0d52f69edaad5ff3f99c7b6c4e0838064eb commit ae0bf0d52f69edaad5ff3f99c7b6c4e0838064eb Author: Rainer Hurling <rhurlin@FreeBSD.org> AuthorDate: 2024-01-12 16:37:36 +0000 Commit: Rainer Hurling <rhurlin@FreeBSD.org> CommitDate: 2024-01-12 16:37:36 +0000 graphics/qgis-ltr: Avoid CMake warning MAKE_GRASS CMake Warning: Ignoring extra path from command line: "/usr/ports/graphics/qgis/work/.build/WITH_GRASS8" This happens, because of unneeded CMAKE_OFF=WITH_GRASSx. Not functional change, not bump of PORTREVISION necessary. PR: 274793 Reported by: Martin Birgmeier <d8zNeCFG@aon.at> MFH: 2024Q1 graphics/qgis-ltr/Makefile | 2 -- 1 file changed, 2 deletions(-)
A commit in branch 2024Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=efa0602848b5305a0693b08a4973a347321d1a32 commit efa0602848b5305a0693b08a4973a347321d1a32 Author: Rainer Hurling <rhurlin@FreeBSD.org> AuthorDate: 2024-01-12 16:37:36 +0000 Commit: Rainer Hurling <rhurlin@FreeBSD.org> CommitDate: 2024-01-12 16:42:06 +0000 graphics/qgis-ltr: Avoid CMake warning MAKE_GRASS CMake Warning: Ignoring extra path from command line: "/usr/ports/graphics/qgis/work/.build/WITH_GRASS8" This happens, because of unneeded CMAKE_OFF=WITH_GRASSx. Not functional change, not bump of PORTREVISION necessary. PR: 274793 Reported by: Martin Birgmeier <d8zNeCFG@aon.at> MFH: 2024Q1 (cherry picked from commit ae0bf0d52f69edaad5ff3f99c7b6c4e0838064eb) graphics/qgis-ltr/Makefile | 2 -- 1 file changed, 2 deletions(-)
(In reply to Martin Birgmeier from comment #12) Hi Martin, The reason for the first CMake warning about WITH_GRASS8 came from the GRASS7_CMAKE_OFF=WITH_GRASS8 and GRASS8_CMAKE_OFF=WITH_GRASS7 lines in the Makefile. Obviously, they are not needed. All is done by the GRASSx_BOOL=WITH_GRASSx lines, as described in [1]. I think, this one is resolved ;) [1] https://docs.freebsd.org/en/books/porters-handbook/makefiles/#options-cmake_bool Your second issue with the CMake warning about Python3_EXECUTABLE seems to come from the ports framework. If one add USES=python, this line appears in the configure phase. So most probably nothing, I can solve. Thanks again for your report. I will close this PR now.
Hi Rainer, Thank you for all your efforts! Best regards, Martin