Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building library fails on cmake and Makefile #392

Closed
grahamreeds opened this issue Sep 21, 2023 · 3 comments
Closed

Building library fails on cmake and Makefile #392

grahamreeds opened this issue Sep 21, 2023 · 3 comments

Comments

@grahamreeds
Copy link
Contributor

I have tried building with master branch and the source given in the 2.2.0 zip file. Both exhibit the same behaviour.

You freely admit that the CMake version is user-maintained but as that is what I use I will begin with that.

Attempting to compile with that gives the following output:

/workspaces/glew-2.2.0/build $ cmake ./cmake
-- The C compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so   
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Configuring done
CMake Error at CMakeLists.txt:107 (add_library):
  Cannot find source file:

    /workspaces/glew-2.2.0/include/GL/wglew.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc


CMake Error at CMakeLists.txt:183 (add_executable):
  Cannot find source file:

    /workspaces/glew-2.2.0/src/glewinfo.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc


CMake Error at CMakeLists.txt:107 (add_library):
  No SOURCES given to target: glew


CMake Error at CMakeLists.txt:111 (add_library):
  No SOURCES given to target: glew_s


CMake Error at CMakeLists.txt:183 (add_executable):
  No SOURCES given to target: glewinfo


CMake Generate step failed.  Build files cannot be regenerated correctly.
/workspaces/glew-2.2.0/build $

And for calling makefile:

/workspaces/glew-2.2.0 $ make
/bin/sh: 1: config/config.guess: Permission denied
/bin/sh: 1: config/config.guess: Permission denied
Makefile:40: *** "Platform '' not supported".  Stop.
/workspaces/glew-2.2.0 $

I might be able to pass this by adding sudo but I shouldn't have to - why does the compile need super user rights?

@nigels-com
Copy link
Owner

Hello @grahamreeds

Unless you want to contribute to GLEW it's recommended to build from an official release:
https://glew.sourceforge.net/

See #13 for more details.

@grahamreeds
Copy link
Contributor Author

I would just like to pull it into my projects, which are all CMake based, and as part of the build. Manual steps outside the main build is a non-no as that (in my experience) have people scratching their heads and disturbing other members of the team as to what went wrong. Making it as fool proof as possible is key.

I will look to see if there is a simple CMake command to download a zip and extract.

@nigels-com
Copy link
Owner

I'd recommend Perlmint/glew-cmake for that use case.
This repo is less focused on cmake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants