Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the OpenGL CPAN distribution.

Report information
The Basics
Id: 50349
Status: resolved
Priority: 0/
Queue: OpenGL

People
Owner: Nobody in particular
Requestors: bitcard [...] skewray.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.59
Fixed in: (no value)



Subject: Another Compile Error
I am unable to compile 0.59 on Ubuntu 9.04, Perl v5.10.0. The output from "perl Makefile.PL verbose" is attached as E1.txt. The problem is obviously that include/GL/is not being searched for include files, since this is the wrong path for the files in utils/. I edited utils/Makefile to include "-I../include" in INC, and then I got the errors in E2.txt. "APIENTRY" is not defined, but since this can be found in at least four different include files, I gave up at this point. If I can help with the debugging, please let me know. Brian
Subject: E1.txt
$verbose set to 1 found libs: GL = 'GL' GLU = 'GLU' GLUT = 'glut' Testing for OpenGL Extensions Testing GLUT version glversion: cd utils;make -f Makefile GLUT_LIB=glut GLUT_DEF=HAVE_GLUT clean;make -f Makefile GLUT_LIB=glut GLUT_DEF=HAVE_GLUT glversion.c:13:21: error: GL/glut.h: No such file or directory glversion.c: In function ‘main’: glversion.c:25: error: ‘GLuint’ undeclared (first use in this function) glversion.c:25: error: (Each undeclared identifier is reported only once glversion.c:25: error: for each function it appears in.) glversion.c:25: error: expected ‘;’ before ‘idWindow’ glversion.c:30: error: ‘GLUT_RGBA’ undeclared (first use in this function) glversion.c:31: error: ‘idWindow’ undeclared (first use in this function) glversion.c:35: error: ‘GL_VERSION’ undeclared (first use in this function) glversion.c:35: warning: cast to pointer from integer of different size glversion.c:36: error: ‘GL_VENDOR’ undeclared (first use in this function) glversion.c:36: warning: cast to pointer from integer of different size glversion.c:37: error: ‘GL_RENDERER’ undeclared (first use in this function) glversion.c:37: warning: cast to pointer from integer of different size glversion.c:38: error: ‘GL_EXTENSIONS’ undeclared (first use in this function) glversion.c:38: warning: cast to pointer from integer of different size make: *** [glversion.o] Error 1 rm -f glversion.txt rm -f glversion rm -f glversion.o cc -I/usr/include -I/usr/X11R6/include -I/usr/local/include -I/usr/openwin/include -DHAVE_GLUT -c glversion.c get_extensions: could not open utils/glversion.txt: No such file or directory
Subject: E2.txt
$verbose set to 1 found libs: GL = 'GL' GLU = 'GLU' GLUT = 'glut' Testing for OpenGL Extensions Testing GLUT version glversion: cd utils;make -f Makefile GLUT_LIB=glut GLUT_DEF=HAVE_GLUT clean;make -f Makefile GLUT_LIB=glut GLUT_DEF=HAVE_GLUT In file included from ../include/GL/freeglut_std.h:85, from ../include/GL/glut.h:17, from glversion.c:13: ../include/GL/glu.h:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token ../include/GL/glu.h:231: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:271: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:354: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:360: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:363: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:364: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:365: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:366: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:367: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:368: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:372: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:373: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:374: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:375: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:376: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:377: error: expected ‘)’ before ‘*’ token ../include/GL/glu.h:384: error: expected ‘)’ before ‘*’ token make: *** [glversion.o] Error 1 rm -f glversion.txt rm -f glversion rm -f glversion.o cc -I../include -I/usr/include -I/usr/X11R6/include -I/usr/local/include -I/usr/openwin/include -DHAVE_GLUT -c glversion.c get_extensions: could not open utils/glversion.txt: No such file or directory
On Fri Oct 09 01:01:52 2009, skewray wrote: Show quoted text
> I am unable to compile 0.59 on Ubuntu 9.04, Perl v5.10.0. The > output from "perl Makefile.PL verbose" is attached as E1.txt. The > problem is obviously that include/GL/is not being searched for > include files, since this is the wrong path for the files in utils/.
The key to building the OpenGL module is configuring the locations of the OpenGL, GLU, and FreeGLUT header files to compile and the locations of the corresponding libraries libGL.xx, libGLU.xx libglut.xx with various combinations of upper and lower case and what .xx is by platform. The first step is compiling glversion in utils/ in order to probe the configuration of the OpenGL environment. You'll need to confirm that you have the packages for opengl, opengl- dev, freeglut, freeglut-dev, and whatever it takes to install a valid opengl compile environment on your system. One way to check is to do a search for the various include files first. From a bash shell in a terminal window I have used: find /usr -name gl.h -o -name freeglut.h -o -name glu.h The ones you'll want are those in a GL/ directory. On my system, I get this output: /usr/include/FL/gl.h /usr/include/FL/glu.h * /usr/include/GL/freeglut.h * /usr/include/GL/gl.h * /usr/include/GL/glu.h /usr/include/w32api/GL/gl.h /usr/include/w32api/GL/glu.h where I have indicated the locations needed to compile under X11 which is the way linux support hardware accelerated OpenGL rendering. If you don't have these on your system, then OpenGL and the needed developers packages are not installed. Similarly, you can look for the libraries with find /usr -iname 'libgl.*' -o -iname 'libglut.*' -o -iname 'libglu.*' which gives on my system * /usr/lib/libGL.dll.a * /usr/lib/libGLU.dll.a /usr/lib/libglut.a * /usr/lib/libglut.dll.a /usr/lib/libglut.la where I have indicated the shared libraries on my cygwin platform. On linux, the shared libraries will end in .so instead of .dll.a. If you don't find these libraries, then you are missing the needed OpenGL development environment. Once you have determined their locations, you should be able to run the glversion compile command manually putting in the additional include path with -Idir/to/include/widhout/GL and the library with - Ldir/to/library so if my glversion compile did not work with the default makefile (but it does): make -f Makefile.cygwin gcc -DHAVE_FREEGLUT -c glversion.c g++ -o glversion glversion.o -lGL -lglut then I could hand run the compile and link commands as gcc -DHAVE_FREEGLUT -I/usr/include -c glversion.c g++ -o glversion glversion.o -L/usr/lib -lGL -lglut where I have added the directories where the include headers were found above in the compile line and the library directory to the link line. Once you get a set of paths and a compile/link that works, check that you can run glversion to get output, and let me know the paths you needed and we can see why the build process did not find them. --Chris
From: bitcard [...] skewray.com
I was missing the freeglut development files. It computes now, although with the test.pl missing font problem. I would like to make the suggestion that either the Makefile.PL or the Makefile check for the appropriate include files, and if they are not found, report which packages might be missing. I had no idea why it would not compile, when the fix was actually trivial. Thanks for a great package!
On Fri Oct 09 11:02:10 2009, skewray wrote: Show quoted text
> I was missing the freeglut development files. It computes now, > although with the test.pl missing font problem.
OK Show quoted text
> I would like to make the suggestion that either the Makefile.PL or > the Makefile check for the appropriate include files, and if they are > not found, report which packages might be missing. I had no idea > why it would not compile, when the fix was actually trivial.
I guess that is a symptom of our success. We've been working toward improving the portability and buildability of OpenGL across platforms. However, now that it works more places, more easily, more folks are trying to build it without installing the prerequisites in the README. Improved (helpful) diagnostics are planned. One thing that might be helpful would be a platform-by-platform description of how to get the required libraries and development environment configured. For example, for your platform, what packages were installed and how do you get them if they are not already there... Glad you are up and running, Chris Show quoted text
> Thanks for a great package!