On 10/19/2011 04:33 PM, Bruno Haible wrote:
Hi Eric,

Also, I got a build failure when trying to use the grantpt module in
libvirt:

    CCLD   libgnu.la
    CC     pt_chown.o
make[4]: *** No rule to make target `libgnu.a', needed by `pt_chown'.  Stop.

Looks like the gnulib-tool output is not considering the possibility of
libtool mixing with the creation of pt_chown.

I get the same build failure in testdirs that contain 'grantpt'.

The easiest fix is probably to adjust modules/pt_chown locally for
libvirt (via --local-dir and a modules/pt_chown.diff file).

See also my proposed patch, for an even easier fix that avoids the need for a diff file.

Also
you need to find a way to install the pt_chown program as setuid root.
This too is outside the scope of gnulib.

Agreed there, and still a problem even with my proposed patches, although now the problem is limited to just platforms without grantpt, rather than all platforms.


I'm not sure it's worth modifying gnulib-tool for this single case.

Well, my proposed patch still had one flaw - grantpt.c should _not_ be added into EXTRA_libgnu_la_SOURCES, since it is not part of the libgnu library but a standalone app; I'll send a v2 of my patch with a gnulib-tool tweak for this situation (gnulib-tool was already special-casing pt_chown when it existed as a separate module, so it's not too much of a stretch).


For that matter, does
pt_chown even need to be built on Linux, or can we rework things to only
build it on platforms where the grantpt() replacement is compiled?

The dependency from 'grantpt' to 'pt_chown' has already the right
condition attached. I think you only need to activate the
--conditional-dependencies option. (But note that it does not yet
work with --with-tests.)

Alas, libvirt wants to use --with-tests, so it cannot use --conditional-dependencies yet. But I think my patch to consolidate things into one module, and use an automake conditional, solves that problem.

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to