From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from firefly.ecentrum.hu (firefly.ecentrum.hu [78.131.87.195]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s7SL7Xo8004659 for ; Thu, 28 Aug 2014 17:07:39 -0400 (EDT) Received: from serenity.local (serenity [192.168.0.10]) by firefly.ecentrum.hu (Postfix) with ESMTPSA id CDF4FDE233; Thu, 28 Aug 2014 23:07:32 +0200 (CEST) Date: Thu, 28 Aug 2014 23:07:31 +0200 From: =?iso-8859-1?Q?L=C9VAI_D=E1niel?= To: Ingo Schwarze Cc: discuss@mdocml.bsd.lv Subject: Re: "cannot parse date" for a seemingly valid .Dd parameter Message-ID: <20140828210731.GB15202@serenity.local> References: <20140827145844.GI29425@serenity.local> <53FDF43F.3060001@bsd.lv> <20140827151513.GJ29425@serenity.local> <20140828004342.GF912@iris.usta.de> <20140828083900.GM29425@serenity.local> <20140828161103.GR912@iris.usta.de> <20140828163215.GN29425@serenity.local> <20140828173522.GT912@iris.usta.de> <20140828180617.GA15202@serenity.local> <20140828194910.GW912@iris.usta.de> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20140828194910.GW912@iris.usta.de> User-Agent: Mutt/1.5.22hg (2013-10-16) On cs, aug 28, 2014 at 21:49:11 +0200, Ingo Schwarze wrote: > > $ CFLAGS='-DOSNAME=\"Slackware\ Linux\"' make > > Gah. That's not the way to do it. > > > $ ./mandoc -Tlint test.1 > > mandoc: ../mdocml/test.1:1:2: WARNING: cannot parse date, > > using it verbatim: August 27, 2014 > > Indeed. What happens here is that you completely screw up the > CFLAGS of ./configure, and all configuration tests fail. > So strptime(3) cannot be used when compiling mandoc(1), > and hence, no dates whatsoever can be parsed. We were on > a completely wrong track with LC_*. > > The way to set additional CFLAGS in 1.13.1 was to edit the > Makefile, uncomment and edit this line right at the top of > the file: > > # Specify this if you want to hard-code the operating system to appear > # in the lower-left hand corner of -mdoc manuals. > # > # CFLAGS += -DOSNAME="\"OpenBSD 5.5\"" > > > Without the -DOSNAME define, it doesn't emit this warning. I know I'm > > not crazy! Sort of... :) > > Well, as long as you don't break it, ./configure does work... [...] But it doesn't seem to break the CFLAGS variable here. Everything stays in it during compile: $ CFLAGS='-DOSNAME=OSNAMEEEE' make rm -f config.log CC="cc" CFLAGS="-DOSNAME=OSNAMEEEE -DUSE_WCHAR -g -DHAVE_CONFIG_H -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings" DBLIB="-lutil -lsqlite3" \ VERSION="1.13.1" ./configure /* RUNNING ./CONFIGURE - SHOULD BE USED ONLY VIA MAKE, READ INSTALL */ cc -DOSNAME=OSNAMEEEE -DUSE_WCHAR -g -DHAVE_CONFIG_H -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -c -o eqn_html.o eqn_html.c cc -DOSNAME=OSNAMEEEE -DUSE_WCHAR -g -DHAVE_CONFIG_H -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -c -o html.o html.c ... .. . ^^^ Those are the same compiler flags that would have been there without my CFLAGS "override" on the command line. Furthermore, the problem also remains when I edit only the Makefile: $ fgrep OSNAME ./Makefile # CFLAGS += -DOSNAME="\"OpenBSD 5.5\"" CFLAGS += -DOSNAME="\"Slackware\ Linux\"" $ make rm -f config.log CC="cc" CFLAGS="-DOSNAME="\"Slackware\ Linux\"" -DUSE_WCHAR -g -DHAVE_CONFIG_H -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings" DBLIB="-lutil -lsqlite3" \ VERSION="1.13.1" ./configure /* RUNNING ./CONFIGURE - SHOULD BE USED ONLY VIA MAKE, READ INSTALL */ cc -DOSNAME="\"Slackware\ Linux\"" -DUSE_WCHAR -g -DHAVE_CONFIG_H -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -c -o eqn_html.o eqn_html.c cc -DOSNAME="\"Slackware\ Linux\"" -DUSE_WCHAR -g -DHAVE_CONFIG_H -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -c -o html.o html.c ... .. . $ ./mandoc -Tlint test.1 mandoc: test.1:1:2: WARNING: cannot parse date, using it verbatim: August 27, 2014 Only in the absence of the OSNAME define does mandoc parse the given date. If I could "screw up" the CFLAGS of configure, then eg. a simple CFLAGS=-O2 would do that too, but it doesn't; just the -DOSNAME define. > > But regarding CVS HEAD, even with the OSNAME define, it won't tell me > > that warning. > > Sure, it has become more robust and ignores the rogue variable now > instead of breaking all over the place. > > In 1.13.2, the way to set OSNAME is documented in the file > configure.local.example. [...] Okay, seems clear, I'll keep this in mind when upgrading in the future. [...] > Btw., can you update this: > http://slackbuilds.org/slackbuilds/14.1/system/mdocml/ > ? Sure thing, but I need to get this problem out of the way :P Daniel -- LÉVAI Dániel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv