Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Can't compile SFML with cmake (linux)  (Read 10484 times)

0 Members and 2 Guests are viewing this topic.

lazeriux

  • Newbie
  • *
  • Posts: 18
    • View Profile
Can't compile SFML with cmake (linux)
« on: May 03, 2013, 12:01:21 pm »
Hello community,

I have a problem with compiling SFML with cmake.

The error: http://pastebin.com/qa8fP8Md
Quote
   

    CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
      Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY)
    Call Stack (most recent call first):
      /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
      /usr/share/cmake-2.8/Modules/FindOpenGL.cmake:153 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      src/SFML/Window/CMakeLists.txt:104 (find_package)
     
     
    -- Configuring incomplete, errors occurred!



Same problem as: http://en.sfml-dev.org/forums/index.php?topic=9723.0

But I have installed those packages and I still get this error

My info:
Quote
glxinfo | grep OpenGL
Quote
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: ATI Radeon HD 4600 Series
OpenGL version string: 3.3.11672 Compatibility Profile Context
OpenGL shading language version string: 3.30
OpenGL extensions:

OS: Linuxmint 14

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't compile SFML with cmake (linux)
« Reply #1 on: May 03, 2013, 12:12:29 pm »
You have an OpenGL driver, it doesn't mean you have the OpenGL development package (headers and libraries).

The package to install should be libgl1-mesa-dev.
Laurent Gomila - SFML developer

lazeriux

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Can't compile SFML with cmake (linux)
« Reply #2 on: May 03, 2013, 12:49:53 pm »
libgl1-mesa-dev is already the newest version. :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't compile SFML with cmake (linux)
« Reply #3 on: May 03, 2013, 01:13:54 pm »
And where is it installed?
Laurent Gomila - SFML developer

lazeriux

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Can't compile SFML with cmake (linux)
« Reply #4 on: May 03, 2013, 04:08:10 pm »
locate libgl1-mesa-dev  result:

Quote
/usr/share/bug/libgl1-mesa-dev
/usr/share/bug/libgl1-mesa-dev/control
/usr/share/bug/libgl1-mesa-dev/script
/usr/share/doc/libgl1-mesa-dev
/usr/share/doc/libgl1-mesa-dev/changelog.Debian.gz
/usr/share/doc/libgl1-mesa-dev/copyright
/var/cache/apt/archives/libgl1-mesa-dev_9.0.3-0ubuntu0.1_amd64.deb
/var/lib/dpkg/info/libgl1-mesa-dev.list
/var/lib/dpkg/info/libgl1-mesa-dev.md5sums

locate libgl1 result:
Quote
/usr/share/bug/libgl1-mesa-dev
/usr/share/bug/libgl1-mesa-dri
/usr/share/bug/libgl1-mesa-glx
/usr/share/bug/libgl1-mesa-dev/control
/usr/share/bug/libgl1-mesa-dev/script
/usr/share/bug/libgl1-mesa-dri/control
/usr/share/bug/libgl1-mesa-dri/script
/usr/share/bug/libgl1-mesa-glx/control
/usr/share/bug/libgl1-mesa-glx/script
/usr/share/doc/libgl1-mesa-dev
/usr/share/doc/libgl1-mesa-dri
/usr/share/doc/libgl1-mesa-glx
/usr/share/doc/libgl1-mesa-dev/changelog.Debian.gz
/usr/share/doc/libgl1-mesa-dev/copyright
/usr/share/doc/libgl1-mesa-dri/changelog.Debian.gz
/usr/share/doc/libgl1-mesa-dri/copyright
/usr/share/doc/libgl1-mesa-glx/changelog.Debian.gz
/usr/share/doc/libgl1-mesa-glx/copyright
/usr/share/lintian/overrides/libgl1-mesa-dri
/usr/share/lintian/overrides/libgl1-mesa-glx
/var/cache/apt/archives/libgl1-mesa-dev_9.0.3-0ubuntu0.1_amd64.deb
/var/cache/apt/archives/libgl1-mesa-dri_9.0.3-0ubuntu0.1_amd64.deb
/var/cache/apt/archives/libgl1-mesa-dri_9.0.3-0ubuntu0.1_i386.deb
/var/cache/apt/archives/libgl1-mesa-glx_9.0.3-0ubuntu0.1_amd64.deb
/var/cache/apt/archives/libgl1-mesa-glx_9.0.3-0ubuntu0.1_i386.deb
/var/lib/dpkg/info/libgl1-mesa-dev.list
/var/lib/dpkg/info/libgl1-mesa-dev.md5sums
/var/lib/dpkg/info/libgl1-mesa-dri:amd64.list
/var/lib/dpkg/info/libgl1-mesa-dri:amd64.md5sums
/var/lib/dpkg/info/libgl1-mesa-dri:amd64.postinst
/var/lib/dpkg/info/libgl1-mesa-dri:amd64.postrm
/var/lib/dpkg/info/libgl1-mesa-dri:amd64.shlibs
/var/lib/dpkg/info/libgl1-mesa-dri:i386.list
/var/lib/dpkg/info/libgl1-mesa-dri:i386.md5sums
/var/lib/dpkg/info/libgl1-mesa-dri:i386.postinst
/var/lib/dpkg/info/libgl1-mesa-dri:i386.postrm
/var/lib/dpkg/info/libgl1-mesa-dri:i386.shlibs
/var/lib/dpkg/info/libgl1-mesa-glx:amd64.list
/var/lib/dpkg/info/libgl1-mesa-glx:amd64.md5sums
/var/lib/dpkg/info/libgl1-mesa-glx:amd64.postinst
/var/lib/dpkg/info/libgl1-mesa-glx:amd64.postrm
/var/lib/dpkg/info/libgl1-mesa-glx:amd64.prerm
/var/lib/dpkg/info/libgl1-mesa-glx:amd64.shlibs
/var/lib/dpkg/info/libgl1-mesa-glx:i386.list
/var/lib/dpkg/info/libgl1-mesa-glx:i386.md5sums
/var/lib/dpkg/info/libgl1-mesa-glx:i386.postinst
/var/lib/dpkg/info/libgl1-mesa-glx:i386.postrm
/var/lib/dpkg/info/libgl1-mesa-glx:i386.prerm
/var/lib/dpkg/info/libgl1-mesa-glx:i386.shlibs

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't compile SFML with cmake (linux)
« Reply #5 on: May 03, 2013, 04:24:01 pm »
The important ones are libGL.so and gl.h.
Laurent Gomila - SFML developer

lazeriux

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Can't compile SFML with cmake (linux)
« Reply #6 on: May 03, 2013, 06:47:56 pm »
 locate libGL.so result:

/usr/lib/fglrx/libGL.so
/usr/lib/fglrx/libGL.so.1
/usr/lib/fglrx/libGL.so.1.2
/usr/lib32/fglrx/libGL.so.1
/usr/lib32/fglrx/libGL.so.1.2


locate gl.h result:


/home/ares/Qt5.0.2/5.0.2/gcc_64/doc/activeqt/activeqt-opengl.html
/home/ares/Qt5.0.2/5.0.2/gcc_64/doc/activeqt/qaxserver-demo-opengl.html
/home/ares/Qt5.0.2/5.0.2/gcc_64/doc/qtdoc/windowsce-opengl.html
/home/ares/Qt5.0.2/5.0.2/gcc_64/doc/qtopengl/examples-widgets-opengl.html
/home/ares/Qt5.0.2/5.0.2/gcc_64/doc/qtopengl/hellogl.html
/home/ares/Qt5.0.2/5.0.2/gcc_64/doc/qtopengl/qgl.html
/home/ares/Qt5.0.2/5.0.2/gcc_64/include/QtGui/qopengl.h
/home/ares/Qt5.0.2/5.0.2/gcc_64/include/QtOpenGL/qgl.h
/home/ares/Qt5.0.2/5.0.2/gcc_64/mkspecs/common/ios/GLES/gl.h
/usr/include/GL/gl.h
[/quote]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't compile SFML with cmake (linux)
« Reply #7 on: May 03, 2013, 07:20:17 pm »
Does glxgears run?

If so, you can see which libGL it uses with ldd "$(which glxgears)".
Laurent Gomila - SFML developer

lazeriux

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Can't compile SFML with cmake (linux)
« Reply #8 on: May 03, 2013, 08:06:36 pm »
glxgears runs.

RESULT OF ldd "$(which glxgears)" :


Quote
ldd "$(which glxgears)"
   linux-vdso.so.1 =>  (0x00007fff01dff000)
   libGL.so.1 => /usr/lib/fglrx/libGL.so.1 (0x00007fbdea1bf000)
   libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbde9ec3000)
   libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fbde9b88000)
   libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbde97c9000)
   libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbde95ac000)
   libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fbde9399000)
   libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fbde917b000)
   libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbde8f77000)
   /lib64/ld-linux-x86-64.so.2 (0x00007fbdea3eb000)
   libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fbde8d72000)
   libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fbde8b6c000)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't compile SFML with cmake (linux)
« Reply #9 on: May 03, 2013, 08:21:37 pm »
Hmm... so why can't CMake find it? Have you searched for similar issues on Google?
Laurent Gomila - SFML developer

lazeriux

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Can't compile SFML with cmake (linux)
« Reply #10 on: May 03, 2013, 08:31:46 pm »
Yes, that's why opengl is installed.

tried looking for help in IRC and no good results.
« Last Edit: May 03, 2013, 08:36:23 pm by lazeriux »

lazeriux

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Can't compile SFML with cmake (linux)
« Reply #11 on: May 03, 2013, 08:42:56 pm »
I can install sfml using this repository http://en.sfml-dev.org/forums/index.php?topic=11338.0

but I get errors on compiling like: not member of 'smth'
other users says that it is because of 1.6 version. :|

Sorry for my bad english. :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't compile SFML with cmake (linux)
« Reply #12 on: May 03, 2013, 08:45:35 pm »
Quote
I can install sfml using this repository http://en.sfml-dev.org/forums/index.php?topic=11338.0
If you want to install pre-built binaries, why don't you use the official ones?

Quote
not member of 'smth'
Exact error messages usually help more... :P
Laurent Gomila - SFML developer

lazeriux

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Can't compile SFML with cmake (linux)
« Reply #13 on: May 03, 2013, 08:47:58 pm »
Does official repository exsist?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't compile SFML with cmake (linux)
« Reply #14 on: May 03, 2013, 08:53:07 pm »
There's no official Linux package, but there are official packages containing headers and libraries, that you just have to copy to wherever you want in your system.
Laurent Gomila - SFML developer

 

anything