Unix Technical Forum

ld does not link against libGLU.so

This is a discussion on ld does not link against libGLU.so within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi there! Got stuck a little (Slackware 8.1). Trying to compile esdl (esdl.sourceforge.net) library (adds sdl/OpenGL functionality to erlang), ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:13 PM
n46is
 
Posts: n/a
Default ld does not link against libGLU.so

Hi there!
Got stuck a little (Slackware 8.1).
Trying to compile esdl (esdl.sourceforge.net) library
(adds sdl/OpenGL functionality to erlang), the sorce does not come with
a configure script, just "make && make install".
The problem is, it stops with the following error:


/usr/i386-slackware-linux/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
make[1]: *** [../priv/sdl_driver.so] Error 1


locate libGLU glu.h output is:
/usr/X11R6/lib/libGLU.so.1.3
/usr/X11R6/lib/libGLU.so
/usr/X11R6/lib/libGLU.so.1
/usr/X11R6/lib/libGLU.a
/usr/X11R6/include/GL/glu.h
/usr/local/include/GL/fglu.h #heck if I remember where this one came from

(so, it's present)

I have the /usr/X11R6/lib in my /etc/ld.so.conf
echo $LD_LIBRARY_PATH gives me "/lib/glut/:", default from /etc/profile, which
is wrong on my system, I don't have /lib/glut (installed libglut.so to
/usr/local/lib)
Also I am running an nVidia card and have OpenGL/SDL libraries installed
and working fine (shooting Quake2 at 1280x1024 )
(/usr/lib/libGL.so -> /usr/lib/libGL.so.1->/usr/lib/libGL.so.1.0.4363)


This is the second or third time I am running into the same thing (-lGLU).
Maybe someone had something similar || more familiar with ld || could point
me in the right direction.

Thanx in advance! -nabis

P.S. esdl nedded for Wings3d.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-18-2008, 09:15 PM
ravage
 
Posts: n/a
Default Re: ld does not link against libGLU.so

n46is wrote:

> Hi there!
> Got stuck a little (Slackware 8.1).
> Trying to compile esdl (esdl.sourceforge.net) library
> (adds sdl/OpenGL functionality to erlang), the sorce does not come with
> a configure script, just "make && make install".
> The problem is, it stops with the following error:
>
>
> /usr/i386-slackware-linux/bin/ld: cannot find -lGLU
> collect2: ld returned 1 exit status
> make[1]: *** [../priv/sdl_driver.so] Error 1
>
>
> locate libGLU glu.h output is:
> /usr/X11R6/lib/libGLU.so.1.3
> /usr/X11R6/lib/libGLU.so
> /usr/X11R6/lib/libGLU.so.1
> /usr/X11R6/lib/libGLU.a
> /usr/X11R6/include/GL/glu.h
> /usr/local/include/GL/fglu.h #heck if I remember where this one came from
>
> (so, it's present)
>
> I have the /usr/X11R6/lib in my /etc/ld.so.conf
> echo $LD_LIBRARY_PATH gives me "/lib/glut/:", default from /etc/profile,
> which is wrong on my system, I don't have /lib/glut (installed libglut.so
> to /usr/local/lib)
> Also I am running an nVidia card and have OpenGL/SDL libraries installed
> and working fine (shooting Quake2 at 1280x1024 )
> (/usr/lib/libGL.so -> /usr/lib/libGL.so.1->/usr/lib/libGL.so.1.0.4363)
>
>
> This is the second or third time I am running into the same thing (-lGLU).
> Maybe someone had something similar || more familiar with ld || could
> point me in the right direction.
>
> Thanx in advance! -nabis
>
> P.S. esdl nedded for Wings3d.



edit the Makefile and add "-L/usr/X11R6/lib" before -lGLU
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-18-2008, 09:16 PM
n46is
 
Posts: n/a
Default Re: ld does not link against libGLU.so

ravage wrote:
> edit the Makefile and add "-L/usr/X11R6/lib" before -lGLU


Thank you ravage, I edited Makefile the way you said, it compiled,
with errors, some progress still...
I will try to figure it out myself, but just in case
a part of Makefile:
-------------------------------------------------------------------------+
OS_FLAG = unix

OGLDIR = /usr/X11R6

# Uncomment these if your opengl header is located in another directory than
# the usual $(OGLDIR)/include/GL/gl.h
#GL_INCLUDE_DIR = OpenGL
#USE_GL_INCLUDE_DIR = -DFULL_PATH_TO_GL_INCLUDE_DIR

GL_LIBS = -L$(OGLDIR)/lib -lGL -lGLU
GL_INCS = -I$(OGLDIR)/include/$(GL_INCLUDE_DIR)

SDL_LIBS = $(sh sdl-config --libs)
SDL_INCS = $(sh sdl-config --cflags)

LIBS = $(GL_LIBS) $(SDL_LIBS) -lm

CFLAGS = -g -O2 -funroll-loops -Wall -ffast-math -fpic \
-fomit-frame-pointer $(USE_GL_INCLUDE_DIR) -DSHM \
<snip> -DPTHREADS $(GL_INCS) $(SDL_INCS) $(ERL_INCS)
----------------------------------------------------------------------------+

The problem is that libGLU.so is in /usr/X11R6/lib and libGL.so in /usr/lib,
gl.h and glu.h are both in /usr/X11R6/include/GL.
Any advice?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com