Undefined reference to C library #3

Closed
ivan-m opened this Issue Mar 13, 2013 · 10 comments

Projects

None yet

3 participants

@ivan-m
ivan-m commented Mar 13, 2013

The relevant portion of cabal configure --verbose=3 when attempting to build GLURaw-1.3.0.0:

("/usr/bin/gcc",["-Wl,--hash-size=31","-Wl,--reduce-memory-overheads","/tmp/19672.c","-o","/tmp/19672","-D__GLASGOW_HASKELL__=706","-Dlinux_HOST_OS=1","-Dx86_64_HOST_ARCH=1","-Idist/build/autogen","-Iinclude","-I.","-DCALLCONV=ccall","-DUSE_DLSYM","-I/usr/lib64/ghc-7.6.2/base-4.6.0.1/include","-I/usr/lib64/ghc-7.6.2/include","-DUSE_DLSYM","-lGLU","-L/usr/lib64/OpenGLRaw-1.3.0.0/ghc-7.6.2","-L/usr/lib64/ghc-7.6.2/base-4.6.0.1","-L/usr/lib64/ghc-7.6.2/integer-gmp-0.5.0.0","-L/usr/lib64/ghc-7.6.2/ghc-prim-0.3.0.0","-L/usr/lib64/ghc-7.6.2"])
/usr/bin/gcc returned ExitFailure 1 with error message:
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalMesh1'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTranslated'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMap1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glNormal3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEnd'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEnable'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalPoint1'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPopAttrib'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalCoord1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glDisable'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMap2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMultMatrixf'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalMesh2'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPushAttrib'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexCoord2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage3D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glOrtho'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPolygonMode'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTranslatef'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPixelStorei'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetIntegerv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glScalef'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMultMatrixd'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage2D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glBegin'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glNormal3fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid2d'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex2fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetString'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glColor3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalPoint2'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex3fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetTexLevelParameteriv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage1D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetFloatv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalCoord2f'
collect2: error: ld returned 1 exit status
("/usr/bin/gcc",["-Wl,--hash-size=31","-Wl,--reduce-memory-overheads","/tmp/19672.c","-o","/tmp/19672","-lGLU","-L/usr/lib64/OpenGLRaw-1.3.0.0/ghc-7.6.2","-L/usr/lib64/ghc-7.6.2/base-4.6.0.1","-L/usr/lib64/ghc-7.6.2/integer-gmp-0.5.0.0","-L/usr/lib64/ghc-7.6.2/ghc-prim-0.3.0.0","-L/usr/lib64/ghc-7.6.2"])
/usr/bin/gcc returned ExitFailure 1 with error message:
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalMesh1'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTranslated'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMap1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glNormal3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEnd'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEnable'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalPoint1'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPopAttrib'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalCoord1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glDisable'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMap2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMultMatrixf'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalMesh2'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPushAttrib'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexCoord2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage3D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glOrtho'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPolygonMode'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTranslatef'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPixelStorei'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetIntegerv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glScalef'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMultMatrixd'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage2D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glBegin'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glNormal3fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid2d'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex2fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetString'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glColor3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalPoint2'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex3fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetTexLevelParameteriv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage1D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetFloatv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalCoord2f'
collect2: error: ld returned 1 exit status
("/usr/bin/gcc",["-Wl,--hash-size=31","-Wl,--reduce-memory-overheads","/tmp/19672.c","-o","/tmp/19672","-lGLU","-L/usr/lib64/OpenGLRaw-1.3.0.0/ghc-7.6.2","-L/usr/lib64/ghc-7.6.2/base-4.6.0.1","-L/usr/lib64/ghc-7.6.2/integer-gmp-0.5.0.0","-L/usr/lib64/ghc-7.6.2/ghc-prim-0.3.0.0","-L/usr/lib64/ghc-7.6.2"])
/usr/bin/gcc returned ExitFailure 1 with error message:
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalMesh1'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTranslated'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMap1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glNormal3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEnd'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEnable'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalPoint1'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPopAttrib'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalCoord1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glDisable'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMap2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMultMatrixf'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalMesh2'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPushAttrib'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexCoord2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid1f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage3D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glOrtho'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPolygonMode'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTranslatef'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glPixelStorei'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetIntegerv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glScalef'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMultMatrixd'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage2D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glBegin'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glNormal3fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glMapGrid2d'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex2fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetString'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glColor3f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalPoint2'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex3fv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetTexLevelParameteriv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glTexImage1D'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glVertex2f'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glGetFloatv'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libGLU.so:
undefined reference to `glEvalCoord2f'
collect2: error: ld returned 1 exit status
("/usr/bin/gcc",["-Wl,--hash-size=31","-Wl,--reduce-memory-overheads","/tmp/19672.c","-o","/tmp/19672","-c","-D__GLASGOW_HASKELL__=706","-Dlinux_HOST_OS=1","-Dx86_64_HOST_ARCH=1","-Idist/build/autogen","-Iinclude","-I.","-DCALLCONV=ccall","-DUSE_DLSYM","-I/usr/lib64/ghc-7.6.2/base-4.6.0.1/include","-I/usr/lib64/ghc-7.6.2/include","-DUSE_DLSYM"])
cabal: Missing dependency on a foreign library:

I'm using Exherbo, with the following versions of C-based libraries:

  • glu: 9.0.0
  • mesa: 9.0.3
  • xorg-server: 1.13.3
  • nvidia-drivers (which I normally use for OpenGL; also tried with the mesa/xorg version): 313.26

GHC version: 7.6.2
cabal-install version: 1.16.0.2

@ivan-m
ivan-m commented Apr 10, 2013

I've worked out the issue: it also needs to link to the GL library, so that needs to be added to the extra-libraries field.

@dagit
Member
dagit commented Apr 10, 2013

If you send me a patch I'll test it on other systems.

Thanks!

On Tue, Apr 9, 2013 at 9:11 PM, Ivan Lazar Miljenovic <
notifications@github.com> wrote:

I've worked out the issue: it also needs to link to the GL library, so
that needs to be added to the extra-libraries field.


Reply to this email directly or view it on GitHubhttps://github.com/haskell-opengl/GLURaw/issues/3#issuecomment-16154464
.

@ivan-m
ivan-m commented Apr 10, 2013

#4

@svenpanne
Member

I think that this is a bug in your libGLU.so, not a but in the GLURaw package. Dynamic libraries contain their dependencies, in our example libGLU.so should contain a dependency on libGL.so. On my machine (Ubuntu 12.04 x64):

svenpanne@svenpanne:~$ objdump -x /usr/lib/x86_64-linux-gnu/libGLU.so | grep NEEDED
  NEEDED               libGL.so.1
  NEEDED               libstdc++.so.6
  NEEDED               libm.so.6
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6

Of course the dynamic linker should find all dependencies (transitively). Again, on my machine:

svenpanne@svenpanne:~$ ldd /usr/lib/x86_64-linux-gnu/libGLU.so
    linux-vdso.so.1 =>  (0x00007fff383e8000)
    libGL.so.1 => /usr/lib/nvidia-current/libGL.so.1 (0x00007fa4f978e000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa4f948e000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa4f9191000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa4f8f7b000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa4f8bbc000)
    libnvidia-tls.so.310.51 => /usr/lib/nvidia-current/tls/libnvidia-tls.so.310.51 (0x00007fa4f89b8000)
    libnvidia-glcore.so.310.51 => /usr/lib/nvidia-current/libnvidia-glcore.so.310.51 (0x00007fa4f64c5000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa4f6190000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fa4f5f7e000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa4f5d7a000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fa4f9d44000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa4f5b5b000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa4f5958000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa4f5752000)

Can you verify this on your machine? What do objdump/ldd say for the GLUT dynamic library? We don't explicitly state the transitive library dependencies there, either.

@ivan-m
ivan-m commented Aug 14, 2013

I'm not on that box at the moment, so I can't paste the results right now.

I use the NVidia binary drivers, so I wonder if that's part of the issue (as such I doubt the distro can do much about it).

@svenpanne
Member

GLU is not part of the NVIDIA drivers, on Linux it is typically part of Mesa.

svenpanne@svenpanne:~/v8$ dpkg -S /usr/lib/x86_64-linux-gnu/libGLU.so
libglu1-mesa-dev: /usr/lib/x86_64-linux-gnu/libGLU.so

As you can see from my ldd output above, I'm using NVIDIA drivers myself, BTW. My gut feeling is that it is a bug in how your distro (Exherbo, never heard of it) builds/installs Mesa.

@ivan-m
ivan-m commented Aug 14, 2013

The way exherbo builds glu is to do a standard ./configure && make && make install but with the --enable-osmesa configure parameter.

Building mesa is a bit more involved, primarily due to multibuild.

Exherbo was started by ex-Gentoo devs, and is a source-based-distro.

@svenpanne
Member

Any progress on getting the output of objdump/ldd on Exherbo? It would really be nice to know what's different there... If it's Gentoo-based, it would be interesting to see the objdump/ldd output from such a platform, too.

@ivan-m
ivan-m commented Sep 16, 2013

I've just remembered about this :s

$objdump -x /usr/lib64/libGLU.so | grep NEEDED
  NEEDED               libOSMesa.so.8
  NEEDED               libglapi.so.0
  NEEDED               libpthread.so.0
  NEEDED               libdl.so.2
  NEEDED               libstdc++.so.6
  NEEDED               libm.so.6
  NEEDED               libc.so.6
  NEEDED               libgcc_s.so.1
$ldd /usr/lib64/libGLU.so
        linux-vdso.so.1 (0x00007fff4f9ff000)
        libOSMesa.so.8 => /usr/lib64/../lib64/libOSMesa.so.8 (0x00007f9277f81000)
        libglapi.so.0 => /usr/lib64/../lib64/libglapi.so.0 (0x00007f9277d3c000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9277ae6000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f92778e2000)
        libstdc++.so.6 => /usr/lib64/../lib64/libstdc++.so.6 (0x00007f92775e0000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f92772e3000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f9276f36000)
        libgcc_s.so.1 => /usr/lib64/../lib64/libgcc_s.so.1 (0x00007f9276d20000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f92787cf000)

That said, with the new 1.4.0.0 release, I don't seem to have any problems configuring & building GLURaw as-is, so maybe there was some issue with my system that has since been fixed? shrug

@svenpanne
Member

OK, nice, "fixing" things by waiting is the way to go! ;-) Closing...

@svenpanne svenpanne closed this Sep 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment