On Wed, Feb 11, 2015 at 09:52:59PM +0000, Margaret Lewicka wrote:
> On 11 February 2015 at 19:23, Richard W.M. Jones <[email protected]> wrote:
> > On Wed, Feb 11, 2015 at 07:20:33PM +0000, Margaret Lewicka wrote:
> [...]
> >> Proposing a patch to gnulib, even should they accept it, does not fix
> >> the underlying issue, which is, essentially, that gnulib requires that
> >> symbol and libguestfs binaries don't supply it. There might be another
> >> OS that trips over this, after all.
> >
> > But it would fix it for Mac OS X, which is better than nothing.
> >
> > As a test, can you see if adding some variation of:
> >
> >    #if /* this is Mac OS X */
> >    #define program_name (((char **)*_NSGetArgv())[0])
> >    #endif
> >
> > to libguestfs's gnulib/lib/error.h fixes the problem?
> >
> > It'll save you a lot of time if it does work.
> 
> It compiles and libguestfs-test-tool doesn't bomb afterwards, if that
> is a sufficient definition of "working".

Sounds pretty good to me.

Please send a final patch to gnulib/lib/error.h and I'll forward it to
the gnulib people for you (or you can send it yourself if you want).

[In any case, the gnulib error() function is only used in a very few
places in the libguestfs virt-* tools.  I count just 14 uses, ignoring
tests.  The main reason we need all this seems to be because the
gnulib error module is used by other gnulib modules that we actually
care about.]

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
daemon/guestfsd.c:    error (EXIT_FAILURE, 0, "winsock initialization failed");
df/estimate-max-threads.c:    error (EXIT_FAILURE, errno, "%s: external command 
failed", cmd);
df/estimate-max-threads.c:    error (EXIT_FAILURE, errno, "could not read line 
from external command");
df/estimate-max-threads.c:    error (EXIT_FAILURE, errno, "pclose");
df/parallel.c:      error (EXIT_FAILURE, err, "pthread_create [%zu]", i);
erlang/erl-guestfs-proto.c:    error (EXIT_FAILURE, 0, "could not create 
guestfs handle");
erlang/erl-guestfs-proto.c:      error (EXIT_FAILURE, errno, "read message 
size");
erlang/erl-guestfs-proto.c:    error (EXIT_FAILURE, 0, "message larger than 
MAX_MESSAGE_SIZE");
erlang/erl-guestfs-proto.c:    error (EXIT_FAILURE, errno, "malloc");
erlang/erl-guestfs-proto.c:    error (EXIT_FAILURE, errno, "read message 
content");
erlang/erl-guestfs-proto.c:    error (EXIT_FAILURE, errno, "malloc");
erlang/erl-guestfs-proto.c:    error (EXIT_FAILURE, errno, "write message 
size");
erlang/erl-guestfs-proto.c:    error (EXIT_FAILURE, errno, "write message 
content");
erlang/erl-guestfs-proto.c:    error (EXIT_FAILURE, errno, "malloc");
tests/c-api/test-environment.c:  if (!g) error (EXIT_FAILURE, errno, 
"guestfs_create");
tests/c-api/test-environment.c:  if (!g) error (EXIT_FAILURE, errno, 
"guestfs_create");
tests/c-api/test-environment.c:  if (!g) error (EXIT_FAILURE, errno, 
"guestfs_create_flags");
tests/c-api/test-environment.c:  if (!g) error (EXIT_FAILURE, errno, 
"guestfs_create_flags");
tests/c-api/test-environment.c:  if (!g) error (EXIT_FAILURE, errno, 
"guestfs_create_flags");
tests/charsets/test-charset-fidelity.c:    error (EXIT_FAILURE, 0, "failed to 
create handle");
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:      error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:    error (EXIT_FAILURE, 0,
tests/charsets/test-charset-fidelity.c:    error (EXIT_FAILURE, 0,
tests/mount-local/test-parallel-mount-local.c:      error (EXIT_FAILURE, errno, 
"asprintf");
tests/mount-local/test-parallel-mount-local.c:      error (EXIT_FAILURE, errno, 
"mkdir: %s", threads[i].mp);
tests/mount-local/test-parallel-mount-local.c:      error (EXIT_FAILURE, r, 
"pthread_create");
tests/mount-local/test-parallel-mount-local.c:      error (EXIT_FAILURE, r, 
"pthread_join");
tests/mount-local/test-parallel-mount-local.c:    error (EXIT_FAILURE, 0, "%s: 
invalid or empty mountpoint path", __func__);
tests/mount-local/test-parallel-mount-local.c:    error (EXIT_FAILURE, 0, 
"guestunmount %s: failed, see earlier errors", mp);
tests/parallel/test-parallel.c:      error (EXIT_FAILURE, r, "pthread_create");
tests/parallel/test-parallel.c:      error (EXIT_FAILURE, r, "pthread_join");
_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to