Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2001 11:23:03 -0800 (PST)
From:      David Wolfskill <david@catwhisker.org>
To:        current@FreeBSD.ORG
Subject:   Re: buildworld breakage during "make depend" at usr.bin/kdump
Message-ID:  <200110311923.f9VJN3845569@bunrab.catwhisker.org>
In-Reply-To: <200110311634.f9VGYGL45093@bunrab.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>Date: Wed, 31 Oct 2001 08:34:16 -0800 (PST)
>From: David Wolfskill <david@catwhisker.org>

>mkdep -f .depend -a    -I/usr/obj/usr/src/i386/usr/include  /usr/src/usr.bin/jot/jot.c
>cd /usr/src/usr.bin/jot; make _EXTRADEPEND
>echo jot: /usr/obj/usr/src/i386/usr/lib/libc.a  >> .depend
>===> usr.bin/kdump
>sh /usr/src/usr.bin/kdump/mkioctls /usr/obj/usr/src/i386/usr/include > ioctl.c
>awk: newline in string #include <cam/scsi/s... at source line 1
>...

>Stop in /usr/src/usr.bin/kdump.
>*** Error code 1

>.... However, in reviewing that
>log, I didn't see the awk complaints ("awk: newline in string #include
><cam/scsi/s... at source line 1").

Yup; that is the error message that accompanies awk's termination (from
within the src/usr.bin/kdump/mkioctls script) with status 2.

>At this stage, I'll welcome pointers/suggestions while I do some
>research on my own.

By breaking down the parts of the pipeline in src/usr.bin/kdump/mkioctls,
it looks as if the problem is that the (shell) variable ioctl_includes
is being set to a list of #include directives, one per line, such as:

#include <cam/scsi/scsi_pass.h>
#include <cam/scsi/scsi_ses.h>
#include <cam/scsi/scsi_targetio.h>
#include <dev/ppbus/lptio.h>
#include <dev/ppbus/ppi.h>
...

That shell variable is being used to set the value of a similarly-named
awk variable:

	awk -v ioctl_includes="$ioctl_includes" -v use_switch="$use_switch" '

And awk does *not* seem to like having embedded newline characters in 
there.


By generating the output to a separate file, the replacing each "real
newline" with a C/awk/Perl representation thereof (i.e., "\n"), I was
able to get the awk part of the pipeline to terminate with a status of
0, while generating what looks like reasonable output (though I'm hardly
an expert on that).

If there is a way to tell awk to "quit whining and *like* the newlines",
that would seem to be ideal.  Failing that, I can work up some way to
transmogrify the #include list so awk will like it better....

Am I really the only one who has seen this?

Cheers,
david
-- 
David H. Wolfskill				david@catwhisker.org
As a computing professional, I believe it would be unethical for me to
advise, recommend, or support the use (save possibly for personal
amusement) of any product that is or depends on any Microsoft product.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110311923.f9VJN3845569>