[Mesa-dev] link error caused by "-l -O2"
Matt Turner
mattst88 at gmail.com
Tue Aug 14 15:54:25 PDT 2012
On Tue, Aug 14, 2012 at 10:34 AM, Kevin H. Hobbs <hobbsk at ohio.edu> wrote:
> I just checked out mesa from git.
>
> My system runs Fedora 17 x86_64.
>
> I configured mesa with :
>
> $ ./autogen.sh \
> --prefix=/home/kevin/mesa_build/ \
> --disable-dri \
> --enable-glx \
> --enable-xlib-glx \
> --enable-osmesa \
> --without-gallium-drivers
>
> and built with :
>
> $ make -ij8 && make
>
> I get :
>
> gmake[5]: Entering directory `/home/kevin/mesa/src/mesa/drivers/x11'
> CCLD libGL.la
> /usr/bin/ld: cannot find -l-O2
> collect2: error: ld returned 1 exit status
>
> I ran :
>
> $ make SHELL="sh -xv"
>
> and got:
>
> ++ gcc -shared -fPIC -DPIC .libs/fakeglx.o .libs/glxapi.o .libs/xfonts.o
> .libs/xm_api.o .libs/xm_buffer.o .libs/xm_dd.o .libs/xm_line.o
> .libs/xm_tri.o -Wl,--whole-archive ../../../../src/mesa/.libs/libmesa.a
> ../../../../src/mapi/glapi/.libs/libglapi.a -Wl,--no-whole-archive -lX11
> -lXext -lm -lpthread -ldl -L../../../../lib -l -O2 -Wl,-soname
> -Wl,libGL.so.1 -o .libs/libGL.so.1.6.0
> /usr/bin/ld: cannot find -l-O2
> collect2: error: ld returned 1 exit status
>
> I find the "-l -O2" suspicious.
Yeah, check out my comment here:
https://bugs.gentoo.org/show_bug.cgi?id=429288#c7
The attached patch fixes the linking problems with (shared-)glapi and
libstdc++. Unfortunately, it doesn't make it work -- libGL.so doesn't
export any gl* functions. Not sure what's going on here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.patch
Type: application/octet-stream
Size: 1137 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120814/fc3dd4e8/attachment-0001.obj>
More information about the mesa-dev
mailing list