libvirt build failure w/GNU make and automake.git (automake regression?)
When I run ./autogen.sh make, I see this: (this arose because I had the latest automake.git/master tools -- commit c1b83e1af60b866cf5cdeebf77d0275019bad8b2 from today -- early in my path) Generated 3 wrapper functions CC libvirtmod_la-libvirt-override.lo CC libvirtmod_la-typewrappers.lo CC libvirtmod_la-libvirt.lo CC libvirtmod_qemu_la-libvirt-qemu-override.lo CC libvirtmod_qemu_la-typewrappers.lo CC libvirtmod_qemu_la-libvirt-qemu.lo CCLD libvirtmod_qemu.la CCLD libvirtmod.la make[3]: Leaving directory `/h/j/w/co/libvirt/python' Making all in tests make[3]: Entering directory `/h/j/w/co/libvirt/python/tests' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/h/j/w/co/libvirt/python/tests' make[2]: Leaving directory `/h/j/w/co/libvirt/python' Making all in tests make[2]: Entering directory `/h/j/w/co/libvirt/tests' Makefile:4355: *** Malformed target-specific variable definition. Stop. make[2]: Leaving directory `/h/j/w/co/libvirt/tests' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/h/j/w/co/libvirt' make: *** [all] Error 2 That is because of this automake-generated rule: undefine.log: undefine @p='undefine'; \ b='undefine'; \ $(am__check_pre) $(LOG_DRIVER) --test-name $$f \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ $$tst $(AM_TESTS_FD_REDIRECT) The trouble is that undefine is an operator in GNU make. Here's that part of GNU make's documentation: 6.9 Undefining Variables If you want to clear a variable, setting its value to empty is usually sufficient. Expanding such a variable will yield the same result (empty string) regardless of whether it was set or not. However, if you are using the `flavor' (*note Flavor Function::) and `origin' (*note Origin Function::) functions, there is a difference between a variable that was never set and a variable with an empty value. In such situations you may want to use the `undefine' directive to make a variable appear as if it was never set. For example: foo := foo bar = bar undefine foo undefine bar $(info $(origin foo)) $(info $(flavor bar)) This example will print undefined for both variables. If you want to undefine a command-line variable definition, you can use the `override' directive together with `undefine', similar to how this is done for variable definitions: override undefine CFLAGS The most pragmatic work-around is to rename the undefine test script. However, Stephano, as automake maintainer, I think you will want to fix automake not to prohibit the use of such test names.
Re: libvirt build failure w/GNU make and automake.git (automake regression?)
On Wed, 2012-09-12 at 17:01 +0200, Jim Meyering wrote: That is because of this automake-generated rule: undefine.log: undefine The trouble is that undefine is an operator in GNU make. The most pragmatic work-around is to rename the undefine test script. However, Stephano, as automake maintainer, I think you will want to fix automake not to prohibit the use of such test names. This could be a legitimate bug in GNU make. It's arguable that GNU make should only consider undefine to be an operator in contexts where it might be an operator. Clearly a prerequisite (or target) named undefine cannot be a make operator.
Re: [libvirt] libvirt build failure w/GNU make and automake.git (automake regression?)
On 09/12/2012 09:01 AM, Jim Meyering wrote: When I run ./autogen.sh make, I see this: (this arose because I had the latest automake.git/master tools -- commit c1b83e1af60b866cf5cdeebf77d0275019bad8b2 from today -- early in my path) Making all in tests make[2]: Entering directory `/h/j/w/co/libvirt/tests' Makefile:4355: *** Malformed target-specific variable definition. Stop. The trouble is that undefine is an operator in GNU make. The most pragmatic work-around is to rename the undefine test script. Indeed - while the upstream debate continues on whether 'make', 'automake', or both should be patched to allow 'undefine', downstream in libvirt, I am pushing this trivial patch: From a20f06d9d9b0353d7fb7a8e11a631253d5961b96 Mon Sep 17 00:00:00 2001 From: Eric Blake ebl...@redhat.com Date: Wed, 12 Sep 2012 11:25:51 -0600 Subject: [PATCH] build: avoid confusing make with raw name 'undefine' Make has a builtin operator 'undefine', and coupled with latest automake.git, this test name ended up confusing make into thinking the file name was meant to be used as the make operator. Renaming the file avoids the confusion. * tests/undefine: Rename... * tests/virsh-undefine: ...to this. * tests/Makefile.am (test_scripts): Use new name. Reported by Jim Meyering. --- tests/Makefile.am | 10 ++ tests/{undefine = virsh-undefine} | 0 2 files changed, 6 insertions(+), 4 deletions(-) rename tests/{undefine = virsh-undefine} (100%) diff --git a/tests/Makefile.am b/tests/Makefile.am index bec89e2..c5cecaa 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -182,12 +182,13 @@ test_scripts += \ read-bufsiz \ read-non-seekable \ start \ - undefine\ vcpupin \ virsh-all \ virsh-optparse \ virsh-schedinfo \ - virsh-synopsis + virsh-synopsis \ + virsh-undefine \ + $(NULL) test_programs += \ eventtest \ @@ -203,12 +204,13 @@ EXTRA_DIST += \ read-bufsiz \ read-non-seekable \ start \ - undefine\ vcpupin \ virsh-all \ virsh-optparse \ virsh-schedinfo \ - virsh-synopsis + virsh-synopsis \ + virsh-undefine \ + $(NULL) endif if WITH_SECDRIVER_APPARMOR diff --git a/tests/undefine b/tests/virsh-undefine similarity index 100% rename from tests/undefine rename to tests/virsh-undefine -- 1.7.11.4 -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature