Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2020 16:46:44 +0200
From:      "Julian H. Stacey" <jhs@berklix.com>
To:        current@freebsd.org
Cc:        Brooks Davis <brooks@freebsd.org>
Subject:   Re: lib/libsysdecode /usr/include/./sys/pioctl.h:45:2: error: "<sys/pioctl.h> is deprecated
Message-ID:  <202004101446.03AEkiFw038593@fire.js.berklix.net>
In-Reply-To: Your message "Thu, 09 Apr 2020 21:58:05 -0000." <20200409215805.GA15543@spindle.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Brooks Davis wrote:
> 
> --TB36FDmn/VVEgNH/
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> On Thu, Apr 09, 2020 at 11:49:47PM +0200, Julian H. Stacey wrote:
> > Anyoe else seeing this on current ?
> >=20
> > =3D=3D=3D> lib/libsysdecode (all)
> > env CPP=3D"cpp" MK_PF=3D"yes"  /bin/sh /usr/src/lib/libsysdecode/mkioctls=
>  /usr/include > ioctl.c.tmp
> > In file included from <stdin>:97:
> > /usr/include/./sys/pioctl.h:45:2: warning: "<sys/pioctl.h> is deprecated,=
>  ptrace() should be used instead"
> >       [-W#warnings]
> > #warning "<sys/pioctl.h> is deprecated, ptrace() should be used instead"
> >  ^
> > 1 warning generated.
> > if [ ! -e ioctl.c ] || ! cmp -s ioctl.c ioctl.c.tmp; then  mv -f ioctl.c.=
> tmp ioctl.c;  fi
> > cc  -O2 -pipe -fno-common   -I/data/release/s1/usr/obj/usr/src/amd64.amd6=
> 4/lib/libsysdecode -I/usr/src/sys -I/usr/src/libexec/rtld-elf -DPF -g -MD  =
> -MF.depend.ioctl.o -MTioctl.o -std=3Dgnu99 -Wno-format-zero-length -fstack-=
> protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unu=
> sed-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wre=
> turn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter =
> -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls =
> -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -W=
> thread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variab=
> le  -Qunused-arguments    -c ioctl.c -o ioctl.o
> > In file included from ioctl.c:126:
> > /usr/include/./sys/pioctl.h:45:2: error: "<sys/pioctl.h> is deprecated, p=
> trace() should be used instead"
> >       [-Werror,-W#warnings]
> > #warning "<sys/pioctl.h> is deprecated, ptrace() should be used instead"
> 
> Hmm, I thought that the default removal of obsolete headers would at
> least get right of the header in WORLDTMP, but now I'm wondering if
> there's an additional boundary condition.  (I'm surprised there isn't a
> --sysroot in your compiler command which is presumably why you're
> getting the system sys/pioctl.h...)
> 
> You can do a clean build or work around it by removing ioctl.c in
> <objpath>/lib/libsysdecode and <objpath>/obj-lib32/lib/libsysdecode.

Thanks Brooks
World builds after:
	cd /usr/src;    make delete-old
	remove /usr/include/sys/pioctl.h?

I had mistakenly omitted make delete-old
  (As I ran 2 sequential make worlds on progressively upgraded
  generic src/, without running my usual interleaved script
  http://berklix.com/~jhs/bin/.csh/customise which patches
  src/Makefile.inc1 so delete-old does not rm lots of things I want
  to retain eg:

   /etc/amd.map /etc/host.conf /etc/namedb
   /etc/namedb/PROTO.localhost-v6.rev /etc/namedb/PROTO.localhost.rev
   /etc/namedb/make-localhost /etc/newsyslog.conf.d/amd.conf
   /etc/rc.d/amd /etc/rc.d/nsswitch /usr/bin/pawd /usr/bin/rlogin
   /usr/bin/rsh /usr/include/sys/pioctl.h /usr/libexec/rlogind
   /usr/libexec/rshd /usr/sbin/amd /usr/sbin/amq /usr/sbin/mk-amd-map
   /usr/share/man/man1/pawd.1.gz /usr/share/man/man5/amd.conf.5.gz
   /usr/share/man/man8/amd.8.gz /usr/share/man/man8/amq.8.gz
   /usr/share/man/man8/mk-amd-map.8.gz
   /var/named/etc/namedb/PROTO.localhost.rev
   /var/named/etc/namedb/make-localhost /var/named/etc/namedb/named.root

To stop delete-old causing local damage, my customise applies an ugly diff
 http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/jhs/Makefile.inc1.releases.REL=CURRENT.diff

Better if we could enhance src/Makefile.inc1 delete-old to read a local list 
of exceptions, as does mergemaster from /etc/mergemaster.rc IGNORE_FILES=   ?

Cheers
--
Julian Stacey, Consultant Systems Engineer, BSD Linux http://berklix.com/jhs/
http://berklix.org/corona/   Brexit 31 Dec 2020 will damage UK & EU yet more.



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