matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
492 stars 72 forks source link

'GLFW3_LIBRARIES' set to 'NOTFOUND' #147

Open creallfluharty opened 5 years ago

creallfluharty commented 5 years ago

I am having an issue that very similar to https://github.com/matus-chochlik/oglplus/issues/27

The result of running the configuration:

$ python configure.py --build
-- Could NOT find GLEW
-- Could NOT find GL3W
-- Found GLES3: /usr/include;/usr/lib/x86_64-linux-gnu/libGL.so
-- Found GLES31: /usr/include;/usr/lib/x86_64-linux-gnu/libGL.so
-- Found GLES32: /usr/include;/usr/lib/x86_64-linux-gnu/libGL.so
-- Could NOT find GLFW
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLFW3_LIBRARIES
    linked by target "cmTC_ef414" in directory /home/username/github/oglplus/_build/ext_lib/CMakeFiles/CMakeTmp

CMake Error at config/CommonFindMod.cmake:85 (try_run):
  Failed to configure test project build system.
Call Stack (most recent call first):
  config/FindGLFW3.cmake:5 (oglplus_common_find_module)
  CMakeLists.txt:67 (include)

-- Configuring incomplete, errors occurred!
See also "/home/username/github/oglplus/_build/CMakeFiles/CMakeOutput.log".
See also "/home/username/github/oglplus/_build/CMakeFiles/CMakeError.log".
# Configuration failed with code 1

The files installed by my package manager

$ dpkg-query -L libglfw3-dev libglfw3
/.
/usr
/usr/include
/usr/include/GLFW
/usr/include/GLFW/glfw3.h
/usr/include/GLFW/glfw3native.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/cmake
/usr/lib/x86_64-linux-gnu/cmake/glfw3
/usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Config.cmake
/usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3ConfigVersion.cmake
/usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets-none.cmake
/usr/lib/x86_64-linux-gnu/cmake/glfw3/glfw3Targets.cmake
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/glfw3.pc
/usr/share
/usr/share/doc
/usr/share/doc/libglfw3-dev
/usr/share/doc/libglfw3-dev/copyright
/usr/lib/x86_64-linux-gnu/libglfw.so
/usr/share/doc/libglfw3-dev/changelog.Debian.gz

/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libglfw.so.3.2
/usr/share
/usr/share/doc
/usr/share/doc/libglfw3
/usr/share/doc/libglfw3/changelog.Debian.gz
/usr/share/doc/libglfw3/copyright
/usr/lib/x86_64-linux-gnu/libglfw.so.3

I see that the .so files don't seem to match those listed in that thread. How can I resolve this?

matus-chochlik commented 5 years ago

HI, cmake is searching for a combination of GLFW/glfw3.h and glfw3.so. While you have the header, you don't seen to have a library with that name, try to create a symlink to libglfw.so.3.2 called glfw3.so in /usr/lib/x86_64-linux-gnu/

HTH

creallfluharty commented 5 years ago

Thank you for your timely response! Unfortunately that didn't seem to resolve the problem :/

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libglfw.so.3.2 /usr/lib/x86_64-linux-gnu/libglfw3.so
$ ls /usr/lib/x86_64-linux-gnu | grep glfw
libglfw3.so
libglfw.so
libglfw.so.3
libglfw.so.3.2
$ python configure.py 
-- Could NOT find GLEW
-- Could NOT find GL3W
-- Found GLES3: /usr/include;/usr/lib/x86_64-linux-gnu/libGL.so
-- Found GLES31: /usr/include;/usr/lib/x86_64-linux-gnu/libGL.so
-- Found GLES32: /usr/include;/usr/lib/x86_64-linux-gnu/libGL.so
-- Could NOT find GLFW
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLFW3_LIBRARIES
    linked by target "cmTC_54b15" in directory /home/username/github/oglplus/_build/ext_lib/CMakeFiles/CMakeTmp

CMake Error at config/CommonFindMod.cmake:85 (try_run):
  Failed to configure test project build system.
Call Stack (most recent call first):
  config/FindGLFW3.cmake:5 (oglplus_common_find_module)
  CMakeLists.txt:67 (include)

-- Configuring incomplete, errors occurred!
See also "/home/username/github/oglplus/_build/CMakeFiles/CMakeOutput.log".
See also "/home/username/github/oglplus/_build/CMakeFiles/CMakeError.log".
# Configuration failed with code 1
creallfluharty commented 5 years ago

Just as an update, I was able to install oglplus by uninstalling GLFW3 and switching to SDL (I also deleted and recloned the repo, which may or may not have been necessary). I'm not sure if that counts as a solution to this problem as a whole, but it does solve mine.