Subject: misc/14626: build.sh fails in make obj when MKPIC=no
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kpneal@pobox.com>
List: netbsd-bugs
Date: 11/18/2001 15:36:01
>Number:         14626
>Category:       misc
>Synopsis:       build.sh fails in make obj when MKPIC=no
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 18 12:37:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Kevin P. Neal
>Release:        NetBSD 1.5.1
>Organization:
-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/

"You know, I think I can hear the machine screaming from here...  \
'help me! hellpp meeee!'"  - Heather Flanagan, 14:52:23 Wed Jun 10 1998
>Environment:
System: NetBSD tesseract.int.neutralgood.org 1.5.2 NetBSD 1.5.2 (TESSERACT) #25: Fri Nov 2 22:36:26 EST 2001 kpn@tome.int.neutralgood.org:/local/kernel/compile/TESSERACT alpha


>Description:
Using a current -current tree and doing a build I get this error:

obj ===> lib/libroken
--- obj-libcrypto ---
nbmake: "/local/home/kpn/build/main/basesrc/lib/libcrypto/Makefile" line 85: warning: "cd /local/home/kpn/build/main/basesrc/lib/libcrypto/../libdes && ktrace -i /local/home/kpn/tooldir/bin/nbmake -B print-shlib-major" returned non-zero status
--- obj-libroken ---
--- obj ---
--- obj-libvers ---
obj ===> lib/libvers
--- obj ---
--- obj-libcrypto ---
nbmake: "/local/home/kpn/build/main/basesrc/lib/libcrypto/Makefile" line 86: warning: "cd /local/home/kpn/build/main/basesrc/lib/libcrypto/../libdes && /local/home/kpn/tooldir/bin/nbmake -B print-shlib-minor" returned non-zero status
--- obj-libcom_err ---
obj ===> lib/libcom_err

The problem seems to be this:

        print-shlib-major:
        .if defined(SHLIB_MAJOR) && ${MKPIC} != "no"
                @echo ${SHLIB_MAJOR}
        .else   
                @false
        .endif  

>How-To-Repeat:

Try to recompile sshd. Fail with undefined symbols in openssl. Try to
recompile openssl. Fail. Decide to rebuild the whole darn tree but
static so the resulting sshd binary can run on a 1.5.2 system. Unpack
the entire latest source tree. Run build.sh with this wrapper-wrapper
script (and fail):

#! /bin/ksh

export DESTDIR=/local/home/kpn/destdir
export TOOLDIR=/local/home/kpn/tooldir
export MKLINT=no
export MKPIC=no
export MKPROFILE=no
export USETOOLS=yes
export NODISTRIBDIRS=1
export NOCLEANDIR=1
export NBUILDJOBS=2

./build.sh -D $DESTDIR

***
***
Another problem that I'll mention now: If I leave out the NBUILDJOBS=2
line then the make blows up considerably earlier when it can't cd to
the .WAIT directory. I imagine this is due to nbmake/pmake/bmake/whatever
having the "compatibility" engine stuck in the 20th century. 

>Fix:

You got me. 
>Release-Note:
>Audit-Trail:
>Unformatted: