Re: 答复: Re: [spice-common PATCH] build-sys: Define opengl GL_LIBS and GL_CFLAGS in generated Makefile.in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 18, 2016 at 02:28:00AM -0600, Lin Ma wrote:
> >>> Christophe Fergeau <cfergeau@xxxxxxxxxx> 2016/4/18 星期一 下午 3:40 >>>
> >Hey,
> >
> >On Mon, Apr 18, 2016 at 03:18:25PM +0800, Lin Ma wrote:
> >> Because we missed variables GL_LIBS and GL_CFLAGS in generated Makefile.in,
> >> The linker flag and the compiler flag wont be generated in Makefile.
> >> It causes spice-gtk building failure with --enable-opengl option.
> >
> >Can you give more details about the error you are getting?
> >I cannot find GL_LIBS/GL_CFLAGS in spice-gtk Makefile.am, and in
> >spice-common, GL_LIBS and GL_CFLAGS are added SPICE_COMMON_{LIBS,CFLAGS}
> >which are AC_SUBST'ed.
> >(for what it's worth, using --enable-opengl is not recommended)
> I'm doing something about qemu virtio-gpu with spice+opengl.
> I need the remote-viewer in virt-viewer package to connect a spice+gl unix domain.
> the virt-viewer with opengl support requires spice-gtk(with opengl enabled).

Hmm wondering if you truly want --enable-opengl (which is an attempt at
doing client-side canvas drawing with opengl), or if all you need is the
gtkglarea/epoxy work which got into git master in the last months?

>  
> So I need to build spice-gtk with opengl option. Then I experienced the following issue:
> ~/projects/spice-gtk$ ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --enable-opengl && make
> ......
> ./.libs/libspice-client-glib-2.0.so: undefined reference to `gluTessVertex'
> ./.libs/libspice-client-glib-2.0.so: undefined reference to `glXCreatePixmap'
> ./.libs/libspice-client-glib-2.0.so: undefined reference to `glEnd'
> ./.libs/libspice-client-glib-2.0.so: undefined reference to `glXMakeCurrent'
> ./.libs/libspice-client-glib-2.0.so: undefined reference to `XFree'
> ./.libs/libspice-client-glib-2.0.so: undefined reference to `glEnable'
> ./.libs/libspice-client-glib-2.0.so: undefined reference to `glLineWidth'
> ./.libs/libspice-client-glib-2.0.so: undefined reference to `glBitmap'
> ......
>  
> See, The linker flag variable $GL_LIBS which the value should be '-lGL -lGLU' are not passed into Makefile correctly.
> The variable $GL_LIBS should be generated/passed into Makefile.in first by m4 macro, Then finally the value '-lGL -lGLU' can be 
> attached to it correctly.

Oh, I see, SPICE_COMMON_LIBS uses '$(GL_LIBS)' rather than '$GL_LIBS', so
the expansion of GL_LIBS is done in the Makefile at 'make' time rather
than at configure time. So we indeed need to AC_SUBST([GL_LIBS]) as
otherwise it's not going to get into the makefile. I'll add something
like this to the commit log and push.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]