Noob. Building problem on linux because of OpenGL

190 views
Skip to first unread message

shift

unread,
Nov 26, 2019, 2:42:21 AM11/26/19
to Magnum Graphics Engine
I'm following the Getting Started docs but failing to get it built.
I'm getting problems regarding OpenGL?? I have tried other frameworks before Magnum and were able to compile those without problems regarding OpenGL.

I'm using Ubuntu bionic with an intel integrated graphics card.

At first, I can't link to headers.

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenGL (missing: OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindOpenGL.cmake:369 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  magnum/CMakeLists.txt:234 (find_package)

So I did:

cmake .. -DOPENGL_INCLUDE_DIR=/usr/include/GL

And now I'm stuck with this:

CMake Error at magnum/src/Magnum/Platform/CMakeLists.txt:305 (add_library):
  Target "MagnumSdl2Application" links to target "OpenGL::GLX" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

CMake Error at src/CMakeLists.txt:5 (add_executable):
  Target "MyApplication" links to target "OpenGL::GLX" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?

Thanks.

Vladimír Vondruš

unread,
Nov 26, 2019, 3:00:24 AM11/26/19
to shift, Magnum Graphics Engine
Hi!

This is probably just a missing dependency. Do you have libgl-dev and libsdl2-dev installed? If you install those and recreate the build directory, it should be able to discover everything correctly -- unless you have a very specific setup, like a completely X-less system. There are also Ubuntu packages that are known to work well -- see https://doc.magnum.graphics/magnum/building.html#building-packages-deb

Hope this helps!
mosra

______________________________________________________________
> Od: "shift" <mark.s...@gmail.com>
> Komu: "Magnum Graphics Engine" <magnum...@googlegroups.com>
> Datum: 26.11.2019 08:42
> Předmět: [magnum] Noob. Building problem on linux because of OpenGL
>--
>You received this message because you are subscribed to the Google Groups "Magnum Graphics Engine" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to magnum-engin...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/magnum-engine/c0ae53fa-01f8-44e5-b82b-69f33e592d1f%40googlegroups.com.
>
>

Mark Lawan

unread,
Nov 26, 2019, 3:22:49 AM11/26/19
to Vladimír Vondruš, Magnum Graphics Engine
I was missing libgl-dev. Thanks.
Reply all
Reply to author
Forward
0 new messages