Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 737
    • Issues 737
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 209
    • Merge requests 209
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #17933

Closed
Open
Created Jun 16, 2020 by Andrew Maclean@amacleanDeveloper

Undefined reference to `glXM*` when linking lib/libvtkRenderingOpenGL2-9.0.so.9.0.0

Using CMake Version 3.17.3, gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0. When building I get lots of errors like:

/usr/bin/ld: lib/libvtkRenderingOpenGL2-9.0.so.9.0.0: undefined reference to `glXMakeCurrent'
/usr/bin/ld: lib/libvtkRenderingOpenGL2-9.0.so.9.0.0: undefined reference to `glXGetVisualFromFBConfig'
/usr/bin/ld: lib/libvtkRenderingOpenGL2-9.0.so.9.0.0: undefined reference to `glXGetCurrentDisplay'

If you add the line list(APPEND opengl_targets OpenGL::GL) just before line 30 in VTK/Utilities/OpenGL/CmakeLists.txt everything compiles OK.

    else ()
      list(APPEND opengl_targets OpenGL::GL)
      list(APPEND opengl_targets OpenGL::OpenGL)
    endif ()

@ken-martin I'm happy to do a merge request or you can do it. You may see other issues that I don't know about!

Assignee
Assign to
Time tracking