guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] daemon: Fix '--version'.


From: Ludovic Courtès
Subject: Re: [PATCH 1/2] daemon: Fix '--version'.
Date: Wed, 31 Aug 2016 23:13:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi Alex,

Alex Vong <address@hidden> skribis:

> address@hidden (Ludovic Courtès) writes:
>
>> Hi!
>>
>> Alex Vong <address@hidden> skribis:
>>
>>> This one and the next patch fix '--version' of guix-daemon and
>>> guix-register. Currently, they are not working, which is the reason why
>>> help2man gives error when building from source.

[...]

> I get this output instead:
>
> $ LC_ALL=C ./guix-daemon --version
> ./guix-daemon: unrecognized option '--version'
> Try `guix-daemon --help' or `guix-daemon --usage' for more information.
>
> This is werid, but I think it is because I build guix with lto.

What about the attached program?  It works for me with GCC 6.2.0, both
with and without LTO.

Ludo’.

#include <argp.h>

const char *argp_program_version = "foo";
const char *argp_program_bug_address = "address@hidden";

static const struct argp_option options[] =
  {
    { "system", 's', "SYSTEM", 0,
      "assume SYSTEM as the current system type" },
    { 0, 0, 0, 0, 0 }
  };

static const struct argp argp =
  {
    options, NULL,
    NULL, "doc",
    NULL, NULL,
    NULL
  };

int
main (int argc, char *argv[])
{
  argp_parse (&argp, argc, argv, 0, 0, 0);
  return 0;
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]