From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.scc.kit.edu (mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s7SJo0sA030342 for ; Thu, 28 Aug 2014 15:50:01 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1XN5hl-0000m7-Sa; Thu, 28 Aug 2014 21:49:57 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1XN5hl-0007Bz-Pr; Thu, 28 Aug 2014 21:49:57 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1XN5hl-00046b-OQ; Thu, 28 Aug 2014 21:49:57 +0200 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1XN5h1-0005xN-9y; Thu, 28 Aug 2014 21:49:11 +0200 Date: Thu, 28 Aug 2014 21:49:11 +0200 From: Ingo Schwarze To: =?iso-8859-1?Q?L=C9VAI_D=E1niel?= Cc: discuss@mdocml.bsd.lv Subject: Re: "cannot parse date" for a seemingly valid .Dd parameter Message-ID: <20140828194910.GW912@iris.usta.de> 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> 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: <20140828180617.GA15202@serenity.local> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Daniel, LÉVAI Dániel wrote on Thu, Aug 28, 2014 at 08:06:17PM +0200: > On cs, aug 28, 2014 at 19:35:22 +0200, Ingo Schwarze wrote: >> LÉVAI Dániel wrote on Thu, Aug 28, 2014 at 06:32:15PM +0200: >>> manpath: no >> By the way, that is odd. Given that the bug hides so skillfully, >> i'd like to pay attention to any clue. You say you are on Linux? > Yes, this is on Linux; a slightly modified version of Slackware. Interesting. I always thought all Linux distros had manpath(1), but apparently, starting a sentence with "All Linux distros..." is bound to end up in an untruth. Well, i sympathize with not using manpath(1). :) So no problem there. > $ 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... > Sorry for not posting the exact steps I've been using to compile > mdocml... rookie mistake.. You? A rookie? You are not a rookie! "Sir, look, that man over there is an impostor! He's posing as a rookie!" > config.h: [...] > #define VERSION "1.13.1" > > #if !defined(__BEGIN_DECLS) Your problem is right here. No #define HAVE_... whatsoever. > 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. # For all settings documented in this file, there are reasonable # defaults and/or the ./configure script attempts autodetection. # Consequently, you only need to create a file ./configure.local # and put any of these settings into it if ./configure autodetection # fails or if you want to make different choices for other reasons. # If autodetection fails, please tell . # We recommend that you write ./configure.local from scratch and # only put the lines there you need. This file contains examples. # It is not intended as a template to be copied as a whole. [...] # In manual pages written in the mdoc(7) language, the operating system # version is displayed in the page footer line. If an operating system # is specified as an argument to the .Os macro, that is always used. # If the .Os macro has no argument and an operation system is specified # with the mandoc(1) -Ios= command line option, that is used. # Otherwise, the uname(3) library function is called at runtime to find # the name of the operating system. # If you do not want uname(3) to be called but instead want a fixed # string to be used, use the following line: OSNAME="OpenBSD 5.5" Fine, so all is understood now and no more patches are needed. Thanks for reporting the bug you didn't intend to, and don't worry too much that the one you did report turned out to be pilot error - it *was* tricky after all. I also learned something about Slackware. Btw., can you update this: http://slackbuilds.org/slackbuilds/14.1/system/mdocml/ ? Yours, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv