From ap@myway.noses.com  Mon Sep 28 02:37:46 1998
Received: from myway.noses.com (myway.noses.com [195.78.188.131])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA07651
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 28 Sep 1998 02:37:43 -0700 (PDT)
          (envelope-from ap@myway.noses.com)
Received: (from ap@localhost)
	by myway.noses.com (8.9.1/8.8.8) id LAA17868;
	Mon, 28 Sep 1998 11:37:28 +0200 (CEST)
	(envelope-from ap)
Message-Id: <199809280937.LAA17868@myway.noses.com>
Date: Mon, 28 Sep 1998 11:37:28 +0200 (CEST)
From: ap <ap@myway.noses.com>
Reply-To: ap@noses.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: something even more broken in /usr/share/mk
X-Send-Pr-Version: 3.2

>Number:         8071
>Category:       misc
>Synopsis:       some obj-links seem not to be taken
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 28 02:40:01 PDT 1998
>Closed-Date:    Wed Mar 10 22:24:50 PST 1999
>Last-Modified:  Mon Mar 15 14:20:00 PST 1999
>Originator:     ap@noses.com
>Release:        FreeBSD 3.0-BETA i386
>Organization:
>Environment:

	
current as of src-cur 3555

>Description:

	
cd /usr/src
bash# make
===> share/info
===> include
===> include/rpcsvc
Warning: Object directory not changed from original /usr/src/include/rpcsvc
===> lib

but:
bash# cd /usr/src/include/rpcsvc/
bash# ls -al obj
lrwxr-xr-x  1 root  bin  31 Sep 27 00:51 obj ->
/usr/obj/usr/src/include/rpcsvc
bash# ls -al obj/
total 168
drwxr-xr-x  2 root  wheel    512 Sep 27 00:51 .
drwxr-xr-x  3 root  wheel    512 Sep 27 00:51 ..
-rw-r--r--  1 root  wheel   3333 Sep 27 00:51 bootparam_prot.h
-rw-r--r--  1 root  wheel   1701 Sep 27 00:51 crypt.h
[...]

I encountered the problem the first time when I couldn't recompile amd even
after a set of make buildworld + make installworld some weeks ago; as I
don't use amd I just removed it from the make file.

I guess this is part of the same problem I encountered with bind/libbind

>How-To-Repeat:

	
see description

>Fix:
	
	
rewrite /usr/share/mk/* ?
Don't know - and my partition for /usr/src isn't big enough to hold the
objects as there are three versions of FreeBSD on it so I can't try
compiling without the obj-links 8-(.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: steve 
Responsible-Changed-When: Sat Oct 3 16:02:11 PDT 1998 
Responsible-Changed-Why:  
Misfile PR. 

From: Sheldon Hearn <sheldonh@iafrica.com>
To: freebsd-gnats-submit@freebsd.org
Cc: ap@noses.com
Subject: Re: misc/8071: some obj-links seem not to be taken
Date: Wed, 03 Mar 1999 23:55:43 +0200

 Hi there,
 
 I'm busy clearing out old PR's and have some advice regarding your
 problem with obj-links that the build process doesn't follow.
 
 I assume that you set OBJLINK in /etc/make.conf. Instead, make /usr/obj
 a symlink to some other place where you have more space. I do this with
 great success on my own CURRENT box:
 
 df -k:
 /dev/wd0s1f                     1308111   708499   494964    59%    /usr
 /dev/wd1s1e                     1337855   292461   938366    24%    /a
 
 ls -l /usr/obj
 lrwxr-xr-x  1 root  wheel  6 Feb 15 14:07 /usr/obj -> /a/obj
 
 Once you've set something like that up, try this:
 
 cd /usr/src ; make clean ; make cleandir ; make cleandir
 
 Then try to build world again and let us know whether this worked for
 you. If it works, we'd still like feedback so that we can close your PR.
 
 Thanks,
 Sheldon.
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Wed Mar 10 22:24:50 PST 1999 
State-Changed-Why:  
Closed with originator's consent. 

From: Sheldon Hearn <sheldonh@iafrica.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: misc/8071: some obj-links seem not to be taken
Date: Sun, 14 Mar 1999 16:25:39 +0200

 Here's useful feedback that came out of a series of private mailings in
 response to my closing the PR:
 
 --------"
 Date    : Fri, 12 Mar 1999 05:51:14 +0100
 From    : Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>
 To      : Sheldon Hearn <sheldonh@iafrica.com>
 Subject : Re: misc/8071: some obj-links seem not to be taken
 
 
 > # cd /usr/src
 > # find . \( -name 'obj' -a -type l \) -delete
 > # make clean ; make cleandir ; make cleandir
 > # make buildworld 2>&1 | tee /var/log/buildworld.log
 > # make installworld 2>&1 | tee /var/log/installworld.log
 
 Ok, I have attached the output of `make obj' and `make installworld'.
 
 As you see `make installworld' fails to install libcrypt. Although
 the obj-link was created properly in `make obj', it now points
 to /usr/obj/aout/usr/src/lib/libcrypt. I've looked through
 `make buildworld' output and found that the original link to
 /usr/obj/usr/src/lib/libcrypt was replaced with the new aout one
 while building the aout legacy support. Do we have a general
 problem here? One source and two different obj directories.
 Would it be a solution to add an extra obj link for aout where
 required, named `obj-aout' possibly?
 
 "--------
 
 Given that OBJLINK support is breaking the legacy build and that it
 hasn't been necessary for ages (thanks to MAKEOBJDIRPREFIX), I propose
 that the following diffs be applied to the source tree to completely
 remove OBJLINK support.
 
 Ciao,
 Sheldon.
 --------
 Index: bsd.obj.mk
 ===================================================================
 RCS file: /home/ncvs/src/share/mk/bsd.obj.mk,v
 retrieving revision 1.26
 diff -u -d -r1.26 bsd.obj.mk
 --- bsd.obj.mk	1998/08/30 20:33:27	1.26
 +++ bsd.obj.mk	1999/03/14 13:46:26
 @@ -31,10 +31,6 @@
  # NOOBJ		Do not create object directories.  This should not be set
  #		if anything is built.
  #
 -# OBJLINK	Create a symbolic link from ${.CURDIR}/obj to
 -#		${CANONICALOBJDIR}.  Note: this BREAKS the read-only source
 -#		tree rule!
 -#
  # +++ targets +++
  #
  #	clean:
 @@ -60,7 +56,7 @@
  .if !defined(NOOBJ) && ${.OBJDIR} != ${CANONICALOBJDIR}
  .if ${.OBJDIR} == ${.CURDIR}
  	@${ECHO} "Warning: Object directory not changed from original ${.CURDIR}"
 -.elif !defined(MAKEOBJDIR) && !defined(MAKEOBJDIRPREFIX) && !defined(OBJLINK)
 +.elif !defined(MAKEOBJDIR) && !defined(MAKEOBJDIRPREFIX)
  	@${ECHO} "Warning: Using ${.OBJDIR} as object directory instead of\
  		canonical ${CANONICALOBJDIR}"
  .endif
 @@ -70,7 +66,6 @@
  .if defined(NOOBJ)
  obj:
  .else
 -.if !defined(OBJLINK)
  obj:	_SUBDIR
  	@if ! test -d ${CANONICALOBJDIR}/; then \
  		mkdir -p ${CANONICALOBJDIR}; \
 @@ -80,30 +75,7 @@
  		fi; \
  		${ECHO} "${CANONICALOBJDIR} created for ${.CURDIR}"; \
  	fi
 -.else
 -obj:	_SUBDIR
 -	@if ! test -d ${CANONICALOBJDIR}/; then \
 -		mkdir -p ${CANONICALOBJDIR}; \
 -		if ! test -d ${CANONICALOBJDIR}/; then \
 -			${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
 -			exit 1; \
 -		fi; \
 -		rm -f ${.CURDIR}/obj; \
 -		ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
 -		${ECHO} "${.CURDIR} -> ${CANONICALOBJDIR}"; \
 -	fi
  .endif
 -.endif
 -.endif
 -
 -.if !target(objlink)
 -objlink: _SUBDIR
 -	@if test -d ${CANONICALOBJDIR}/; then \
 -		rm -f ${.CURDIR}/obj; \
 -		ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
 -	else \
 -		echo "No ${CANONICALOBJDIR} to link to - do a make obj."; \
 -	fi
  .endif
  
  #
 Index: bsd.subdir.mk
 ===================================================================
 RCS file: /home/ncvs/src/share/mk/bsd.subdir.mk,v
 retrieving revision 1.25
 diff -u -d -r1.25 bsd.subdir.mk
 --- bsd.subdir.mk	1998/08/08 07:02:08	1.25
 +++ bsd.subdir.mk	1999/03/14 13:46:51
 @@ -33,7 +33,7 @@
  #
  #	afterdistribute, afterinstall, all, beforeinstall, checkdpadd,
  #	clean, cleandepend, cleandir, depend, install, lint, maninstall,
 -#	obj, objlink, realinstall, regress, tags
 +#	obj, realinstall, regress, tags
  #
  
  .if !target(__initialized__)
 @@ -88,7 +88,7 @@
  
  
  .for __target in all checkdpadd clean cleandepend cleandir depend lint \
 -		 maninstall obj objlink regress tags
 +		 maninstall obj regress tags
  .if !target(${__target})
  ${__target}: _SUBDIRUSE
  .endif
 Index: make.conf
 ===================================================================
 RCS file: /home/ncvs/src/etc/make.conf,v
 retrieving revision 1.74
 diff -u -d -r1.74 make.conf
 --- make.conf	1999/02/03 22:25:41	1.74
 +++ make.conf	1999/03/14 13:48:59
 @@ -28,10 +28,6 @@
  # To avoid building sendmail
  #NO_SENDMAIL=	true
  #
 -# To have 'obj' symlinks created in your source directory
 -#       (they aren't needed/necessary)
 -#OBJLINK=	yes
 -#
  # To compile just the kernel with special optimisations, you should use
  # this instead of CFLAGS (which is not applicable to kernel builds anyway):
  #
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/src/release/Makefile,v
 retrieving revision 1.472
 diff -u -d -r1.472 Makefile
 --- Makefile	1999/02/14 13:56:14	1.472
 +++ Makefile	1999/03/14 13:53:22
 @@ -239,7 +239,6 @@
  	echo "cd /usr/src/release/sysinstall"	>> ${CHROOTDIR}/mk
  	echo "make obj"				>> ${CHROOTDIR}/mk
  	echo "cd /usr/src/release"		>> ${CHROOTDIR}/mk
 -	echo "make objlink"			>> ${CHROOTDIR}/mk
  	echo "make \$${_RELTARGET}"		>> ${CHROOTDIR}/mk
  	echo "echo make ${.TARGET} Finished"	>> ${CHROOTDIR}/mk
  	chmod 755 ${CHROOTDIR}/mk
 

From: Sheldon Hearn <sheldonh@iafrica.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: misc/8071
Date: Tue, 16 Mar 1999 00:13:10 +0200

 Oops, missed two diffs:
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/src/Makefile,v
 retrieving revision 1.224
 diff -u -d -r1.224 Makefile
 --- Makefile	1999/02/17 20:56:09	1.224
 +++ Makefile	1999/03/14 13:49:55
 @@ -88,7 +88,7 @@
  #
  TGTS =	afterdistribute all buildworld checkdpadd clean cleandepend cleandir \
  	depend distribute everything hierarchy includes install installmost \
 -	installworld lint maninstall mk most obj objlink regress rerelease \
 +	installworld lint maninstall mk most obj regress rerelease \
  	tags update world
  
  #
 Index: Makefile.inc0
 ===================================================================
 RCS file: /home/ncvs/src/Makefile.inc0,v
 retrieving revision 1.14
 diff -u -d -r1.14 Makefile.inc0
 --- Makefile.inc0	1999/01/14 06:45:53	1.14
 +++ Makefile.inc0	1999/03/14 13:50:07
 @@ -33,7 +33,7 @@
  #
  BKTGTS=	all checkdpadd clean cleandepend cleandir \
  	depend everything hierarchy includes install installmost \
 -	lint maninstall mk most obj objlink regress rerelease \
 +	lint maninstall mk most obj regress rerelease \
  	tags update
  
  #
 
>Unformatted:
