From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 1/2] daemon: Fix '--version'. Date: Wed, 31 Aug 2016 23:13:24 +0200 Message-ID: <877fawk5fv.fsf@gnu.org> References: <87fupvx83x.fsf@gmail.com> <87vayjy2nq.fsf@gnu.org> <8760qi282l.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfCp9-0004iH-GE for guix-devel@gnu.org; Wed, 31 Aug 2016 17:13:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfCp5-0007C0-8A for guix-devel@gnu.org; Wed, 31 Aug 2016 17:13:30 -0400 In-Reply-To: <8760qi282l.fsf@gmail.com> (Alex Vong's message of "Tue, 30 Aug 2016 12:29:22 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Alex Vong Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Alex, Alex Vong skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Hi! >> >> Alex Vong 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=3DC ./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=E2=80=99. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=t.cc Content-Description: argp C++ #include const char *argp_program_version = "foo"; const char *argp_program_bug_address = "foo@example.org"; 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; } --=-=-=--