Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723374 - sci-libs/vtk-8.2.0: vtkProbeOpenGLVersion.cxx:(.text._ZN30vtkRenderingOpenGL2_ModuleInitD2Ev[_ZN30vtkRenderingOpenGL2_ModuleInitD
Summary: sci-libs/vtk-8.2.0: vtkProbeOpenGLVersion.cxx:(.text._ZN30vtkRenderingOpenGL2...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-05-16 12:01 UTC by Toralf Förster
Modified: 2020-09-25 07:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.60 KB, text/plain)
2020-05-16 12:01 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,328.71 KB, text/plain)
2020-05-16 12:01 UTC, Toralf Förster
Details
environment (environment,213.61 KB, text/plain)
2020-05-16 12:01 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,20.15 KB, application/x-bzip)
2020-05-16 12:01 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,10.29 KB, application/x-bzip)
2020-05-16 12:02 UTC, Toralf Förster
Details
sci-libs:vtk-8.2.0:20200516-094313.log.bz2 (sci-libs:vtk-8.2.0:20200516-094313.log.bz2,39.23 KB, application/x-bzip)
2020-05-16 12:02 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,83.01 KB, application/x-bzip)
2020-05-16 12:02 UTC, Toralf Förster
Details
Fix CMake detection of GCC 10 (cmake-gcc10-fix.patch,740 bytes, patch)
2020-05-24 21:26 UTC, Tiernan Hubble
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-05-16 12:01:45 UTC
/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"
Comment 1 Toralf Förster gentoo-dev 2020-05-16 12:01:49 UTC
Created attachment 639632 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-05-16 12:01:52 UTC
Created attachment 639634 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-05-16 12:01:55 UTC
Created attachment 639636 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-05-16 12:01:58 UTC
Created attachment 639638 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-05-16 12:02:01 UTC
Created attachment 639640 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-05-16 12:02:04 UTC
Created attachment 639642 [details]
sci-libs:vtk-8.2.0:20200516-094313.log.bz2
Comment 7 Toralf Förster gentoo-dev 2020-05-16 12:02:09 UTC
Created attachment 639644 [details]
temp.tbz2
Comment 8 Bernd 2020-05-18 11:40:52 UTC
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).
Comment 9 Pierre Willenbrock 2020-05-19 20:21:12 UTC
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.
Comment 10 Tiernan Hubble 2020-05-24 21:26:28 UTC
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.
Comment 11 Attila Tóth 2020-06-03 18:06:50 UTC
(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!
Comment 12 Larry the Git Cow gentoo-dev 2020-06-06 09:42:07 UTC
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(+)