| Summary: | SHARED=symlinks is broken | ||
|---|---|---|---|
| Product: | Base System | Reporter: | reel <reel> |
| Component: | bin | Assignee: | ru <ru> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.3-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
reel
2001-06-10 04:50:01 UTC
reel@sympatico.ca wrote: > >Description: > When doing a "make world", it seems that it has a problem with > sys/netinet/ip_compat.h > I get the message: > ===> sbin/ipf > make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_compat.h. This is because of either: 1) You are using 'make -DNOCLEAN world' (dont do this) and you have a stale .depend file or 2) Something is stale in your obj directory. rm -rf /usr/obj/* Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 On Sat, 9 Jun 2001, Peter Wemm wrote:
> reel@sympatico.ca wrote:
>
> > >Description:
> > When doing a "make world", it seems that it has a problem with
> > sys/netinet/ip_compat.h
> > I get the message:
> > ===> sbin/ipf
> > make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_compat.h.
>
> This is because of either:
> 1) You are using 'make -DNOCLEAN world' (dont do this) and you have a stale
> .depend file
> or
> 2) Something is stale in your obj directory. rm -rf /usr/obj/*
This is actually because the SHARED=symlinks case was broken by moving
ipfilter, despite this case being the usual case for makeworld. From
src/Makefile.inc1:
@echo "--------------------------------------------------------------"
@echo ">>> stage 4: populating ${WORLDTMP}/usr/include"
@echo "--------------------------------------------------------------"
cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes
^^^^^^^^^^^^^^^^^^^^^^^^
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 4: building libraries"
@echo "--------------------------------------------------------------"
cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG libraries
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 4: make dependencies"
@echo "--------------------------------------------------------------"
cd ${.CURDIR}; ${WMAKE} par-depend
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 4: building everything.."
@echo "--------------------------------------------------------------"
cd ${.CURDIR}; ${WMAKE} all
Bruce
State Changed From-To: open->closed [Cc corrected] On Sun, 10 Jun 2001, Peter Wemm wrote: > Bruce Evans wrote: > > On Sat, 9 Jun 2001, Peter Wemm wrote: > > > > > reel@sympatico.ca wrote: > > > > > > > >Description: > > > > When doing a "make world", it seems that it has a problem with > > > > sys/netinet/ip_compat.h > > > > I get the message: > > > > ===> sbin/ipf > > > > make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_comp > at.h. > > > > > > This is because of either: > > > 1) You are using 'make -DNOCLEAN world' (dont do this) and you have a stal > e > > > .depend file > > > or > > > 2) Something is stale in your obj directory. rm -rf /usr/obj/* > > > > This is actually because the SHARED=symlinks case was broken by moving > > ipfilter, despite this case being the usual case for makeworld. From > > src/Makefile.inc1: > > > > @echo "--------------------------------------------------------------" > > @echo ">>> stage 4: populating ${WORLDTMP}/usr/include" > > @echo "--------------------------------------------------------------" > > cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes > > SHARED=symlinks may be broken, but it isn't causing world to die. I have > two recent -stable (as little as 10 minutes ago) builds that I can show you > if you dont believe me. That is another bug :-). You must have garbage in /usr/include/netinet from a previous installworld. Buildworld picks up this garbage because -nostdinc was removed from CFLAGS in rev.1.105 of src/Makefile.inc1. > The actual error message comes from stale .depend data. That is the only > way that make ever gets told about the existance of > "/usr/src/sbin/ipf/../../sys/netinet/ip_compat.h" Yes. I haven't actually run makeworld to test this and jumped to some conclusions. > See the CFLAGS in -stable: > CFLAGS+=-DIPL_NAME=\"/dev/ipl\" -I- -I${.CURDIR}/../../sys/netinet \ > -I${.CURDIR}/../../contrib/ipfilter > > These should be changed to ../../sys/contrib/ipfilter/netinet for -stable. > > However, this is not breaking the build. It may not be correct, but it > is not causing an abort. Stale .depend data is causing the make failures. > > It is also broken on -current for different reasons. Sometimes it uses the > ones from sys/netinet via the installed includes, and other times it uses > the ones in ../../contrib/ipfilter (when doing #include "ip_compat.h" etc). It seems to only find "ip_compat.h" there. This is enough to build ipf. ipmon apparently uses <netinet/foo.h> so it doesn't build unless the ipfilter headers are in a subdir named netinet somewhere (and a default or -I path to the directory above). > Somebody got carried away in removing -I../../sys in -current and broke > things even more by removing -I../../sys/netinet at the same time. Bruce Bruce Evans wrote: > [Cc corrected] > > On Sun, 10 Jun 2001, Peter Wemm wrote: > > > Bruce Evans wrote: > > > On Sat, 9 Jun 2001, Peter Wemm wrote: > > > > > > > reel@sympatico.ca wrote: > > > > > > > > > >Description: > > > > > When doing a "make world", it seems that it has a problem with > > > > > sys/netinet/ip_compat.h > > > > > I get the message: > > > > > ===> sbin/ipf > > > > > make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_ comp > > at.h. > > > > > > > > This is because of either: > > > > 1) You are using 'make -DNOCLEAN world' (dont do this) and you have a stal > > e > > > > .depend file > > > > or > > > > 2) Something is stale in your obj directory. rm -rf /usr/obj/* > > > > > > This is actually because the SHARED=symlinks case was broken by moving > > > ipfilter, despite this case being the usual case for makeworld. From > > > src/Makefile.inc1: > > > > > > @echo "--------------------------------------------------------------" > > > @echo ">>> stage 4: populating ${WORLDTMP}/usr/include" > > > @echo "--------------------------------------------------------------" > > > cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes > > > > SHARED=symlinks may be broken, but it isn't causing world to die. I have > > two recent -stable (as little as 10 minutes ago) builds that I can show you > > if you dont believe me. > > That is another bug :-). You must have garbage in /usr/include/netinet > from a previous installworld. Buildworld picks up this garbage because > -nostdinc was removed from CFLAGS in rev.1.105 of src/Makefile.inc1. Actually, I did two build/installworlds, in this order. I was concerned about junk in /usr/include as a result of switching this box from -current to -stable. 0) rm -rf /usr/obj/* 1) make buildworld 2) make installworld 3) mv /usr/include /usr/include.old; also clean up old files in / and /usr 4) make installworld 5) rm -rf /usr/obj/* 6) make world The problem is that ipf.c etc has this crud: #include "ip_compat.h" #include "ip_fil.h" #include "ip_nat.h" #include "ip_state.h" #include "ipf.h" #include "ipl.h" -nostdinc has no bearing on that at all. We *needed* the -I../../sys/netinet so that everything was supposed to use the same include files, but in -current ru@freebsd.org removed it without replacing the functionality. > > See the CFLAGS in -stable: > > CFLAGS+=-DIPL_NAME=\"/dev/ipl\" -I- -I${.CURDIR}/../../sys/netinet \ > > -I${.CURDIR}/../../contrib/ipfilter > > > > These should be changed to ../../sys/contrib/ipfilter/netinet for -stable. > > > > However, this is not breaking the build. It may not be correct, but it > > is not causing an abort. Stale .depend data is causing the make failures. > > > > It is also broken on -current for different reasons. Sometimes it uses the > > ones from sys/netinet via the installed includes, and other times it uses > > the ones in ../../contrib/ipfilter (when doing #include "ip_compat.h" etc) . > > It seems to only find "ip_compat.h" there. This is enough to build ipf. > ipmon apparently uses <netinet/foo.h> so it doesn't build unless the > ipfilter headers are in a subdir named netinet somewhere (and a default > or -I path to the directory above). Personally, with disk space being as cheap as it is, I feel we should deorbit SYMLINKS=shared. After all, some people even build their entire worlds static. This would greatly reduce the complexity of building an include tree and reduce the margin for error. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 On Sun, 10 Jun 2001, Peter Wemm wrote: > > > SHARED=symlinks may be broken, but it isn't causing world to die. I have > > > two recent -stable (as little as 10 minutes ago) builds that I can show you > > > if you dont believe me. > > > > That is another bug :-). You must have garbage in /usr/include/netinet > > from a previous installworld. Buildworld picks up this garbage because > > -nostdinc was removed from CFLAGS in rev.1.105 of src/Makefile.inc1. > > Actually, I did two build/installworlds, in this order. I was concerned > about junk in /usr/include as a result of switching this box from > -current to -stable. > 0) rm -rf /usr/obj/* > 1) make buildworld This can work because you have an old (but sufficiently current to work) set of ipfilter headers in /usr/include/netinet ... > 2) make installworld and this installs a current set of ipfilter headers in /usr/include/netinet (but this set will be "old" again for the next build, because the sources may have changed). > 3) mv /usr/include /usr/include.old; also clean up old files in / and /usr This gets rid of all the headers ... > 4) make installworld ... and this installs all headers again, including a current set of ipfilter headers. > 5) rm -rf /usr/obj/* > 6) make world This works because you have an old (but sufficiently current to work) set of ipfilter headers in /usr/include/netinet ... Here the headers are certainly sufficiently current to work, because you just installed them, but this is not true in general. People upgrading from RELENG_4 have the RELENG_4 headers and might fail in step (1). > The problem is that ipf.c etc has this crud: > #include "ip_compat.h" > #include "ip_fil.h" > #include "ip_nat.h" > #include "ip_state.h" > #include "ipf.h" > #include "ipl.h" > -nostdinc has no bearing on that at all. We *needed* the -I../../sys/netinet > so that everything was supposed to use the same include files, but in > -current ru@freebsd.org removed it without replacing the functionality. I see. ipmon seems to be the only exception. ipmon/Makefile only used -I../../sys, and ipmon.c only uses: #include "netinet/ip_compat.h" #include "netinet/ip_fil.h" #include "netinet/ip_proxy.h" #include "netinet/ip_nat.h" #include "netinet/ip_state.h" > Personally, with disk space being as cheap as it is, I feel we should > deorbit SYMLINKS=shared. After all, some people even build their entire > worlds static. This would greatly reduce the complexity of building an > include tree and reduce the margin for error. You mean SHARED=symlinks. This is more for avoiding having a separate copy of the headers than to save space. Copies of things are sources of bitrot. Bruce State Changed From-To: closed->open SHARED=symlink case is currently broken. Responsible Changed From-To: freebsd-bugs->ru I plan to work this out. Somehow... State Changed From-To: open->closed This feature is now back available in 4.6-STABLE and 5.0-CURRENT. |