Today I was doing some testing with OpenCL and needed to install ATI Stream for one of the tests I was performing but I ran into an error during the compile process. The error related to glu.h which was not found during the compile process using make. Below I describe the error in more detail as well as what was done to resolve the error and make the glu.h file available on the server.
ATI Stream Compile Error On CentOS Linux:
- make[5]: Entering directory `/usr/local/src/atistream/ati-stream-sdk-v2.2-lnx64/samples/opencl/cl/app/BoxFilterGL'
- mkdir -p build/debug/x86_64/
- Building build/debug/x86_64//BoxFilterGL.o
- g++ -Wfloat-equal -Wpointer-arith -DATI_OS_LINUX -g3 -ffor-scope -I ../../../../../include -I ../../../../../samples/opencl/SDKUtil/include -o build/debug/x86_64//BoxFilterGL.o -c BoxFilterGL.cpp
- In file included from BoxFilterGLSAT.hpp:105,
- from BoxFilterGL.cpp:93:
- ../../../../../include/GL/glew.h:1138:20: error: GL/glu.h: No such file or directory
- make[5]: *** [build/debug/x86_64//BoxFilterGL.o] Error 1
- make[5]: Leaving directory `/usr/local/src/atistream/ati-stream-sdk-v2.2-lnx64/samples/opencl/cl/app/BoxFilterGL'
- make[4]: *** [BoxFilterGL] Error 2
- make[4]: Leaving directory `/usr/local/src/atistream/ati-stream-sdk-v2.2-lnx64/samples/opencl/cl/app'
- make[3]: *** [app] Error 2
- make[3]: Leaving directory `/usr/local/src/atistream/ati-stream-sdk-v2.2-lnx64/samples/opencl/cl'
- make[2]: *** [cl] Error 2
- make[2]: Leaving directory `/usr/local/src/atistream/ati-stream-sdk-v2.2-lnx64/samples/opencl'
- make[1]: *** [opencl] Error 2
- make[1]: Leaving directory `/usr/local/src/atistream/ati-stream-sdk-v2.2-lnx64/samples'
- make: *** [samples] Error 2
Notice the errors begin when the glu.h file is not found during the compile process. The output was generated from issuing the “make” command from within the ati-stream-sdk-v2.2-lnx64 directory on this 64-bit CentOS Linux server. I first thought that maybe the glu.h file was in a different location and may just need a symbolic link to allow me to complete the compile process however the glu.h file was not located on the server at all. The issue is easily resolved on CentOS by installing the freeglut development packages using the Yum Package Manager as shown below. In this type of situation you can use “yum whatprovides filename” to locate a package that will install the necessary files for you or you can obviously search around Google as well. In this scenario we simply need to install freeglut, freeglut-devel, and any necessary dependencies. Below there are two outputs as I initially thought I may just need to install freeglut but then found out that glu.h is actually installed with the freeglut-devel package. GLUT is the OpenGL Utility Toolkit and freeglut is the open source version of GLUT.
Install freeglut On CentOS Linux:
- [root@dev ati-stream-sdk-v2.2-lnx64]# yum install freeglut
- Loaded plugins: fastestmirror
- Loading mirror speeds from cached hostfile
- * addons: styx.biochem.wfubmc.edu
- * base: mirrors.liquidweb.com
- * updates: mirror.steadfast.net
- Setting up Install Process
- Resolving Dependencies
- --> Running transaction check
- ---> Package freeglut.i386 0:2.4.0-7.1.el5 set to be updated
- --> Processing Dependency: libGLU.so.1 for package: freeglut
- ---> Package freeglut.x86_64 0:2.4.0-7.1.el5 set to be updated
- --> Processing Dependency: libGLU.so.1()(64bit) for package: freeglut
- --> Running transaction check
- ---> Package mesa-libGLU.i386 0:6.5.1-7.8.el5 set to be updated
- ---> Package mesa-libGLU.x86_64 0:6.5.1-7.8.el5 set to be updated
- --> Finished Dependency Resolution
- Dependencies Resolved
- ====================================================================================================================================
- Package Arch Version Repository Size
- ====================================================================================================================================
- Installing:
- freeglut i386 2.4.0-7.1.el5 base 142 k
- freeglut x86_64 2.4.0-7.1.el5 base 150 k
- Installing for dependencies:
- mesa-libGLU i386 6.5.1-7.8.el5 base 225 k
- mesa-libGLU x86_64 6.5.1-7.8.el5 base 224 k
- Transaction Summary
- ====================================================================================================================================
- Install 4 Package(s)
- Upgrade 0 Package(s)
- Total download size: 741 k
- Is this ok [y/N]: y
- Downloading Packages:
- (1/4): freeglut-2.4.0-7.1.el5.i386.rpm | 142 kB 00:00
- (2/4): freeglut-2.4.0-7.1.el5.x86_64.rpm | 150 kB 00:00
- (3/4): mesa-libGLU-6.5.1-7.8.el5.x86_64.rpm | 224 kB 00:00
- (4/4): mesa-libGLU-6.5.1-7.8.el5.i386.rpm | 225 kB 00:00
- ------------------------------------------------------------------------------------------------------------------------------------
- Total 567 kB/s | 741 kB 00:01
- Running rpm_check_debug
- Running Transaction Test
- Finished Transaction Test
- Transaction Test Succeeded
- Running Transaction
- Installing : mesa-libGLU 1/4
- Installing : mesa-libGLU 2/4
- Installing : freeglut 3/4
- Installing : freeglut 4/4
- Installed:
- freeglut.i386 0:2.4.0-7.1.el5 freeglut.x86_64 0:2.4.0-7.1.el5
- Dependency Installed:
- mesa-libGLU.i386 0:6.5.1-7.8.el5 mesa-libGLU.x86_64 0:6.5.1-7.8.el5
- Complete!
- [root@dev ati-stream-sdk-v2.2-lnx64]#
Again after installing freeglut I used updatedb followed by locate to verify that glu.h was actually available on the server however it was not. I then installed freeglut-devel which provided the glu.h file.
Install freeglut-devel On CentOS Linux:
- [root@dev ati-stream-sdk-v2.2-lnx64]# yum install freeglut-devel
- Loaded plugins: fastestmirror
- Loading mirror speeds from cached hostfile
- * addons: styx.biochem.wfubmc.edu
- * base: mirrors.liquidweb.com
- * updates: mirror.steadfast.net
- Setting up Install Process
- Resolving Dependencies
- --> Running transaction check
- ---> Package freeglut-devel.i386 0:2.4.0-7.1.el5 set to be updated
- --> Processing Dependency: libGL-devel for package: freeglut-devel
- --> Processing Dependency: libGLU-devel for package: freeglut-devel
- ---> Package freeglut-devel.x86_64 0:2.4.0-7.1.el5 set to be updated
- --> Running transaction check
- ---> Package mesa-libGL-devel.x86_64 0:6.5.1-7.8.el5 set to be updated
- --> Processing Dependency: libX11-devel for package: mesa-libGL-devel
- ---> Package mesa-libGLU-devel.x86_64 0:6.5.1-7.8.el5 set to be updated
- --> Running transaction check
- ---> Package libX11-devel.x86_64 0:1.0.3-11.el5 set to be updated
- --> Processing Dependency: xorg-x11-proto-devel >= 7.1-2 for package: libX11-devel
- --> Processing Dependency: libXau-devel for package: libX11-devel
- --> Processing Dependency: libXdmcp-devel for package: libX11-devel
- --> Running transaction check
- ---> Package libXau-devel.x86_64 0:1.0.1-3.1 set to be updated
- ---> Package libXdmcp-devel.x86_64 0:1.0.1-2.1 set to be updated
- ---> Package xorg-x11-proto-devel.x86_64 0:7.1-13.el5 set to be updated
- --> Finished Dependency Resolution
- Dependencies Resolved
- ====================================================================================================================================
- Package Arch Version Repository Size
- ====================================================================================================================================
- Installing:
- freeglut-devel i386 2.4.0-7.1.el5 base 98 k
- freeglut-devel x86_64 2.4.0-7.1.el5 base 111 k
- Installing for dependencies:
- libX11-devel x86_64 1.0.3-11.el5 base 661 k
- libXau-devel x86_64 1.0.1-3.1 base 11 k
- libXdmcp-devel x86_64 1.0.1-2.1 base 7.5 k
- mesa-libGL-devel x86_64 6.5.1-7.8.el5 base 461 k
- mesa-libGLU-devel x86_64 6.5.1-7.8.el5 base 91 k
- xorg-x11-proto-devel x86_64 7.1-13.el5 base 247 k
- Transaction Summary
- ====================================================================================================================================
- Install 8 Package(s)
- Upgrade 0 Package(s)
- Total download size: 1.6 M
- Is this ok [y/N]: y
- Downloading Packages:
- (1/8): libXdmcp-devel-1.0.1-2.1.x86_64.rpm | 7.5 kB 00:00
- (2/8): libXau-devel-1.0.1-3.1.x86_64.rpm | 11 kB 00:00
- (3/8): mesa-libGLU-devel-6.5.1-7.8.el5.x86_64.rpm | 91 kB 00:00
- (4/8): freeglut-devel-2.4.0-7.1.el5.i386.rpm | 98 kB 00:00
- (5/8): freeglut-devel-2.4.0-7.1.el5.x86_64.rpm | 111 kB 00:00
- (6/8): xorg-x11-proto-devel-7.1-13.el5.x86_64.rpm | 247 kB 00:00
- (7/8): mesa-libGL-devel-6.5.1-7.8.el5.x86_64.rpm | 461 kB 00:00
- (8/8): libX11-devel-1.0.3-11.el5.x86_64.rpm | 661 kB 00:00
- ------------------------------------------------------------------------------------------------------------------------------------
- Total 612 kB/s | 1.6 MB 00:02
- Running rpm_check_debug
- Running Transaction Test
- Finished Transaction Test
- Transaction Test Succeeded
- Running Transaction
- Installing : libXau-devel 1/8
- Installing : mesa-libGL-devel 2/8
- Installing : mesa-libGLU-devel 3/8
- Installing : xorg-x11-proto-devel 4/8
- Installing : libXdmcp-devel 5/8
- Installing : libX11-devel 6/8
- Installing : freeglut-devel 7/8
- Installing : freeglut-devel 8/8
- Installed:
- freeglut-devel.i386 0:2.4.0-7.1.el5 freeglut-devel.x86_64 0:2.4.0-7.1.el5
- Dependency Installed:
- libX11-devel.x86_64 0:1.0.3-11.el5 libXau-devel.x86_64 0:1.0.1-3.1 libXdmcp-devel.x86_64 0:1.0.1-2.1
- mesa-libGL-devel.x86_64 0:6.5.1-7.8.el5 mesa-libGLU-devel.x86_64 0:6.5.1-7.8.el5 xorg-x11-proto-devel.x86_64 0:7.1-13.el5
- Complete!
- [root@dev ati-stream-sdk-v2.2-lnx64]#
After installing freeglut-devel I was able to compile the ATI Stream application without receiving the GL/glu.h not found error.
I’m now not sure the place you are getting your information, but great topic. I must spend some time studying much more or figuring out more. Thank you for magnificent information I used to be looking for this information for my mission.