Missing libGLU.a

Dear all,

I tried to compiling a code on 32-bit OpenSuSe 11.1, but it was terminated with following error:
**# *No rule to make target ‘/usr/lib/libGLU.a’, needed by ‘DXA_debug’. Stop
Then I installed the freeglut-2.6.0, but there were only libGLU.so and libGLU.so.1 in /usr/lib folder. And the compiling process was terminated with the same error. Will you give me some instruction to solve this problem? Thanks in advance!

Best,
Damien

for better help please state the name and of this program and where you got it

there IS a static ( *.a ) out there for glut

but i have only seen very old code explicitly call the static lib .

now it is always possible to rebuild the old static GLU.a and have it along side the shared .so

also are you aware that 11.1 is at end of life . If possible you might want to install the current 11.3

The libGLU.so library is part of the Mesa package. However, according to the packaging standards, only dynamic libraries are included in the package. You have two options:

  1. Change your application to link with the dynamic library (recommended). Or:

  2. Get the source RPM of Mesa and then rebuild it locally with the configure option --enable-static. Install the ‘build’ script to do so and edit the Mesa.spec file. This is the diff:

--- Mesa.spec.orig      2010-12-27 14:42:27.720958938 +0100
+++ Mesa.spec   2010-12-27 15:01:47.741935090 +0100
@@ -35,7 +35,7 @@
 #
 %define _version 7.8.2
 Version:        7.8.2
-Release:        1.3
+Release:        1.4
 Summary:        Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL
 Source:         MesaLib-%{_version}.tar.bz2
 Source1:        MesaDemos-%{_version}.tar.bz2
@@ -150,14 +150,15 @@
 # build and install Indirect Rendering only libGL
 make realclean
 %configure --with-driver=xlib \
-           --disable-glu \
+           --enable-static \
            --disable-glw \
            --disable-glut \
            --disable-gallium \
            CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
 sed -i 's/GL_LIB = .*/GL_LIB = IndirectGL/g' configs/autoconf
 make %{?jobs:-j%jobs}
-cp -a %{_lib}/libIndirectGL.so.* %{_lib}/libOSMesa.so* \
+cp -a %{_lib}/libIndirectGL.a %{_lib}/libOSMesa.a \
+  %{_lib}/libGLU.a %{_lib}/libEGL.a \
   $RPM_BUILD_ROOT/usr/%{_lib}
 for dir in ../xc/doc/man/{GL/gl,GL/glx,GLU}; do
 pushd $dir
@@ -215,8 +216,11 @@
 %exclude /usr/include/GL/glxew.h
 %exclude /usr/include/GL/wglew.h
 /usr/%{_lib}/libGLU.so
-/usr/%{_lib}/libOSMesa.so
+/usr/%{_lib}/libGLU.a
+/usr/%{_lib}/libOSMesa.a
+/usr/%{_lib}/libIndirectGL.a
 /usr/%{_lib}/libEGL.so
+/usr/%{_lib}/libEGL.a
 /usr/%{_lib}/pkgconfig/dri.pc
 /usr/%{_lib}/pkgconfig/gl.pc
 /usr/%{_lib}/pkgconfig/glu.pc

Please note: Method #2 is NOT recommended. And: My spec file is from the current 11.3 i586 package. Your case may be a bit different.

Hi vodoo and Johnvv,

I’m glad to tell you that my problem is sloved by changing the static library to the dynamic one. Thanks for your suggestion!

Best,
Damien