On Thu, Dec 23, 2004 at 08:20:40PM -0600, Mark Nipper wrote:
>       While trying to build vlc here at home, I got this:
> ---
> gcc -Wsign-compare -Wall -pipe -o libopengl_plugin.so 
> libopengl_plugin_a-opengl.o `top_builddir=../.. ../../vlc-config --libs 
> plugin opengl`
> /usr/bin/ld: /usr/lib/libGL.a(glapi.o): relocation R_X86_64_32 can not be 
> used when making a shared object; recompile with -fPIC
> /usr/lib/libGL.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[5]: *** [libopengl_plugin.so] Error 1

This is how it should fail if you're trying to link to a static
library.  Static libraries should be build _without_ -fPIC, and
shared with -fPIC.

In the special case you need a static lib to link a shared lib,
you have to have a static PIC lib named like that.

But there is a shared version of the lib available as
/usr/lib/libGL.so (in xlibmesa-gl-dev), why aren't you using
that?

>       I should mention I'm trying to debuild the vlc package,
> not straight from source from upstream.  The maintainer left off
> --enable-ncurses (bug filed already) and I successfully rebuilt
> the package at work on x86.  I was just trying to build the same
> here at home on x86_64.  :)

Unfortuantly, x86 does not enforce those -fPIC for shared
libraries.  amd64 seem to be the one that enforces it most
strictly, followed by hppa.

And from which sources are you trying to build it?  And you
installed all the build dependencies?  (apt-get build-dep vlc)

I did added --enable-ncurses to the configure flags and did a
complete build which was succesful.


Kurt


Reply via email to