Discussion:
unused-parameter.h: not
(too old to reply)
Michal Privoznik
2017-03-14 12:41:50 UTC
Permalink
Raw Message
Dear list,

I'm a libvirt developer and we rely on gnulib in our project. However, I
was reviewing a patch for bhyve driver (bhyve is a *BSD hypervisor), so
I've booted up my FreeBSD virtual machine and started the review. While
doing 'make distcheck' gnulib tests ran and I've noticed couple of them
failing. So I've tried to update our submodule checkout to the latest
master (1c2185b80a7). However, I still see the following failure:

libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I.
-I../../../../gnulib/lib -I../.. -I../../../.. -O0 -ggdb3 -MT fflush.lo
-MD -MP -MF .deps/fflush.Tpo -c ../../../../gnulib/lib/fflush.c -fPIC
-DPIC -o .libs/fflush.o
../../../../gnulib/lib/fflush.c:31:30: fatal error: unused-parameter.h:
No such file or directory
#include "unused-parameter.h"


Please let me know if you need more info.

Regards,
Michal
Bruno Haible
2017-03-14 18:14:06 UTC
Permalink
Raw Message
Hi Michal,
Post by Michal Privoznik
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I.
-I../../../../gnulib/lib -I../.. -I../../../.. -O0 -ggdb3 -MT fflush.lo
-MD -MP -MF .deps/fflush.Tpo -c ../../../../gnulib/lib/fflush.c -fPIC
-DPIC -o .libs/fflush.o
No such file or directory
#include "unused-parameter.h"
Please let me know if you need more info.
How-to-reproduce instructions (as a sequence of shell commands) would be useful.
git clone from where? configure with what environment variables and which
arguments?

Bruno
Paul Eggert
2017-03-14 18:55:14 UTC
Permalink
Raw Message
Thanks for the report. This is due to my change of yesterday, which I'll
try to fix today.
Paul Eggert
2017-03-14 23:24:05 UTC
Permalink
Raw Message
I installed the attached patch to Gnulib on Savannah; please give it a try.
Michal Privoznik
2017-03-15 08:25:41 UTC
Permalink
Raw Message
Post by Paul Eggert
I installed the attached patch to Gnulib on Savannah; please give it a try.
Yep, that works. I see you've already pushed it. Thank you.

Michal
Bruno Haible
2017-03-15 22:33:01 UTC
Permalink
Raw Message
Hi Paul,
Post by Paul Eggert
I installed the attached patch to Gnulib on Savannah; please give it a try.
This patch has the strange consequence that the gnulib import in GNU clisp
now installs files
tests/_Noreturn.h
tests/arg-nonnull.h
tests/c++defs.h
tests/dummy.c
tests/warn-on-use.h
although the gnulib-tool invocation did not contain --with-tests, nor any tests
module.

The underlying problem is present since the beginning: Modules with
applicability 'all' get added to $testsrelated_modules, from which the file list
for tests/ is built.

So far this had no consequences, because the files of these modules were under
build-aux/ - so the use of the same module in $libdir and $testsdir was
idempotent. But now, these modules install files such as arg-nonnull.h twice.

I'm fixing this problem like this:


2017-03-14 Bruno Haible <***@clisp.org>

gnulib-tool: Don't produce a tests directory with only snippet .h files.
* gnulib-tool (func_modules_transitive_closure_separately): If
testsrelated_modules ends up with no "real" modules, aside from
modules with applicability 'all', set it to empty.

diff --git a/gnulib-tool b/gnulib-tool
index 0d1ceb2..b672645 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -3048,6 +3048,18 @@ func_modules_transitive_closure_separately ()
fi
done \
| LC_ALL=C sort -u | LC_ALL=C join -v 2 - "$tmp"/final-modules`
+ # If testsrelated_modules consists only of modules with applicability 'all',
+ # set it to empty (because such modules are only helper modules for other modules).
+ have_nontrivial_testsrelated_modules=
+ for module in $testsrelated_modules; do
+ if test `func_get_applicability $module` != all; then
+ have_nontrivial_testsrelated_modules=yes
+ break
+ fi
+ done
+ if test -z "$have_nontrivial_testsrelated_modules"; then
+ testsrelated_modules=
+ fi
if test $verbose -ge 1; then
echo "Tests-related module list:"
echo "$testsrelated_modules" | sed -e 's/^/ /'

Loading...