[Spice-devel] How to build spice vdagent for win32?

Frediano Ziglio fziglio at redhat.com
Fri May 25 11:35:47 UTC 2018


> Hi

> > > Hello, everyone!
> > 
> 
> > > I build spice vdagent as [1] in fedora28, but it failed as [2], I'm a
> > > truly
> > > newbie in windows,
> > 
> 
> > > that's helped if I can get some document or a build flow.
> > 
> 

> > > [1]
> > 
> 
> > > # sudo apt-get install mingw-w64-x86-64 mingw64-filesystem
> > > mingw64-cximage-static mingw64-jasper-static mingw64-libjpeg-turbo-static
> > > mingw64-libpng-static mingw64-libtiff-static mingw64-zlib-static
> > > mingw64-winpthreads-static
> > 
> 

> > > # ./autogen.sh
> > 
> 

> > > # ./configure CXXFLAGS=-I/usr/x86_64-w64-mingw32/sys-root/mingw/include
> > > CXIMAGE_CFLAGS=-I/usr/x86_64-w64-mingw32/sys-root/mingw/include/CxImage
> > > CXIMAGE_LIBS=-ljasper -ljpeg -lpng -ltiff -lz -lcximage
> > > LDFLAGS=-L/usr/x86_64-w64-mingw32/sys-root/mingw/lib
> > > CXX=x86_64-w64-mingw32-g++ CC=gcc
> > 
> 

> > CxImage requirement was removed time ago using libpng directly (also
> > considering that CxImage is not more maintained and contains security
> > issues).
> 
> > Why you are passing CXIMAGE flags?
> 
> > To cross compile is better to use the --host option, like
> 

> > ./configure --host=x86_64-w64-mingw32
> 

> > in Fedora there's a very useful script called "mingw32-configure" (or
> > "mingw64-configure") which calls configure with the correct
> 
> > settings to cross compile with MingW
> 

> thx, it works well in master branch.

> > > add follows to Makefile:
> > 
> 
> > > WINDRES = x86_64-w64-mingw32-windres
> > 
> 
> > > EXEEXT = .exe
> > 
> 

> > > # make
> > 
> 

> > > [2]
> > 
> 
> > > [pencc at localhost vdagent-win-0.8.0]$ make
> > 
> 
> > > make all-recursive
> > 
> 
> > > CXX vdagent-vdcommon.o
> > 
> 
> > > CXX vdagent-vdlog.o
> > 
> 
> > > CXX vdagent-display_configuration.o
> > 
> 
> > > CXX vdagent-desktop_layout.o
> > 
> 
> > > CXX vdagent-display_setting.o
> > 
> 
> > > CXX vdagent-file_xfer.o
> > 
> 
> > > CXX vdagent-vdagent.o
> > 
> 
> > > CXX vdagent-as_user.o
> > 
> 
> > > GEN vdagent_rc.o
> > 
> 
> > > CXXLD vdagent.exe
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libtiff.a(tif_win32.o):(.text+0x7f0):
> > > multiple definition of `_TIFFmalloc'
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libcximage.a(tif_xfile.o):(.text+0x2d0):
> > > first defined here
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libtiff.a(tif_win32.o):(.text+0x830):
> > > multiple definition of `_TIFFfree'
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libcximage.a(tif_xfile.o):(.text+0x2e0):
> > > first defined here
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libtiff.a(tif_win32.o):(.text+0x840):
> > > multiple definition of `_TIFFrealloc'
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libcximage.a(tif_xfile.o):(.text+0x2f0):
> > > first defined here
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libtiff.a(tif_win32.o):(.text+0x850):
> > > multiple definition of `_TIFFmemset'
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libcximage.a(tif_xfile.o):(.text+0x300):
> > > first defined here
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libtiff.a(tif_win32.o):(.text+0x860):
> > > multiple definition of `_TIFFmemcpy'
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libcximage.a(tif_xfile.o):(.text+0x310):
> > > first defined here
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libtiff.a(tif_win32.o):(.text+0x870):
> > > multiple definition of `_TIFFmemcmp'
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libcximage.a(tif_xfile.o):(.text+0x320):
> > > first defined here
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libtiff.a(tif_win32.o):(.data+0x0):
> > > multiple definition of `_TIFFerrorHandler'
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libcximage.a(tif_xfile.o):(.data+0x0):
> > > first defined here
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libtiff.a(tif_win32.o):(.data+0x8):
> > > multiple definition of `_TIFFwarningHandler'
> > 
> 
> > > /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libcximage.a(tif_xfile.o):(.data+0x8):
> > > first defined here
> > 
> 
> > > /tmp/cc9kug4b.ltrans1.ltrans.o:<artificial>:(.text+0x1113): undefined
> > > reference to `__imp_CreateDCW'
> > 
> 

> > Why using LTO?
> 
> > Looks like you are using an older version, looking at your previous e-mail
> > you
> 
> > have the correct git repository but you are not using master.
> 

> I download it from
> https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.8.0/ ,
> and we are using the vdagent provided by
> oVirt-toolsSetup-4.2-1.el7.centos.iso, is the vdagent build
> from master code will works well with the other program provided by
> oVirt-toolsSetup-4.2-1.el7.centos.iso?
> if so, we can use the newest version rather than vdagent-win-0.8.0(or others
> version).

Yes, is full compatible. 

Frediano 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180525/4b06e0dd/attachment.html>


More information about the Spice-devel mailing list