<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7601.19038"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt 微软雅黑">
<DIV>>>> Christophe Fergeau <cfergeau@redhat.com> 2016/4/18 星期一 下午 3:40 >>><BR>>Hey,<BR>><BR>>On Mon, Apr 18, 2016 at 03:18:25PM +0800, Lin Ma wrote:<BR>>> Because we missed variables GL_LIBS and GL_CFLAGS in generated Makefile.in,<BR>>> The linker flag and the compiler flag wont be generated in Makefile.<BR>>> It causes spice-gtk building failure with --enable-opengl option.<BR>><BR>>Can you give more details about the error you are getting?<BR>>I cannot find GL_LIBS/GL_CFLAGS in spice-gtk Makefile.am, and in<BR>>spice-common, GL_LIBS and GL_CFLAGS are added SPICE_COMMON_{LIBS,CFLAGS}<BR>>which are AC_SUBST'ed.<BR>>(for what it's worth, using --enable-opengl is not recommended)<BR></DIV>
<DIV>I'm doing something about qemu virtio-gpu with spice+opengl.</DIV>
<DIV>I need the remote-viewer in virt-viewer package to connect a spice+gl unix domain.</DIV>
<DIV>the virt-viewer with opengl support requires spice-gtk(with opengl enabled).</DIV>
<DIV> </DIV>
<DIV>So I need to build spice-gtk with opengl option. Then I experienced the following issue:</DIV>
<DIV>~/projects/spice-gtk$ ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --enable-opengl && make</DIV>
<DIV>......</DIV>
<DIV>./.libs/libspice-client-glib-2.0.so: undefined reference to `gluTessVertex'<BR>./.libs/libspice-client-glib-2.0.so: undefined reference to `glXCreatePixmap'<BR>./.libs/libspice-client-glib-2.0.so: undefined reference to `glEnd'<BR>./.libs/libspice-client-glib-2.0.so: undefined reference to `glXMakeCurrent'<BR>./.libs/libspice-client-glib-2.0.so: undefined reference to `XFree'<BR>./.libs/libspice-client-glib-2.0.so: undefined reference to `glEnable'<BR>./.libs/libspice-client-glib-2.0.so: undefined reference to `glLineWidth'<BR>./.libs/libspice-client-glib-2.0.so: undefined reference to `glBitmap'</DIV>
<DIV>......</DIV>
<DIV> </DIV>
<DIV>See, The linker flag variable $GL_LIBS which the value should be '-lGL -lGLU' are not passed into Makefile correctly.</DIV>
<DIV>The variable $GL_LIBS should be generated/passed into Makefile.in first by m4 macro, Then finally the value '-lGL -lGLU' can be </DIV>
<DIV>attached to it correctly.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Lin</DIV></BODY></HTML>