[libvirt] [PATCH] build: fix some mingw issues

On Fedora 13 with sufficient mingw32-* packages installed, running ./autobuild.sh failed to cross-compile to mingw because mingw32-pthreads installed a broken <pthread.h>. With that issue fixed, the build still failed due to use of O_SYNC. Meanwhile, recent .spec.in changes got out of sync, and running ./autobuild.sh generates some leftover files worth ignoring. * bootstrap.conf (gnulib_modules): Add fcntl-h, for O_SYNC. * .gnulib: Update to latest, to work around buggy pthreads-win32 library. * bootstrap: Import latest from gnulib. * mingw32-libvirt.spec.in: Distribute new file. * .gitignore: Ignore files built by ./autobuild.sh. --- Took me the better part of a day to track all of this down, but I got back to the point where ./autobuild.sh works when you have a mingw cross-compiler installed. .gitignore | 4 ++++ .gnulib | 2 +- bootstrap | 14 ++++++++------ bootstrap.conf | 1 + mingw32-libvirt.spec.in | 1 + 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 39ed671..fee8f8e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,10 @@ /GNUmakefile /libvirt-[0-9]* /maint.mk +/tools/virsh-console.gcda +/tools/virsh-console.gcno +/tools/virsh-virsh.gcda +/tools/virsh-virsh.gcno ABOUT-NLS COPYING ChangeLog diff --git a/.gnulib b/.gnulib index 28e5820..df6774c 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 28e58203a7ab14264f8fa450884a89e9ae48025c +Subproject commit df6774c09485e6b0f31f4659eb55d50c68c008a8 diff --git a/bootstrap b/bootstrap index 365a3d9..2422549 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2010-02-24.17; # UTC +scriptversion=2010-05-17.18; # UTC # Bootstrap this package from checked-out sources. @@ -409,6 +409,7 @@ git_modules_config () { } gnulib_path=`git_modules_config submodule.gnulib.path` +: ${gnulib_path=gnulib} # Get gnulib files. @@ -424,7 +425,8 @@ case ${GNULIB_SRCDIR--} in trap cleanup_gnulib 1 2 13 15 - git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow= + shallow= + git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2' git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || cleanup_gnulib @@ -437,7 +439,7 @@ case ${GNULIB_SRCDIR--} in if test -d "$GNULIB_SRCDIR"/.git && \ git_modules_config submodule.gnulib.url >/dev/null; then echo "$0: getting gnulib files..." - if git submodule --help|grep reference > /dev/null; then + if git submodule -h|grep -- --reference > /dev/null; then # Prefer the one-liner available in git 1.6.4 or newer. git submodule update --init --reference "$GNULIB_SRCDIR" \ "$gnulib_path" || exit $? @@ -488,7 +490,7 @@ update_po_files() { test -d $ref_po_dir || mkdir $ref_po_dir || return download_po_files $ref_po_dir $domain \ && ls "$ref_po_dir"/*.po 2>/dev/null | - sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'` test "$langs" = '*' && langs=x @@ -819,7 +821,7 @@ if test $with_gettext = yes; then a\ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} } - ' po/Makevars.template >po/Makevars + ' po/Makevars.template >po/Makevars || exit 1 if test -d runtime-po; then # Similarly for runtime-po/Makevars, but not quite the same. @@ -833,7 +835,7 @@ if test $with_gettext = yes; then a\ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} } - ' <po/Makevars.template >runtime-po/Makevars + ' po/Makevars.template >runtime-po/Makevars || exit 1 # Copy identical files from po to runtime-po. (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) diff --git a/bootstrap.conf b/bootstrap.conf index 1e193d9..44d6d0e 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -27,6 +27,7 @@ close connect count-one-bits dirname-lgpl +fcntl-h getaddrinfo gethostname getpass diff --git a/mingw32-libvirt.spec.in b/mingw32-libvirt.spec.in index fc90203..6b2b5c6 100644 --- a/mingw32-libvirt.spec.in +++ b/mingw32-libvirt.spec.in @@ -91,6 +91,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{_mingw32_datadir}/libvirt/ %dir %{_mingw32_datadir}/libvirt/schemas/ %{_mingw32_datadir}/libvirt/schemas/domain.rng +%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng %{_mingw32_datadir}/libvirt/schemas/network.rng %{_mingw32_datadir}/libvirt/schemas/storagepool.rng %{_mingw32_datadir}/libvirt/schemas/storagevol.rng -- 1.7.0.1

On Wed, Jun 02, 2010 at 03:53:12PM -0600, Eric Blake wrote:
On Fedora 13 with sufficient mingw32-* packages installed, running ./autobuild.sh failed to cross-compile to mingw because mingw32-pthreads installed a broken <pthread.h>. With that issue fixed, the build still failed due to use of O_SYNC.
Indeed you shouldn't install mingw32-pthreads - it horribly pollutes the global namespace & libvirt doesn't want it - we use Win32 native threads Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On 06/03/2010 04:08 AM, Daniel P. Berrange wrote:
On Wed, Jun 02, 2010 at 03:53:12PM -0600, Eric Blake wrote:
On Fedora 13 with sufficient mingw32-* packages installed, running ./autobuild.sh failed to cross-compile to mingw because mingw32-pthreads installed a broken <pthread.h>. With that issue fixed, the build still failed due to use of O_SYNC.
Indeed you shouldn't install mingw32-pthreads - it horribly pollutes the global namespace & libvirt doesn't want it - we use Win32 native threads
That would be nice, if yum didn't also insist upon removing everything else mingw related: Removing: mingw32-pthreads noarch 2.8.0-10.fc13 @fedora 936 k Removing for dependencies: mingw32-gcc x86_64 4.4.2-2.fc13 @fedora 3.1 M mingw32-gcc-c++ x86_64 4.4.2-2.fc13 @fedora 24 M mingw32-gettext noarch 0.17-12.fc12 @fedora 20 M mingw32-glib2 noarch 2.23.4-1.fc13 @fedora 7.6 M mingw32-glibmm24 noarch 2.23.2-1.fc13 @fedora 6.4 M mingw32-gnutls noarch 2.6.4-3.fc13 @fedora 2.4 M mingw32-libsigc++20 noarch 2.2.4.2-1.fc12 @fedora 1.7 M mingw32-libxml++ noarch 2.26.0-3.fc12 @fedora 1.2 M What's weird is that I don't recall having mingw32-pthreads installed on a 32-bit fedora 13; it must be something about the 64-bit x86_64 packages that is mistakenly sucking in this less-than-stellar package. So, is the libvirt patch worth installing, while we wait for the eventual fix of dependencies to not force mingw32-pthreads on 64-bit users? -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Thu, Jun 03, 2010 at 07:58:43AM -0600, Eric Blake wrote:
On 06/03/2010 04:08 AM, Daniel P. Berrange wrote:
On Wed, Jun 02, 2010 at 03:53:12PM -0600, Eric Blake wrote:
On Fedora 13 with sufficient mingw32-* packages installed, running ./autobuild.sh failed to cross-compile to mingw because mingw32-pthreads installed a broken <pthread.h>. With that issue fixed, the build still failed due to use of O_SYNC.
Indeed you shouldn't install mingw32-pthreads - it horribly pollutes the global namespace & libvirt doesn't want it - we use Win32 native threads
That would be nice, if yum didn't also insist upon removing everything else mingw related:
Removing: mingw32-pthreads noarch 2.8.0-10.fc13 @fedora 936 k Removing for dependencies: mingw32-gcc x86_64 4.4.2-2.fc13 @fedora 3.1 M mingw32-gcc-c++ x86_64 4.4.2-2.fc13 @fedora 24 M mingw32-gettext noarch 0.17-12.fc12 @fedora 20 M mingw32-glib2 noarch 2.23.4-1.fc13 @fedora 7.6 M mingw32-glibmm24 noarch 2.23.2-1.fc13 @fedora 6.4 M mingw32-gnutls noarch 2.6.4-3.fc13 @fedora 2.4 M mingw32-libsigc++20 noarch 2.2.4.2-1.fc12 @fedora 1.7 M mingw32-libxml++ noarch 2.26.0-3.fc12 @fedora 1.2 M
What's weird is that I don't recall having mingw32-pthreads installed on a 32-bit fedora 13; it must be something about the 64-bit x86_64 packages that is mistakenly sucking in this less-than-stellar package.
Hmm, that sounds like a packaging bug to me - pthreads certainly used to be optional :-(
So, is the libvirt patch worth installing, while we wait for the eventual fix of dependencies to not force mingw32-pthreads on 64-bit users?
How about changing configure.ac so that it defaults to looking for win32 threads on Win32, rather than trying pthreads Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On 06/03/2010 08:02 AM, Daniel P. Berrange wrote:
So, is the libvirt patch worth installing, while we wait for the eventual fix of dependencies to not force mingw32-pthreads on 64-bit users?
How about changing configure.ac so that it defaults to looking for win32 threads on Win32, rather than trying pthreads
That would also be a useful patch, but seems like it would be insufficient on its own. In other words, there are two issues here - dealing with a broken <pthread.h> if it gets pulled in (which, for example, it WILL be pulled in by gnulib if it exists since it defines struct timespec, even if we don't use it for anything pthread-related), and the issue of whether we should favor pthread or win32 threading. I'll start working on a patch for the latter (favor win32 threading even if mingw32-pthreads is installed), but that should not interfere with installing this patch. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

* src/util/threads.c (includes) [WIN32]: On mingw, favor native threading over pthreads-win32 library. * src/util/thread.h [WIN32] Likewise. Suggested by Daniel P. Berrange. --- Changes from v1: new patch: On 06/03/2010 08:02 AM, Daniel P. Berrange wrote:
So, is the libvirt patch worth installing, while we wait for the eventual fix of dependencies to not force mingw32-pthreads on 64-bit users?
How about changing configure.ac so that it defaults to looking for win32 threads on Win32, rather than trying pthreads That would also be a useful patch, but seems like it would be insufficient on its own. In other words, there are two issues here - dealing with a broken <pthread.h> if it gets pulled in (which, for example, it WILL be pulled in by gnulib if it exists since it defines struct timespec, even if we don't use it for anything pthread-related), and the issue of whether we should favor pthread or win32 threading.
It turns out to not be a configure.ac issue at all. I tested that patch 1/2, in isolation, solves the struct timespec issue that I was seeing on mingw by not pulling in pthreads-win32 code, but does not solve remaining mingw issues. And patch 2/2, in isolation, compiles clean but doesn't avoid pthreads-win32. So, okay to push both patches? src/util/threads-win32.c | 2 +- src/util/threads.c | 12 ++++++------ src/util/threads.h | 10 ++++------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/util/threads-win32.c b/src/util/threads-win32.c index e478560..fe1fcd0 100644 --- a/src/util/threads-win32.c +++ b/src/util/threads-win32.c @@ -1,7 +1,7 @@ /* * threads-win32.c: basic thread synchronization primitives * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009-2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/util/threads.c b/src/util/threads.c index 8c0a91a..4ebce56 100644 --- a/src/util/threads.c +++ b/src/util/threads.c @@ -23,12 +23,12 @@ #include "threads.h" -#ifdef HAVE_PTHREAD_MUTEXATTR_INIT +/* On mingw, we prefer native threading over the sometimes-broken + * pthreads-win32 library wrapper. */ +#ifdef WIN32 +# include "threads-win32.c" +#elif defined HAVE_PTHREAD_MUTEXATTR_INIT # include "threads-pthread.c" #else -# ifdef WIN32 -# include "threads-win32.c" -# else -# error "Either pthreads or Win32 threads are required" -# endif +# error "Either pthreads or Win32 threads are required" #endif diff --git a/src/util/threads.h b/src/util/threads.h index 8b2be8d..db54ea0 100644 --- a/src/util/threads.h +++ b/src/util/threads.h @@ -61,14 +61,12 @@ int virThreadLocalInit(virThreadLocalPtr l, void *virThreadLocalGet(virThreadLocalPtr l); void virThreadLocalSet(virThreadLocalPtr l, void*); -# ifdef HAVE_PTHREAD_MUTEXATTR_INIT +# ifdef WIN32 +# include "threads-win32.h" +# elif defined HAVE_PTHREAD_MUTEXATTR_INIT # include "threads-pthread.h" # else -# ifdef WIN32 -# include "threads-win32.h" -# else -# error "Either pthreads or Win32 threads are required" -# endif +# error "Either pthreads or Win32 threads are required" # endif #endif -- 1.7.0.1

On Wed, Jun 09, 2010 at 02:49:35PM -0600, Eric Blake wrote:
* src/util/threads.c (includes) [WIN32]: On mingw, favor native threading over pthreads-win32 library. * src/util/thread.h [WIN32] Likewise. Suggested by Daniel P. Berrange. ---
Changes from v1: new patch:
On 06/03/2010 08:02 AM, Daniel P. Berrange wrote:
So, is the libvirt patch worth installing, while we wait for the eventual fix of dependencies to not force mingw32-pthreads on 64-bit users?
How about changing configure.ac so that it defaults to looking for win32 threads on Win32, rather than trying pthreads That would also be a useful patch, but seems like it would be insufficient on its own. In other words, there are two issues here - dealing with a broken <pthread.h> if it gets pulled in (which, for example, it WILL be pulled in by gnulib if it exists since it defines struct timespec, even if we don't use it for anything pthread-related), and the issue of whether we should favor pthread or win32 threading.
It turns out to not be a configure.ac issue at all. I tested that patch 1/2, in isolation, solves the struct timespec issue that I was seeing on mingw by not pulling in pthreads-win32 code, but does not solve remaining mingw issues. And patch 2/2, in isolation, compiles clean but doesn't avoid pthreads-win32.
So, okay to push both patches?
src/util/threads-win32.c | 2 +- src/util/threads.c | 12 ++++++------ src/util/threads.h | 10 ++++------ 3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/util/threads-win32.c b/src/util/threads-win32.c index e478560..fe1fcd0 100644 --- a/src/util/threads-win32.c +++ b/src/util/threads-win32.c @@ -1,7 +1,7 @@ /* * threads-win32.c: basic thread synchronization primitives * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009-2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/util/threads.c b/src/util/threads.c index 8c0a91a..4ebce56 100644 --- a/src/util/threads.c +++ b/src/util/threads.c @@ -23,12 +23,12 @@
#include "threads.h"
-#ifdef HAVE_PTHREAD_MUTEXATTR_INIT +/* On mingw, we prefer native threading over the sometimes-broken + * pthreads-win32 library wrapper. */ +#ifdef WIN32 +# include "threads-win32.c" +#elif defined HAVE_PTHREAD_MUTEXATTR_INIT # include "threads-pthread.c" #else -# ifdef WIN32 -# include "threads-win32.c" -# else -# error "Either pthreads or Win32 threads are required" -# endif +# error "Either pthreads or Win32 threads are required" #endif diff --git a/src/util/threads.h b/src/util/threads.h index 8b2be8d..db54ea0 100644 --- a/src/util/threads.h +++ b/src/util/threads.h @@ -61,14 +61,12 @@ int virThreadLocalInit(virThreadLocalPtr l, void *virThreadLocalGet(virThreadLocalPtr l); void virThreadLocalSet(virThreadLocalPtr l, void*);
-# ifdef HAVE_PTHREAD_MUTEXATTR_INIT +# ifdef WIN32 +# include "threads-win32.h" +# elif defined HAVE_PTHREAD_MUTEXATTR_INIT # include "threads-pthread.h" # else -# ifdef WIN32 -# include "threads-win32.h" -# else -# error "Either pthreads or Win32 threads are required" -# endif +# error "Either pthreads or Win32 threads are required" # endif
#endif --
ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Fedora 13 with sufficient mingw32-* packages installed, running ./autobuild.sh failed to cross-compile to mingw because mingw32-pthreads installed a broken <pthread.h>. With that issue fixed, the build still failed due to use of O_SYNC. Meanwhile, recent .spec.in changes got out of sync, and running ./autobuild.sh generates some leftover files worth ignoring. * bootstrap.conf (gnulib_modules): Add fcntl-h, for O_SYNC. * .gnulib: Update to latest, to work around buggy pthreads-win32 library. * bootstrap: Import latest from gnulib. * mingw32-libvirt.spec.in: Distribute new file. * .gitignore: Ignore files built by ./autobuild.sh. --- Changes from v1: update .gnulib to yet a newer date (16 new upstream patches). Drop .gitignore change; the 'make cov' droppings are now covered in a separate patch. .gnulib | 2 +- bootstrap | 14 ++++++++------ bootstrap.conf | 1 + mingw32-libvirt.spec.in | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gnulib b/.gnulib index 28e5820..1629006 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 28e58203a7ab14264f8fa450884a89e9ae48025c +Subproject commit 1629006348e1f66f07ce3ddcf3ebd2d14556cfce diff --git a/bootstrap b/bootstrap index 365a3d9..2422549 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2010-02-24.17; # UTC +scriptversion=2010-05-17.18; # UTC # Bootstrap this package from checked-out sources. @@ -409,6 +409,7 @@ git_modules_config () { } gnulib_path=`git_modules_config submodule.gnulib.path` +: ${gnulib_path=gnulib} # Get gnulib files. @@ -424,7 +425,8 @@ case ${GNULIB_SRCDIR--} in trap cleanup_gnulib 1 2 13 15 - git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow= + shallow= + git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2' git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || cleanup_gnulib @@ -437,7 +439,7 @@ case ${GNULIB_SRCDIR--} in if test -d "$GNULIB_SRCDIR"/.git && \ git_modules_config submodule.gnulib.url >/dev/null; then echo "$0: getting gnulib files..." - if git submodule --help|grep reference > /dev/null; then + if git submodule -h|grep -- --reference > /dev/null; then # Prefer the one-liner available in git 1.6.4 or newer. git submodule update --init --reference "$GNULIB_SRCDIR" \ "$gnulib_path" || exit $? @@ -488,7 +490,7 @@ update_po_files() { test -d $ref_po_dir || mkdir $ref_po_dir || return download_po_files $ref_po_dir $domain \ && ls "$ref_po_dir"/*.po 2>/dev/null | - sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'` test "$langs" = '*' && langs=x @@ -819,7 +821,7 @@ if test $with_gettext = yes; then a\ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} } - ' po/Makevars.template >po/Makevars + ' po/Makevars.template >po/Makevars || exit 1 if test -d runtime-po; then # Similarly for runtime-po/Makevars, but not quite the same. @@ -833,7 +835,7 @@ if test $with_gettext = yes; then a\ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} } - ' <po/Makevars.template >runtime-po/Makevars + ' po/Makevars.template >runtime-po/Makevars || exit 1 # Copy identical files from po to runtime-po. (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) diff --git a/bootstrap.conf b/bootstrap.conf index 1e193d9..44d6d0e 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -27,6 +27,7 @@ close connect count-one-bits dirname-lgpl +fcntl-h getaddrinfo gethostname getpass diff --git a/mingw32-libvirt.spec.in b/mingw32-libvirt.spec.in index fc90203..6b2b5c6 100644 --- a/mingw32-libvirt.spec.in +++ b/mingw32-libvirt.spec.in @@ -91,6 +91,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{_mingw32_datadir}/libvirt/ %dir %{_mingw32_datadir}/libvirt/schemas/ %{_mingw32_datadir}/libvirt/schemas/domain.rng +%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng %{_mingw32_datadir}/libvirt/schemas/network.rng %{_mingw32_datadir}/libvirt/schemas/storagepool.rng %{_mingw32_datadir}/libvirt/schemas/storagevol.rng -- 1.7.0.1

On Wed, Jun 09, 2010 at 02:49:36PM -0600, Eric Blake wrote:
On Fedora 13 with sufficient mingw32-* packages installed, running ./autobuild.sh failed to cross-compile to mingw because mingw32-pthreads installed a broken <pthread.h>. With that issue fixed, the build still failed due to use of O_SYNC.
Meanwhile, recent .spec.in changes got out of sync, and running ./autobuild.sh generates some leftover files worth ignoring.
* bootstrap.conf (gnulib_modules): Add fcntl-h, for O_SYNC. * .gnulib: Update to latest, to work around buggy pthreads-win32 library. * bootstrap: Import latest from gnulib. * mingw32-libvirt.spec.in: Distribute new file. * .gitignore: Ignore files built by ./autobuild.sh. ---
Changes from v1: update .gnulib to yet a newer date (16 new upstream patches). Drop .gitignore change; the 'make cov' droppings are now covered in a separate patch.
.gnulib | 2 +- bootstrap | 14 ++++++++------ bootstrap.conf | 1 + mingw32-libvirt.spec.in | 1 + 4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/.gnulib b/.gnulib index 28e5820..1629006 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 28e58203a7ab14264f8fa450884a89e9ae48025c +Subproject commit 1629006348e1f66f07ce3ddcf3ebd2d14556cfce diff --git a/bootstrap b/bootstrap index 365a3d9..2422549 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2010-02-24.17; # UTC +scriptversion=2010-05-17.18; # UTC
# Bootstrap this package from checked-out sources.
@@ -409,6 +409,7 @@ git_modules_config () { }
gnulib_path=`git_modules_config submodule.gnulib.path` +: ${gnulib_path=gnulib}
# Get gnulib files.
@@ -424,7 +425,8 @@ case ${GNULIB_SRCDIR--} in
trap cleanup_gnulib 1 2 13 15
- git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow= + shallow= + git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2' git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || cleanup_gnulib
@@ -437,7 +439,7 @@ case ${GNULIB_SRCDIR--} in if test -d "$GNULIB_SRCDIR"/.git && \ git_modules_config submodule.gnulib.url >/dev/null; then echo "$0: getting gnulib files..." - if git submodule --help|grep reference > /dev/null; then + if git submodule -h|grep -- --reference > /dev/null; then # Prefer the one-liner available in git 1.6.4 or newer. git submodule update --init --reference "$GNULIB_SRCDIR" \ "$gnulib_path" || exit $? @@ -488,7 +490,7 @@ update_po_files() { test -d $ref_po_dir || mkdir $ref_po_dir || return download_po_files $ref_po_dir $domain \ && ls "$ref_po_dir"/*.po 2>/dev/null | - sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'` test "$langs" = '*' && langs=x @@ -819,7 +821,7 @@ if test $with_gettext = yes; then a\ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} } - ' po/Makevars.template >po/Makevars + ' po/Makevars.template >po/Makevars || exit 1
if test -d runtime-po; then # Similarly for runtime-po/Makevars, but not quite the same. @@ -833,7 +835,7 @@ if test $with_gettext = yes; then a\ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} } - ' <po/Makevars.template >runtime-po/Makevars + ' po/Makevars.template >runtime-po/Makevars || exit 1
# Copy identical files from po to runtime-po. (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) diff --git a/bootstrap.conf b/bootstrap.conf index 1e193d9..44d6d0e 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -27,6 +27,7 @@ close connect count-one-bits dirname-lgpl +fcntl-h getaddrinfo gethostname getpass diff --git a/mingw32-libvirt.spec.in b/mingw32-libvirt.spec.in index fc90203..6b2b5c6 100644 --- a/mingw32-libvirt.spec.in +++ b/mingw32-libvirt.spec.in @@ -91,6 +91,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{_mingw32_datadir}/libvirt/ %dir %{_mingw32_datadir}/libvirt/schemas/ %{_mingw32_datadir}/libvirt/schemas/domain.rng +%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng %{_mingw32_datadir}/libvirt/schemas/network.rng %{_mingw32_datadir}/libvirt/schemas/storagepool.rng %{_mingw32_datadir}/libvirt/schemas/storagevol.rng --
ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On 06/10/2010 04:12 AM, Daniel P. Berrange wrote:
On Wed, Jun 09, 2010 at 02:49:36PM -0600, Eric Blake wrote:
On Fedora 13 with sufficient mingw32-* packages installed, running ./autobuild.sh failed to cross-compile to mingw because mingw32-pthreads installed a broken <pthread.h>. With that issue fixed, the build still failed due to use of O_SYNC.
ACK
Thanks; both mingw-related patches now pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (2)
-
Daniel P. Berrange
-
Eric Blake