juanman82 / gource

Automatically exported from code.google.com/p/gource
0 stars 0 forks source link

[PATCH] Build failure with binutils-gold #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Build fails with the new linker (gold linker) with missing symbols for GL
functions. This is because -lGL is not explicitly added as a link during
the build. The new gold linker does not assume indirect links, due to which
this build fails. One may reproduce this problem without the gold linker by
using the --no-add-needed linker flag. The following is the linker error:

g++  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -pthread
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/freetype2
-I/usr/include/FTGL -I/usr/include/freetype2     -o gource src/action.o
src/apache.o src/bzr.o src/commitlog.o src/core/camera.o src/core/display.o
src/core/extensions.o src/core/frustum.o src/core/fxfont.o
src/core/logger.o src/core/plane.o src/core/quadtree.o src/core/regex.o
src/core/resource.o src/core/sdlapp.o src/core/seeklog.o
src/core/stringhash.o src/core/texture.o src/custom.o src/cvs-exp.o
src/dirnode.o src/file.o src/git.o src/gitraw.o src/gource.o src/hg.o
src/main.o src/pawn.o src/ppm.o src/slider.o src/spline.o src/user.o
src/zoomcamera.o  -lpcre -ljpeg -lpng  -lGLU -lSDL -lpthread -lftgl  
-lSDL_image
/usr/bin/ld: src/gource.o: undefined reference to symbol 'glDepthFunc'
/usr/bin/ld: note: 'glDepthFunc' is defined in DSO /usr/lib64/libGL.so.1 so
try adding it to the linker command line
/usr/lib64/libGL.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

What version of the product are you using? On what operating system?
gource-0.26b

Please provide any additional information below.
Attached patch adds a configure check for libGL and sets up the necessary
flags.

Original issue reported on code.google.com by siddhesh...@gmail.com on 3 May 2010 at 8:11

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. I have added your patch to the trunk.

Original comment by acaudw...@gmail.com on 4 May 2010 at 9:55

GoogleCodeExporter commented 9 years ago

Original comment by acaudw...@gmail.com on 9 Jul 2010 at 2:19