https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: sci-libs/vtk-9.1.0-r2 fails to compile (MUSL). Discovered on: amd64 (internal ref: tinderbox_musl) NOTE: This machine uses MUSL libc
Created attachment 814738 [details] build.log.xz build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Error(s) that match a know pattern in addition to what has been reported in the summary: /var/tmp/portage/sci-libs/vtk-9.1.0-r2/work/VTK-9.1.0/ThirdParty/loguru/vtkloguru/loguru.cpp:98:18: fatal error: execinfo.h: No such file or directory FAILED: ThirdParty/loguru/vtkloguru/CMakeFiles/loguru.dir/loguru.cpp.o /var/tmp/portage/sci-libs/vtk-9.1.0-r2/work/VTK-9.1.0/ThirdParty/loguru/vtkloguru/loguru.cpp:98:18: fatal error: execinfo.h: No such file or directory
On a first try to analyze this issue, I think we have a few options on how to handle this. First, easiest but dirty would be to package.mask vtk on musl (maybe temporary until we have a proper fix?) Second, less intrusive, the package has an option VTK_ENABLE_LOGGING which triggers building vtkloguru, so we can add a USE flag and package.use.force it on musl to be disabled. However, despite the fact there's an option for it, I never tried to build vtk with this option OFF and have seen it kind of mandatory for a properly working build. However: /var/tmp/portage/sci-libs/vtk-9.1.0-r2/work/VTK-9.1.0 $ find . -type f -exec grep -H execinfo {} \; ./Utilities/KWSys/vtksys/kwsysPlatformTestsCXX.cxx:# include <execinfo.h> ./Utilities/KWSys/vtksys/SystemInformation.cxx:# include <execinfo.h> ./Utilities/KWSys/vtksys/CMakeLists.txt:# KWSYS_NO_EXECINFO = Do not use execinfo. ./Utilities/KWSys/vtksys/CMakeLists.txt: # it's in libexecinfo ./Utilities/KWSys/vtksys/CMakeLists.txt: find_library(EXECINFO_LIB "execinfo") ./Utilities/KWSys/vtksys/CMakeLists.txt: CHECK_INCLUDE_FILE_CXX("execinfo.h" KWSYS_CXX_HAS_EXECINFOH) ./ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/thirdparty/loguru/vtkmloguru/loguru.cpp: #include <execinfo.h> // for backtrace ./ThirdParty/netcdf/vtknetcdf/libhdf5/hdf5debug.c:#include <execinfo.h> ./ThirdParty/netcdf/vtknetcdf/libdispatch/nclog.c:#include <execinfo.h> ./ThirdParty/netcdf/vtknetcdf/config.h.in:/* Define to 1 if you have the <execinfo.h> header file. */ ./ThirdParty/loguru/vtkloguru/loguru.cpp: #include <execinfo.h> // for backtrace AFAICS, the vtksys module has logic for handling execinfo.h including an option KWSYS_NO_EXECINFO we could enable if we ever get into trouble with this module. From what I can see from the build log however, the package seems to handle a missing execinfo.h for this module correctly. The vtkm loguru is IMO not being built, because the main vtkloguru will being used. This is relevant only if vtkm is being built as an external module which is currently not supported by upstream. The netcdf #include's *shouldn't* be an issue either, as we use external libraries where they are available and allowed and currently we don't seem to have issues with netcdf on musl. We also might report to upstream and ask if it's possible to add some logic to vtkloguru, similar to how it's done in vtksys to handle the execinfo case more detailed. WDYT?
On tests with vtk-9.2.2 it looks like logging can be disabled safely. I'm gonna add a USE flag for this.
Since vtk uses loguru unchanged, I link an upstream bug report on this.
Also see this discussion on vtk discourse: https://discourse.vtk.org/t/possible-issue-in-vtkloguru-with-musl-in-9-1-0/9526
Disable logging on musl is the way which is recommend by VTK upstream, until the issue is solved by loguru upstream.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b7393da42ee0482c5886b988257c9ceacd7ec9f commit 6b7393da42ee0482c5886b988257c9ceacd7ec9f Author: Bernd Waibel <waebbl-gentoo@posteo.net> AuthorDate: 2022-10-04 20:57:04 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-12 23:06:27 +0000 sci-libs/vtk: fix build on musl - Add logging USE flag to be able to disable it for musl - Re-keyword temporarily dropped arm64 Bug: https://bugs.gentoo.org/873601 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/27626 Signed-off-by: Sam James <sam@gentoo.org> sci-libs/vtk/metadata.xml | 1 + sci-libs/vtk/{vtk-9.1.0-r3.ebuild => vtk-9.1.0-r4.ebuild} | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=036aea33c5ecded8413417a9431370440347cfd5 commit 036aea33c5ecded8413417a9431370440347cfd5 Author: Bernd Waibel <waebbl-gentoo@posteo.net> AuthorDate: 2022-10-04 20:51:52 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-12 23:06:27 +0000 profiles: mask logging USE flag on sci-libs/vtk The loguru module doesn't build on musl. Mask it until it's fixed upstream. Bug: https://bugs.gentoo.org/873601 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Signed-off-by: Sam James <sam@gentoo.org> profiles/features/musl/package.use.mask | 4 ++++ 1 file changed, 4 insertions(+)