/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o: in function vtkRenderingOpenGL2_ModuleInit::~vtkRenderingOpenGL2_ModuleInit(): vtkProbeOpenGLVersion.cxx:(.text._ZN30vtkRenderingOpenGL2_ModuleInitD2Ev[_ZN30vtkRenderingOpenGL2_ModuleInitD5Ev]+0x5): undefined reference to vtkRenderingOpenGL2_AutoInit_Destruct() /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o: in function main: vtkProbeOpenGLVersion.cxx:(.text.startup+0x21): undefined reference to vtkRenderer::New() /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: vtkProbeOpenGLVersion.cxx:(.text.startup+0x2a): undefined reference to vtkRenderWindow::New() ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop-abi32+64-20200505-162645 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-10.1.0 * clang version 10.0.0 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/10/bin /usr/lib/llvm/10 10.0.0 Available Python interpreters, in order of preference: [1] python3.7 [2] python3.6 [3] python3.8 (fallback) [4] python2.7 (fallback) Available Ruby profiles: [1] ruby24 (with Rubygems) [2] ruby25 (with Rubygems) * Available Rust versions: [1] rust-bin-1.43.1 [2] rust-1.43.1 * The following VMs are available for generation-2: *) IcedTea JDK 3.15.0 [icedtea-bin-8] Available Java Virtual Machines: [1] icedtea-bin-8 system-vm The Glorious Glasgow Haskell Compilation System, version 8.0.2 timestamp(s) of HEAD at this tinderbox image: /var/db/repos/gentoo Sat 16 May 2020 09:05:24 AM UTC emerge -qpvO sci-libs/vtk [ebuild N ] sci-libs/vtk-8.2.0 USE="X qt5 -R -all-modules (-aqua) -boost -doc (-examples) -ffmpeg -gdal -imaging -java -json -mpi -odbc -offscreen -postgres -python -rendering -tbb -tcl -test -theora -tk -views -web -xdmf2" PYTHON_SINGLE_TARGET="python3_7 -python3_6" VIDEO_CARDS="-nvidia"
Created attachment 639632 [details] emerge-info.txt
Created attachment 639634 [details] emerge-history.txt
Created attachment 639636 [details] environment
Created attachment 639638 [details] etc.portage.tbz2
Created attachment 639640 [details] logs.tbz2
Created attachment 639642 [details] sci-libs:vtk-8.2.0:20200516-094313.log.bz2
Created attachment 639644 [details] temp.tbz2
Could this be a gcc-10 issue? I have issues with vtk-8.2.0 from my overlay with gcc-10 too, with similar errors in the same binary but starting with FAILED: bin/vtkProbeOpenGLVersion : && /usr/bin/mpicxx -O2 -pipe -march=bdver2 -fstack-protector-strong -fstack-check -Wl,-lc -Wl,-lc -Wl,-O1 -Wl,--as-needed -Wl,- -defsym=__gentoo_check_ldflags__=0 Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/vtkProbeOpenGLVersion.cxx.o -o bin/vtkProbeOpenGLVersion -Wl,-rpath,/var/tmp/portage/sci-libs/vtk-8.2.0-r2/work/vtk-8.2.0_build/lib64 lib64/libvtkRenderingOpenGL2.so.1 lib64/libvtkRenderingCore.so.1 lib64/libvtkFiltersCore.so.1 /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so /usr/lib64/libXext.so /usr/lib64/libXt.so lib64/libvtkCommonExecutionModel.so.1 lib64/libvtkCommonDataModel.so.1 lib64/libvtkCommonTransforms.so.1 lib64/libvtkCommonMisc.so.1 lib64/libvtkCommonMath.so.1 lib64/libvtkCommonCore.so.1 /usr/lib64/libtbb.so -Wl,-rpath-link,/var/tmp/portage/sci-libs/vtk-8.2.0-r2/work/vtk-8.2.0_build/lib64 && : lib64/libvtkCommonTransforms.so.1: error: undefined reference to 'vtkMath::Identity3x3(float (*) [3])' lib64/libvtkCommonTransforms.so.1: error: undefined reference to 'vtkMath::Multiply3x3(float const (*) [3], float const (*) [3], float (*) [3])' followed by many more linker errors. Using gcc-8 circumvents this issue (gcc-8 is still installed due to cuda, but I haven't gcc-9 installed any more, but it worked with gcc-9 at early April, c.f. https://github.com/waebbl/waebbl-gentoo/issues/224).
vtk uses regular expressions to detect compiler version which they must be updating every time the gcc major version goes up. In this case, the regular expression in CMake/VTKGenerateExportHeader.cmake([3-9]\\.[0-9]\\.[0-9]*) fails to match "10.0.1". That fails to properly set COMPILER_HAS_HIDDEN_INLINE_VISIBILITY when needed, but seemingly only for the first run. This causes the visibility attributes to be missing on the function declarations, because the #defines for that are left empty. For some reason, COMPILER_HAS_HIDDEN_INLINE_VISIBILITY does get set later, leading to -fvisibility=hidden to be passed to the compiler, making all functions hidden, thus not exported from the shared object. This also gets "fixed" by rerunning cmake in the build directory.
Created attachment 641488 [details, diff] Fix CMake detection of GCC 10 Based on Pierre's comment above, this patch fixes the version regex to detect GCC versions with a 2-digit major version. This allows it to build with GCC 10 for me. I'm not sure this version check is even necessary (it's only applicable if someone is still using GCC 2.x for some reason). VTK 9 (which apparently can build with GCC 10) has completely rewritten the CMake modules system, so whatever fix they made would be difficult to backport. This patch makes as few changes as possible to 8.2.x.
(In reply to Tiernan Hubble from comment #10) > Created attachment 641488 [details, diff] [details, diff] > Fix CMake detection of GCC 10 > > Based on Pierre's comment above, this patch fixes the version regex to > detect GCC versions with a 2-digit major version. This allows it to build > with GCC 10 for me. > > I'm not sure this version check is even necessary (it's only applicable if > someone is still using GCC 2.x for some reason). VTK 9 (which apparently can > build with GCC 10) has completely rewritten the CMake modules system, so > whatever fix they made would be difficult to backport. This patch makes as > few changes as possible to 8.2.x. Thanks for the patch, works for me!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64839f71f4892ca57ce5e36648b9a2b1c8a60822 commit 64839f71f4892ca57ce5e36648b9a2b1c8a60822 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2020-06-06 09:19:08 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2020-06-06 09:41:50 +0000 sci-libs/vtk: Fix CMake detection of GCC 10 Thanks-to: Tiernan Hubble <tiernanhubble+gentoo@gmail.com> Closes: https://bugs.gentoo.org/723374 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch | 16 ++++++++++++++++ sci-libs/vtk/vtk-8.2.0.ebuild | 1 + 2 files changed, 17 insertions(+)