I get the error "/usr/src/usr.bin/netstat/inet.c:86:10: fatal error: 'nl_defs.h' file not found" when trying to create a crunched binary of netstat (I'm actually adding lots of other programs but they are not causing problems only netstat so just keeping it simple for the sake of this post/question).
The error is on a brand new and fully updated FreeBSD 12.1 system however it works perfectly fine on a11.3 system. Any idea what the problem might be? Here's the details:
The error is on a brand new and fully updated FreeBSD 12.1 system however it works perfectly fine on a11.3 system. Any idea what the problem might be? Here's the details:
test:/tmp/test # uname -a
FreeBSD test.example.com 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 TEST amd64
test:/tmp/test # cat test.conf
srcdirs /usr/src/bin /usr/src/sbin /usr/src/usr.bin /usr/src/usr.sbin
progs netstat
libs -lkvm -lmemstat -lxo -lutil -lnetgraph -lelf
test:/tmp/test # crunchgen -m Makefile -e test test.conf
Run "make -f Makefile" to build crunched binary.
test:/tmp/test # make
(cd /usr/src/usr.bin/netstat && make depend && make if.o inet.o main.o mbuf.o mroute.o netisr.o nl_symbols.o route.o unix.o mroute6.o ipsec.o bpf.o pfkey.o sctp.o inet6.o netgraph.o)
`if.o' is up to date.
`inet.o' is up to date.
`main.o' is up to date.
`mbuf.o' is up to date.
`mroute.o' is up to date.
`netisr.o' is up to date.
`nl_symbols.o' is up to date.
`route.o' is up to date.
`unix.o' is up to date.
`mroute6.o' is up to date.
`ipsec.o' is up to date.
`bpf.o' is up to date.
`pfkey.o' is up to date.
`sctp.o' is up to date.
`inet6.o' is up to date.
`netgraph.o' is up to date.
cc -O2 -pipe -c test.c -o test.o
echo "extern int main(int argc, char **argv, char **envp); int _crunched_netstat_stub(int argc, char **argv, char **envp){return main(argc,argv,envp);}" >netstat_stub.c
cc -O2 -pipe -c netstat_stub.c -o netstat_stub.o
cc -O2 -pipe -c /usr/src/usr.bin/netstat/inet.c -o /usr/src/usr.bin/netstat/inet.o
/usr/src/usr.bin/netstat/inet.c:86:10: fatal error: 'nl_defs.h' file not found
#include "nl_defs.h"
^~~~~~~~~~~
1 error generated.
*** Error code 1
Stop.
make: stopped in /tmp/test
test:/tmp/test #