[Nas] Malformed man pages

Steve McIntyre steve at einval.com
Wed Oct 12 16:15:27 MDT 2011


On Sun, Oct 09, 2011 at 12:45:58PM -0600, Jon Trulson wrote:
>On Sun, 9 Oct 2011, Erik Auerswald wrote:
>
>>Hi,
>>
>>On 10/09/2011 07:50 PM, Steve McIntyre wrote:
>>>I've had a weird bug reported (http://bugs.debian.org/639543) against
>>>nas in Debian. Looking at the details, it's clearly caused by cpp
>>>processing of the manual pages.
>>>
>>>In a build where I have already installed the libaudio-dev package,
>>>then cpp finds audio/audiolib.h and includes its contents in the man
>>>page output.
>>
>>I could not reproduce this with debian/unstable and an up-to-date
>>svn checkout.
>
>I did not see this either on an up to date kubuntu 11.04 system.
>
>[...]
>>>Is anybody else seeing this problem? I've tried tweaking settings in
>>>the nas build so that imake etc. won't preprocess the man pages, but
>>>to no avail thus far...
>>
>>I use make distclean && xmkmf && make World to build NAS, just as
>>the docs say.
>
>Same here.

I've just done exactly that and looked again. Looking right at the end
of the build process, I'm seeing:

========================================================================
.....
if test -z "true" ; then \
           cd `dirname SoWrFile` && \
           ln -s `basename SoWrFile.man` `basename SoWrFile._man`; \
        else \
                     cpp -undef -traditional  -D__apploaddir__=/etc/X11/app-defaults -D__filemansuffix__=5x -D__osfilemansuffix__=5 -D__libmansuffix__=3x -D__oslibmansuffix__=3 -D__mansuffix__=1x -D__osmansuffix__=1 -D__syscallmansuffix__=2x -D__ossysmansuffix__=2 -D__gamemansuffix__=6x -D__osgamemansuffix__=6 -D__miscmansuffix__=7x -D__osmiscmansuffix__=7 -D__admmansuffix__=8x -D__osadmmansuffix__=8 -D__miscmansuffix__=7x -D__osmiscmansuffix__=7 -D__drivermansuffix__=4x -D__osdrivermansuffix__=4 -D__adminmansuffix__=8 -D__projectroot__=/usr -D__xconfigfile__=xorg.conf -D__xconfigdir__=/usr/lib/X11 -D__xlogfile__=Xorg -D__xservername__=Xorg -D__appmansuffix__=1x -D__xorgversion__="\"`echo 7 6 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'`\" \"X Version 11\"" -D__vendorversion__="`echo 7 6 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` X.Org"  \
             < SoWrFile.man | sed -e '/^#  *[0-9][0-9]*  *.*$/d'                        -e '/^#line  *[0-9][0-9]*  *.*$/d'                        -e '/^[         ]*XCOMM$/s/XCOMM/#/'                    -e '/^[         ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/'                  -e '/^[         ]*XHASH/s/XHASH/#/'                     -e '/\@\@$/s/\@\@$/\\/' >SoWrFile._man; \
        fi
<stdin>:30:0: fatal error: audio/audiolib.h: No such file or directory
compilation terminated.
rm -f Sound._man
if test -z "true" ; then \
           cd `dirname Sound` && \
           ln -s `basename Sound.man` `basename Sound._man`; \
        else \
                     cpp -undef -traditional  -D__apploaddir__=/etc/X11/app-defaults -D__filemansuffix__=5x -D__osfilemansuffix__=5 -D__libmansuffix__=3x -D__oslibmansuffix__=3 -D__mansuffix__=1x -D__osmansuffix__=1 -D__syscallmansuffix__=2x -D__ossysmansuffix__=2 -D__gamemansuffix__=6x -D__osgamemansuffix__=6 -D__miscmansuffix__=7x -D__osmiscmansuffix__=7 -D__admmansuffix__=8x -D__osadmmansuffix__=8 -D__miscmansuffix__=7x -D__osmiscmansuffix__=7 -D__drivermansuffix__=4x -D__osdrivermansuffix__=4 -D__adminmansuffix__=8 -D__projectroot__=/usr -D__xconfigfile__=xorg.conf -D__xconfigdir__=/usr/lib/X11 -D__xlogfile__=Xorg -D__xservername__=Xorg -D__appmansuffix__=1x -D__xorgversion__="\"`echo 7 6 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'`\" \"X Version 11\"" -D__vendorversion__="`echo 7 6 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` X.Org"  \
             < Sound.man | sed -e '/^#  *[0-9][0-9]*  *.*$/d'                   -e '/^#line  *[0-9][0-9]*  *.*$/d'                        -e '/^[         ]*XCOMM$/s/XCOMM/#/'                    -e '/^[         ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/'                  -e '/^[         ]*XHASH/s/XHASH/#/'                     -e '/\@\@$/s/\@\@$/\\/' >Sound._man; \
        fi
<stdin>:30:0: fatal error: audio/audiolib.h: No such file or directory
compilation terminated.
make[4]: Leaving directory `/home/steve/debian/nas/upstream/trunk/doc/man/lib'
rm -f nas._man
if test -z "true" ; then \
           cd `dirname nas` && \
           ln -s `basename nas.man` `basename nas._man`; \
        else \
                     cpp -undef -traditional  -D__apploaddir__=/etc/X11/app-defaults -D__filemansuffix__=5x -D__osfilemansuffix__=5 -D__libmansuffix__=3x -D__oslibmansuffix__=3 -D__mansuffix__=1x -D__osmansuffix__=1 -D__syscallmansuffix__=2x -D__ossysmansuffix__=2 -D__gamemansuffix__=6x -D__osgamemansuffix__=6 -D__miscmansuffix__=7x -D__osmiscmansuffix__=7 -D__admmansuffix__=8x -D__osadmmansuffix__=8 -D__miscmansuffix__=7x -D__osmiscmansuffix__=7 -D__drivermansuffix__=4x -D__osdrivermansuffix__=4 -D__adminmansuffix__=8 -D__projectroot__=/usr -D__xconfigfile__=xorg.conf -D__xconfigdir__=/usr/lib/X11 -D__xlogfile__=Xorg -D__xservername__=Xorg -D__appmansuffix__=1x -D__xorgversion__="\"`echo 7 6 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'`\" \"X Version 11\"" -D__vendorversion__="`echo 7 6 0 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` X.Org"  \
             < nas.man | sed -e '/^#  *[0-9][0-9]*  *.*$/d'                
========================================================================

Looking through the Makefiles, the 'test -z "true"' is coming from lines like

   if test -z "$(PREPROCESSMANPAGES)" ; then

so the files *._man are being created by pre-processing the man
pages. Unfortunately, later on if I run "make install.man" I can see
that those *._man files are what's installed into place:

$ make install.man DESTDIR=/tmp/nas
...
install -c -m 0444 SoOpFFRd._man /tmp/nas/usr/share/man/man3/SoundOpenFileForReading.3x
mv -f tmp.man SoOpFFRd.man
install -c -m 0444 SoOpFFWr._man /tmp/nas/usr/share/man/man3/SoundOpenFileForWriting.3x
mv -f tmp.man SoOpFFWr.man
...

Checking those files, I can see the truncated / broken man pages I
mentioned. Does nobody else see this at all?

-- 
Steve McIntyre, Cambridge, UK.                                steve at einval.com
  Armed with "Valor": "Centurion" represents quality of Discipline,
  Honor, Integrity and Loyalty. Now you don't have to be a Caesar to
  concord the digital world while feeling safe and proud.



More information about the Nas mailing list