Summary: | sci-libs/vtk-8.2.0: vtkProbeOpenGLVersion.cxx:(.text._ZN30vtkRenderingOpenGL2_ModuleInitD2Ev[_ZN30vtkRenderingOpenGL2_ModuleInitD | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | atoth, waebbl-gentoo |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=706426 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-info.txt
emerge-history.txt environment etc.portage.tbz2 logs.tbz2 sci-libs:vtk-8.2.0:20200516-094313.log.bz2 temp.tbz2 Fix CMake detection of GCC 10 |
Description
Toralf Förster
2020-05-16 12:01:45 UTC
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(+) |