cmake searches for MesaGL, then libGL due to the order set in the config file. Therefore, this is always finding MesaGL, instead of /usr/lib/libGL.so which is set by opengl-update. by changing the order in /usr/share/cmake/Modules/FindOpenGL.cmake, we can fix this Reproducible: Always Steps to Reproduce:
Created attachment 42597 [details, diff] Patch to fix opengl library search order in FindOpenGL.cmake
this should probably be sent upstream too
done http://www.vtk.org/Bug/bug.php?op=show&bugid=1287&pos=0
re Comment #1, can you post that as a unidiff?
Created attachment 42728 [details, diff] /FindOpenGL.diff
Is there some reason to ignore the comment: # The first line below is to make sure that the proper headers # are used on a Linux machine with the NVidia drivers installed. # They replace Mesa with NVidia's own library but normally do not # install headers and that causes the linking to # fail since the compiler finds the Mesa headers but NVidia's library. # Make sure the NVIDIA directory comes BEFORE the others. # - Atanas Georgiev <atanas@cs.columbia.edu> (from FindOpenGL.cmake)
I'm not sure, maybe it's something to do with gentoo using opengl-update to set the current opengl libraries used. I just know it worked for me.
I'm going to close this because there's a directive in the program itself not to do what this patch does. Added to that is the fact that you're the only one to report this as an issue. If more users have this as an issue I'll be more than happy to reopen this bug and commit the patch; but for now I can't justify bloating the portage tree any more than it is already.