Many ports fail on armv7 with the same class of error message: -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at /wrkdirs/usr/ports/graphics/pfstools/work/.build/CMakeFiles/CMakeTmp/CMakeLists.txt:14 (add_executable): No SOURCES given to target: cmTC_7730d CMake Error at /usr/local/share/cmake/Modules/FindOpenMP.cmake:261 (try_compile): Failed to generate test project build system. Call Stack (most recent call first): /usr/local/share/cmake/Modules/FindOpenMP.cmake:537 (_OPENMP_GET_FLAGS) CMakeLists.txt:39 (find_package) -- Configuring incomplete, errors occurred! See also "/wrkdirs/usr/ports/graphics/pfstools/work/.build/CMakeFiles/CMakeOutput.log". *** Error code 1 This affects at least the following ports (tested on 2023Q2): graphics/oyranos audio/fluidsynth cad/gmsh science/gromacs math/cimod lang/halide games/regoth misc/openmvg cad/FreeCAD graphics/cloudcompare math/blaze science/gnudatalanguage graphics/pfstool Without having investigated this at all, the cause may be connected with LLVM not supporting OpenMP on armv6/armv7. The offending file FindOpenMP.cmake is installed by devel/cmake-core. Unfortunately I am not very familiar with cmake and don't really have any idea on what the cause could be.
This looks like us shooting ourselves in the foot with a patch. Can you remove devel/cmake-core/files/patch-Modules_FindOpenMP.cmake and rebuild devel/cmake-core, then try your OpenMP-using ports again? I don't have any ARMv7 (well, there's a BeagleBone Black if I could find a suitable power supply and an infinite supply of patience). What's happening is that the code surrounding that patch has changed enough for the patch to still apply, but be invalid. None of the Tier-1 platforms seem to hit that code-path, which suggests that the patch isn't needed anymore.
Created attachment 241623 [details] devel/cmake-core: remove outdated FindOpenMP.cmake patch The attached patch removes the offending patch file. This did indeed fix the build for me on armv7. Currently testing on arm64. Is an exp run a good idea here?
Cmake works ok with this patch on arm64.
Request exp-run of all ports depending on devel/cmake-core, as discussed with diizzy.
I'll wait for the exp-run results.
Exp-run looks fine
Do I have permission to commit this patch?
Yes, please go ahead. (I should have said that while the exp-run was going on).
I don't know about MFH, though: the branches do not usually get CMake updates because they can be quite disruptive (generally: see the "fix <thing> ahead of CMake update" kind of commits, I think we had five ports with that this time, which is low)
(In reply to Adriaan de Groot from comment #9) About two dozen ports plus dependent ports are affected by this issue (basically any cmake port using OpenMP): graphics/oyranos audio/fluidsynth # cmake issues cad/gmsh science/gromacs # cmake issues math/cimod lang/halide games/regoth misc/openmvg cad/FreeCAD graphics/cloudcompare math/blaze science/gnudatalanguage graphics/pfstool misc/lightgbm misc/darknet science/openmodelica science/agrum biology/hyphy graphics/gmt graphics/luminance-qt5 graphics/digikam math/hmat-oss math/xlife++ math/fann graphics/openmvs math/ambit I would really love if MFH was granted for this one.
(In reply to Robert Clausecker from comment #10) Yep, MFH it please Dima, on behalf of ports-secteam
Will commit and MFH with my next batch.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b13bdddc804511e345e66f152d0e62b689b63cbb commit b13bdddc804511e345e66f152d0e62b689b63cbb Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-04-20 20:33:54 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-04-30 18:41:40 +0000 devel/cmake-core: remove outdated FindOpenMP.cmake patch This patch broke the build of any armv6/armv7 package that tried to use OpenMP. It was once appropriate, but is now no longer correct or needed. PR: 270954 MFH: 2023Q2 Approved by: ports-secteam (fluffy), adridg Tested by: portmgr (antoine, exp-run) devel/cmake-core/Makefile | 1 + .../files/patch-Modules_FindOpenMP.cmake (gone) | 105 --------------------- 2 files changed, 1 insertion(+), 105 deletions(-)
A commit in branch 2023Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5e5a4225dc993c5a939a8b3636362a6e0b4a3896 commit 5e5a4225dc993c5a939a8b3636362a6e0b4a3896 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-04-20 20:33:54 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-04-30 18:44:30 +0000 devel/cmake-core: remove outdated FindOpenMP.cmake patch This patch broke the build of any armv6/armv7 package that tried to use OpenMP. It was once appropriate, but is now no longer correct or needed. PR: 270954 MFH: 2023Q2 Approved by: ports-secteam (fluffy), adridg Tested by: portmgr (antoine, exp-run) (cherry picked from commit b13bdddc804511e345e66f152d0e62b689b63cbb) devel/cmake-core/Makefile | 1 + .../files/patch-Modules_FindOpenMP.cmake (gone) | 105 --------------------- 2 files changed, 1 insertion(+), 105 deletions(-)