From eugen@www.svzserv.kemerovo.su  Thu Mar 28 02:02:49 2002
Return-Path: <eugen@www.svzserv.kemerovo.su>
Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80])
	by hub.freebsd.org (Postfix) with ESMTP id 70E5637B405
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 28 Mar 2002 02:02:47 -0800 (PST)
Received: (from eugen@localhost)
	by www.svzserv.kemerovo.su (8.11.6/8.11.6) id g2SA2hY54081;
	Thu, 28 Mar 2002 17:02:43 +0700 (KRAT)
	(envelope-from eugen)
Message-Id: <200203281002.g2SA2hY54081@www.svzserv.kemerovo.su>
Date: Thu, 28 Mar 2002 17:02:43 +0700 (KRAT)
From: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
Reply-To: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: It's impossible to rebuild GENERIC kernel if world built with NOLIB=true: no libl
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36417
>Category:       bin
>Synopsis:       It's impossible to rebuild GENERIC kernel if world built with NOLIB=true: no libl
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 28 02:10:01 PST 2002
>Closed-Date:    Thu Mar 28 02:56:27 PST 2002
>Last-Modified:  Thu Mar 28 03:30:01 PST 2002
>Originator:     Eugene Grosbein
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Svyaz Service
>Environment:
System: FreeBSD www.svzserv.kemerovo.su 4.5-STABLE FreeBSD 4.5-STABLE #2: Wed Mar 20 10:19:40 KRAT 2002 eu@www.svzserv.kemerovo.su:/home3/obj/home3/src/sys/WWW i386

>Description:
	One can build relatively small (<64M) small world using
	many flags like NOSHARED=no, NOLIB=true etc. to use FreeBSD
	with small media (flash, old small hard drive) 
	when PicoBSD is not an option. I built such world and custom kernel,
	all runs find. It was built from recent STABLE sources so 
	I decided to rebuild GENERIC too. This host has small drive
	so it can only handle kernel sources so I used old kernel building
	method: config GENERIC; cd ../../compile/GENERIC; make depend && make

	But it failed because NOLIB=true disabled building of libl:

make -f ../../dev/aic7xxx/aicasm/Makefile MAKESRCPATH=../../dev/aic7xxx/aicasm
Warning: Object directory not changed from original /usr/src/sys/compile/GENERIC
cc -O -pipe -m486 -I/usr/include -I.    -o aicasm aicasm_gram.o aicasm_scan.o aicasm.o aicasm_symbol.o  -ll
/usr/libexec/elf/ld: cannot find -ll
*** Error code 1

Stop in /usr/src/sys/compile/GENERIC.
*** Error code 1

Stop in /usr/src/sys/compile/GENERIC.

>How-To-Repeat:

	Make world with NOLIB=true, install it, run it and try to
	build GENERIC kernel.

>Fix:

	Make building of libl unconditional.
	
--- usr.bin/lex/Makefile.orig	Thu Mar 28 17:00:43 2002
+++ usr.bin/lex/Makefile	Thu Mar 28 17:00:59 2002
@@ -24,9 +24,7 @@
 
 CLEANFILES=	scan.c skel.c
 
-.if !defined(NOLIB)
 SUBDIR=		lib
-.endif
 
 skel.c: mkskel.sh flex.skl
 	sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Thu Mar 28 02:55:44 PST 2002 
State-Changed-Why:  
Committed, thanks! 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Thu Mar 28 02:55:44 PST 2002 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=36417 

From: Bruce Evans <bde@zeta.org.au>
To: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/36417: It's impossible to rebuild GENERIC kernel if world
 built with NOLIB=true: no libl
Date: Thu, 28 Mar 2002 22:22:35 +1100 (EST)

 On Thu, 28 Mar 2002, Eugene Grosbein wrote:
 
 > >Description:
 > 	One can build relatively small (<64M) small world using
 > 	many flags like NOSHARED=no, NOLIB=true etc. to use FreeBSD
 > 	with small media (flash, old small hard drive)
 > 	when PicoBSD is not an option. I built such world and custom kernel,
 > 	all runs find. It was built from recent STABLE sources so
 > 	I decided to rebuild GENERIC too. This host has small drive
 > 	so it can only handle kernel sources so I used old kernel building
 > 	method: config GENERIC; cd ../../compile/GENERIC; make depend && make
 >
 > 	But it failed because NOLIB=true disabled building of libl:
 
 I think that is the sole purpose NOLIB.  NOLIB used to be used for
 bootstrapping lex.  That is no longer supported (we assume that the
 host lex exists and can handle all lex sources correctly), so NOLIB
 is not used except to optionally break the build.
 
 Bruce
 
>Unformatted:
