McLeary
McLeary

Reputation: 1271

Compile Glew git code with MinGW on Windows

When looking on glew project page there's a git repository with the latest code.

Cloning the repository I saw that I need to download the extensions. The Makefile has a target called extensions that do the job of downloading everything from the internet.

The problem is that this Makefile is default for Unix systems. When I tried to build glew on Windows, using msysgit and mingw I get the following error:

mingw32-make.exe extensions
mingw32-make -C auto
mingw32-make[1]: Entering directory `glew/auto'

--------------------------------------------------------------------
Creating descriptors
--------------------------------------------------------------------
rm -rf extensions/gl
bin/update_ext.sh extensions/gl registry/gl blacklist
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
bin/filter_gl_ext.sh     extensions/gl
Can't do inplace edit on extensions/gl/GL_HP_occlusion_test: Permission denied.
Can't open extensions/gl/GL_HP_occlusion_test: No such file or directory.
Can't do inplace edit on extensions/gl/GL_ARB_vertex_buffer_object: Permission d
enied.
Can't do inplace edit on extensions/gl/GL_ARB_vertex_shader: Permission denied.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
grep: extensions/gl/GL_ARB_vertex_shader: No such file or directory
mingw32-make[1]: *** [extensions/gl/.dummy] Error 2
mingw32-make[1]: Leaving directory `glew/auto'
mingw32-make: *** [extensions] Error 2

I know this comes from perl, but how to solve it in Windows using MinGW and msysgit? I first think about other environment setup like cygwin but I already have a setup that build a dozen of other projects using my current setup.

Upvotes: 0

Views: 540

Answers (1)

sschuberth
sschuberth

Reputation: 29811

The problem probably comes from the fact that you use make from MinGW (your mingw32-make) but perl from MSYS (which ships with Git for Windows). So what you'd need is an MSYS make.

Let me point out a common misconception before I continue: msysgit is the name of development environment to create the Git for Windows installer (also see this answer). So usually people who just want to use Git on Windows should download Git for Windows, not msysgit. msysgit ships with all sorts of development stuff that is usually not needed, like gcc and (tadaa) make. So in you case, you'd really need msysgit, and I'd recommend the net installer from here. After the installation you should be able to launch C:\msysgit\msys.bat, change to your glew directory, and run make extensions.

Upvotes: 1

Related Questions