[libvirt] [PATCH] maint: update to latest gnulib

Pulls in several portability fixes, including the fact that gnulib now only works on platforms with two's complement signed integers. Also makes for a smaller delta on the next update (we are waiting on a license change to unsetenv for the sake of mingw). * .gnulib: Update to latest. * bootstrap: Resync from upstream. * tests/virstringtest.c: Drop use of obsolete probes of integer properties. Signed-off-by: Eric Blake <eblake@redhat.com> --- I'd like to get this in now, before RC1 is cut, so that we maximize the testing of the bulk of the gnulib changes (rather than waiting for the unsetenv change needed for mingw to land, but forcing the gnulib update to only get testing in RC2). * .gnulib 6cc32c6...8d807a9 (127):
gendocs.sh: Set default TOP_NODE_UP_URL in HTML output. manywarnings: update for GCC 6.1 autoupdate intdiv0, memmem, nocrash, strcasestr, strstr: no exit glob: size_t overflow checks glob: don't assume INT_MAX < SIZE_MAX Fix undefined behaviour in gettext.h. autoupdate git-version-gen: avoid undefined shift update from texinfo glob: merge glibc changes into lib/glob.c mktime: spelling fix in comment mktime: port to stricter signed overflow checking mktime: speed up DEBUG_MKTIME benchmarks mktime: resurrect DEBUG_MKTIME testing mktime: simplify DEBUG_MKTIME Port mktime_internal offset to unsigned time_t xstrtol: prohibit monstrosities like "1bB" xstrtod: reinstate setting of *result upon ERANGE xstrtod: modify *result only if no errors btowc: document problems in C locale autoupdate update from texinfo mktime: improve integer overflow checking intprops: check two's complement assumption intprops, mktime, strtol: assume two's complement stdint: port to strict C11 left shift mbrtowc: work around glibc bug#19932 update from texinfo autoupdate stdint: detect good enough pre-C++11 stdint.h in C++ mode argp: merge changes from glibc Prefer American spelling for "initialize" autoupdate stddef: support configuring with g++ autoupdate autoupdate update from texinfo test-framework-sh: minor cleanups test-framework-sh: revert port to NetBSD 7.0 autoupdate Port better to Alpine Linux test-framework-sh: port to NetBSD 7.0 update from texinfo gitlog-to-changelog: suppress ignored chatter update from texinfo update from texinfo setlocale: add "sv" to Windows language table update from texinfo sys_select: port to new Cygwin test-userspec.c: do not trigger gcc's new -Wmisleading-indentation time_rz: port to clang -Wunused-const-variable std-gnu11: improve clang support select: port more to Intel 2016.1.150 compiler select: try to port to 2016.1.150 compiler localename-tests: memory allocation fixes intprops: make .h file license match module acl: fix missing return on Cygwin update from texinfo update from texinfo extern-inline: port to PGI CC update from texinfo update from texinfo signbit: port back to pre-C++11 GCC mountlist: recognize autofs-mounted remote file systems, too signbit: port to C++ with GCC 6 regex: make it closer to libc regex: merge patches from libc update from texinfo update from texinfo autoupdate autoupdate stdalign: port to older HP and IBM cc stdalign: port to clang 3.7.0 update from texinfo readdir_r: now obsolescent Use modern texinfo when syncing install.texi output from autoconf update from texinfo sync install.texi from autoconf misc: port better to gcc -fsanitize=address update from texinfo autoupdate verify-tests: also remove stray test-verify.Tpo std-gnu11: new module update from texinfo update from texinfo get-permissions, strftime: fix grammar in comments gettext: mark as obsolete gnulib-tool: don't give up on ln -s so easily closedir: fix OS/2-related typos openat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC regex: treat [x] as x if x is a unibyte encoding error closedir, dirfd, opendir: port to OpenSolaris 5.10 bootstrap: use American spelling @item needed inside @itemize hash-pjw-bare: fix comment wcwidth: Replace also on OpenBSD 5.8 update from texinfo gnu-web-doc-update: fix addition of new files utimens-tests: avoid pulling gettext .m4 files regex: pacify static checkers regex: fix [ diagnostic regex: fix memory leaks fts: don't unconditionally use leaf optimization for NFS * gnulib-tool: fix stray debug line in previous patch gnulib-tool: don't assume ln -s works utimes: detect utimes() correctly on OS/2 kLIBC openat_proc_name: port to OS/2 kLIBC stdint: check _INTPTR_T_DECLARED for intptr_t etc. doc: mention unfixed issues with unsupported localtime() values Go back to gettext-0.19.7 opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC dup, dup2, fcntl: support a directory fd on OS/2 kLIBC pipe_filter_ii_execute: port to OS/2 kLIBC wchar: fix "conflicting types" error for __wcwidth on OS/2 kLIBC w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC pipe-filter-aux: undefine HAVE_SELECT on KLIBC binary-io: don't put fd in binary mode if it is a console on EMX doc: mention setlocale() issues on OpenBSD sig2str: list all signals on FreeBSD >= 7 acl-permissions: port to USE_ACL==0 platforms mktime: rename macro to avoid glibc clash Port "$@" to OpenIndiana ksh93 autoupdate Port Universal Time settings to strict POSIX update from texinfo update from texinfo
.gnulib | 2 +- bootstrap | 6 +++--- tests/virstringtest.c | 9 +++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.gnulib b/.gnulib index 6cc32c6..8d807a9 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 6cc32c63e80bc1a30c521b2f07f2b54909b59892 +Subproject commit 8d807a99c6e8eecd2a9cf7c7b5d48ec0b2c934f8 diff --git a/bootstrap b/bootstrap index 294c0bc..f060bab 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2014-12-08.12; # UTC +scriptversion=2016-01-24.06; # UTC # Bootstrap this package from checked-out sources. @@ -42,7 +42,7 @@ export LC_ALL local_gl_dir=gl -# Honour $PERL, but work even if there is none +# Honor $PERL, but work even if there is none. PERL="${PERL-perl}" me=$0 @@ -1021,6 +1021,6 @@ echo "$0: done. Now you can run './configure'." # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/tests/virstringtest.c b/tests/virstringtest.c index 7a1dcfd..63b8009 100644 --- a/tests/virstringtest.c +++ b/tests/virstringtest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2014 Red Hat, Inc. + * Copyright (C) 2012-2016 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 @@ -23,7 +23,6 @@ #include <stdlib.h> #include "testutils.h" -#include "intprops.h" #include "verify.h" #include "virerror.h" #include "viralloc.h" @@ -409,13 +408,11 @@ struct stringToLongData { /* This test makes assumptions about our compilation platform that are * not guaranteed by POSIX. Good luck to you if you are crazy enough - * to try and port libvirt to a platform with 16-bit int. */ + * to try and port libvirt to a platform with 16-bit int. Gnulib + * already assumes that signed integers are two's complement. */ verify(sizeof(int) == 4); -verify(TYPE_TWOS_COMPLEMENT(int)); verify(sizeof(long) == sizeof(int) || sizeof(long) == sizeof(long long)); -verify(TYPE_TWOS_COMPLEMENT(long)); verify(sizeof(long long) == 8); -verify(TYPE_TWOS_COMPLEMENT(long long)); static int testStringToLong(const void *opaque) -- 2.5.5

On 05/26/2016 09:52 AM, Eric Blake wrote:
Pulls in several portability fixes, including the fact that gnulib now only works on platforms with two's complement signed integers. Also makes for a smaller delta on the next update (we are waiting on a license change to unsetenv for the sake of mingw).
* .gnulib: Update to latest. * bootstrap: Resync from upstream. * tests/virstringtest.c: Drop use of obsolete probes of integer properties.
Signed-off-by: Eric Blake <eblake@redhat.com> ---
I'd like to get this in now, before RC1 is cut, so that we maximize the testing of the bulk of the gnulib changes (rather than waiting for the unsetenv change needed for mingw to land, but forcing the gnulib update to only get testing in RC2).
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 27.05.2016 05:07, Eric Blake wrote:
On 05/26/2016 09:52 AM, Eric Blake wrote:
Pulls in several portability fixes, including the fact that gnulib now only works on platforms with two's complement signed integers. Also makes for a smaller delta on the next update (we are waiting on a license change to unsetenv for the sake of mingw).
* .gnulib: Update to latest. * bootstrap: Resync from upstream. * tests/virstringtest.c: Drop use of obsolete probes of integer properties.
Signed-off-by: Eric Blake <eblake@redhat.com> ---
I'd like to get this in now, before RC1 is cut, so that we maximize the testing of the bulk of the gnulib changes (rather than waiting for the unsetenv change needed for mingw to land, but forcing the gnulib update to only get testing in RC2).
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
Unfortunately, this breaks build on my system: make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/tests' CCLD virpcimock.la ../gnulib/lib/.libs/libgnu.a(canonicalize-lgpl.o): In function `rpl_canonicalize_file_name': /home/zippy/work/libvirt/libvirt.git/gnulib/lib/canonicalize-lgpl.c:400: multiple definition of `rpl_canonicalize_file_name' .libs/virpcimock_la-virpcimock.o:/home/zippy/work/libvirt/libvirt.git/tests/virpcimock.c:939: first defined here collect2: error: ld returned 1 exit status Worse, I have no idea how to fix this. Michal

27.05.2016 13:33, Michal Privoznik пишет:
On 27.05.2016 05:07, Eric Blake wrote:
On 05/26/2016 09:52 AM, Eric Blake wrote:
Pulls in several portability fixes, including the fact that gnulib now only works on platforms with two's complement signed integers. Also makes for a smaller delta on the next update (we are waiting on a license change to unsetenv for the sake of mingw).
* .gnulib: Update to latest. * bootstrap: Resync from upstream. * tests/virstringtest.c: Drop use of obsolete probes of integer properties.
Signed-off-by: Eric Blake <eblake@redhat.com> ---
I'd like to get this in now, before RC1 is cut, so that we maximize the testing of the bulk of the gnulib changes (rather than waiting for the unsetenv change needed for mingw to land, but forcing the gnulib update to only get testing in RC2). Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
Unfortunately, this breaks build on my system:
make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/tests' CCLD virpcimock.la ../gnulib/lib/.libs/libgnu.a(canonicalize-lgpl.o): In function `rpl_canonicalize_file_name': /home/zippy/work/libvirt/libvirt.git/gnulib/lib/canonicalize-lgpl.c:400: multiple definition of `rpl_canonicalize_file_name' .libs/virpcimock_la-virpcimock.o:/home/zippy/work/libvirt/libvirt.git/tests/virpcimock.c:939: first defined here collect2: error: ld returned 1 exit status
Worse, I have no idea how to fix this.
Michal
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Hmm, my build is broken too... Maxim

On 05/27/2016 04:33 AM, Michal Privoznik wrote:
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
Unfortunately, this breaks build on my system:
make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/tests' CCLD virpcimock.la ../gnulib/lib/.libs/libgnu.a(canonicalize-lgpl.o): In function `rpl_canonicalize_file_name': /home/zippy/work/libvirt/libvirt.git/gnulib/lib/canonicalize-lgpl.c:400: multiple definition of `rpl_canonicalize_file_name' .libs/virpcimock_la-virpcimock.o:/home/zippy/work/libvirt/libvirt.git/tests/virpcimock.c:939: first defined here collect2: error: ld returned 1 exit status
Worse, I have no idea how to fix this.
Was this an incremental or a clean build? If incremental, I suspect that it may just be stale files left behind as gnulib shuffles things between normal use and testsuite use. I'm trying to reproduce now... -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, 2016-05-27 at 08:24 -0600, Eric Blake wrote:
On 05/27/2016 04:33 AM, Michal Privoznik wrote:
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
Unfortunately, this breaks build on my system:
make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/tests' CCLD virpcimock.la ../gnulib/lib/.libs/libgnu.a(canonicalize-lgpl.o): In function `rpl_canonicalize_file_name': /home/zippy/work/libvirt/libvirt.git/gnulib/lib/canonicalize-lgpl.c:400: multiple definition of `rpl_canonicalize_file_name' .libs/virpcimock_la-virpcimock.o:/home/zippy/work/libvirt/libvirt.git/tests/virpcimock.c:939: first defined here collect2: error: ld returned 1 exit status
Worse, I have no idea how to fix this.
Was this an incremental or a clean build? If incremental, I suspect that it may just be stale files left behind as gnulib shuffles things between normal use and testsuite use. I'm trying to reproduce now...
I ran into the same error with a completely clean build[1] on my fully up-to-date Fedora 23 system. [1] git clean -xdf && \ git submodule foreach 'git clean -xdf' -- Andrea Bolognani Software Engineer - Virtualization Team

On 05/27/2016 08:40 AM, Andrea Bolognani wrote:
Was this an incremental or a clean build? If incremental, I suspect that it may just be stale files left behind as gnulib shuffles things between normal use and testsuite use. I'm trying to reproduce now...
I ran into the same error with a completely clean build[1] on my fully up-to-date Fedora 23 system.
That explains it. Incremental didn't see if if you reused config.cache from an earlier run where realpath detection was correct, while a clean build probed incorrectly due to the gnulib regression. It's all sorted now, though. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/27/2016 10:24 AM, Eric Blake wrote:
On 05/27/2016 04:33 AM, Michal Privoznik wrote:
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
Unfortunately, this breaks build on my system:
make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/tests' CCLD virpcimock.la ../gnulib/lib/.libs/libgnu.a(canonicalize-lgpl.o): In function `rpl_canonicalize_file_name': /home/zippy/work/libvirt/libvirt.git/gnulib/lib/canonicalize-lgpl.c:400: multiple definition of `rpl_canonicalize_file_name' .libs/virpcimock_la-virpcimock.o:/home/zippy/work/libvirt/libvirt.git/tests/virpcimock.c:939: first defined here collect2: error: ld returned 1 exit status
Worse, I have no idea how to fix this.
Was this an incremental or a clean build? If incremental, I suspect that it may just be stale files left behind as gnulib shuffles things between normal use and testsuite use. I'm trying to reproduce now...
I'll pile on... me too... F23 gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC) When the .gnulib is updated, I see autogen.sh being run - so what more "cleanup" would be required? A make clean doesn't help either. My setup is essentially "./autogen.sh --system"... John $ make -j12 check syntax-check INFO: gnulib update required; running ./autogen.sh first ./autogen.sh running bootstrap... ./bootstrap: Bootstrapping from checked-out libvirt sources... ./bootstrap: consider installing git-merge-changelog from gnulib ./bootstrap: getting gnulib files... Submodule path '.gnulib': checked out '6cc32c63e80bc1a30c521b2f07f2b54909b59892' ./bootstrap: autopoint --force running: libtoolize --install --copy libtoolize: error: 'build-aux/config.guess' is newer: use '--force' to overwrite libtoolize: error: 'build-aux/config.sub' is newer: use '--force' to overwrite ./bootstrap: .gnulib/gnulib-tool --import --no-changelog --aux-dir build-aux --doc-base doc --lib libgnu --m4-base m4/ --source-base gnulib/lib/ --tests-base gnulib/tests --local-dir gnulib/local --lgpl=2 --with-tests --makefile-name=gnulib.mk --avoid=pt_chown --avoid=lock-tests --libtool --import ... Module list with included dependencies (indented): absolute-header accept accept-tests alloca alloca-opt alloca-opt-tests allocator ...

On 27.05.2016 16:24, Eric Blake wrote:
On 05/27/2016 04:33 AM, Michal Privoznik wrote:
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
Unfortunately, this breaks build on my system:
make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/tests' CCLD virpcimock.la ../gnulib/lib/.libs/libgnu.a(canonicalize-lgpl.o): In function `rpl_canonicalize_file_name': /home/zippy/work/libvirt/libvirt.git/gnulib/lib/canonicalize-lgpl.c:400: multiple definition of `rpl_canonicalize_file_name' .libs/virpcimock_la-virpcimock.o:/home/zippy/work/libvirt/libvirt.git/tests/virpcimock.c:939: first defined here collect2: error: ld returned 1 exit status
Worse, I have no idea how to fix this.
Was this an incremental or a clean build? If incremental, I suspect that it may just be stale files left behind as gnulib shuffles things between normal use and testsuite use. I'm trying to reproduce now...
Clean build here too. And also here: https://ci.centos.org/view/libvirt-project/job/libvirt-daemon-build/systems=... Michal

On Fri, May 27, 2016 at 08:24:36AM -0600, Eric Blake wrote:
On 05/27/2016 04:33 AM, Michal Privoznik wrote:
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
Unfortunately, this breaks build on my system:
make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/tests' CCLD virpcimock.la ../gnulib/lib/.libs/libgnu.a(canonicalize-lgpl.o): In function `rpl_canonicalize_file_name': /home/zippy/work/libvirt/libvirt.git/gnulib/lib/canonicalize-lgpl.c:400: multiple definition of `rpl_canonicalize_file_name' .libs/virpcimock_la-virpcimock.o:/home/zippy/work/libvirt/libvirt.git/tests/virpcimock.c:939: first defined here collect2: error: ld returned 1 exit status
Worse, I have no idea how to fix this.
Was this an incremental or a clean build? If incremental, I suspect that it may just be stale files left behind as gnulib shuffles things between normal use and testsuite use. I'm trying to reproduce now...
I have bisected it to: 54615b95ff238e235e806855efc46a9abad09f2e is the first bad commit commit 54615b95ff238e235e806855efc46a9abad09f2e Author: Paul Eggert <eggert@cs.ucla.edu> Date: Sat Feb 6 18:11:48 2016 -0800 misc: port better to gcc -fsanitize=address Removing the stray negation fixes it for me: diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 index bfc9ebe..a1a4445 100644 --- a/m4/canonicalize.m4 +++ b/m4/canonicalize.m4 @@ -100,7 +100,7 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS], { char *name1 = realpath (".", NULL); char *name2 = realpath ("conftest.d//./..", NULL); - if (! (name1 && name2 && strcmp (name1, name2) != 0)) + if ((name1 && name2 && strcmp (name1, name2) != 0)) result |= 8; free (name1); free (name2); Jan

On 05/27/2016 09:22 AM, Ján Tomko wrote:
On Fri, May 27, 2016 at 08:24:36AM -0600, Eric Blake wrote:
On 05/27/2016 04:33 AM, Michal Privoznik wrote:
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
Unfortunately, this breaks build on my system:
I have bisected it to: 54615b95ff238e235e806855efc46a9abad09f2e is the first bad commit commit 54615b95ff238e235e806855efc46a9abad09f2e Author: Paul Eggert <eggert@cs.ucla.edu> Date: Sat Feb 6 18:11:48 2016 -0800
misc: port better to gcc -fsanitize=address
Thanks; I independently came to the same conclusion, and have pushed the new gnulib submodule.
char *name2 = realpath ("conftest.d//./..", NULL); - if (! (name1 && name2 && strcmp (name1, name2) != 0)) + if ((name1 && name2 && strcmp (name1, name2) != 0))
Not quite. Paul's (buggy) fix was trying to ensure that strcmp() can't be called on NULL, but the correct fix is: if (! (name1 && name2) && strcmp (name1, name2) != 0) or, by deMorgan's law, if (! name1 || ! name2 || strcmp (name1, name2)) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/26/2016 11:07 PM, Eric Blake wrote:
On 05/26/2016 09:52 AM, Eric Blake wrote:
Pulls in several portability fixes, including the fact that gnulib now only works on platforms with two's complement signed integers. Also makes for a smaller delta on the next update (we are waiting on a license change to unsetenv for the sake of mingw).
* .gnulib: Update to latest. * bootstrap: Resync from upstream. * tests/virstringtest.c: Drop use of obsolete probes of integer properties.
Signed-off-by: Eric Blake <eblake@redhat.com> ---
I'd like to get this in now, before RC1 is cut, so that we maximize the testing of the bulk of the gnulib changes (rather than waiting for the unsetenv change needed for mingw to land, but forcing the gnulib update to only get testing in RC2).
Pushed under gnulib maintenance rule, since RC1 still hasn't been tagged.
FWIW On Fedora 24 I'm not getting the issue that others are reporting, but there's this new build warning/error after the gnulib update: In file included from ../include/libvirt/libvirt.h:38:0, from ./internal.h:58, from util/virlog.h:25, from util/virarch.c:26: ../include/libvirt/libvirt-domain.h:1881:57: error: result of '1 << 31' requires 33 bits to represent, but 'int' only has 32 bits [-Werror=shift-overflow=] VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1 << 31, /* enforce requested stats */ - Cole

On 05/27/2016 09:40 AM, Cole Robinson wrote:
FWIW On Fedora 24 I'm not getting the issue that others are reporting, but there's this new build warning/error after the gnulib update:
In file included from ../include/libvirt/libvirt.h:38:0, from ./internal.h:58, from util/virlog.h:25, from util/virarch.c:26: ../include/libvirt/libvirt-domain.h:1881:57: error: result of '1 << 31' requires 33 bits to represent, but 'int' only has 32 bits [-Werror=shift-overflow=] VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1 << 31, /* enforce requested stats */
That's because the new gnulib enables new gcc warnings, if you have bleeding edge gcc (the way F24 does). In this particular case, a fix would be using 1U << 31; but there may be other new warnings we need to silence. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (7)
-
Andrea Bolognani
-
Cole Robinson
-
Eric Blake
-
John Ferlan
-
Ján Tomko
-
Maxim Nestratov
-
Michal Privoznik