[Mesa-dev] link error caused by "-l -O2"

Kevin H. Hobbs hobbsk at ohio.edu
Tue Aug 14 10:34:28 PDT 2012


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120814/1856f778/attachment-0001.pgp>


More information about the mesa-dev mailing list