Subject: misc/3683: problem with links in /usr/obj/build/usr/lib (especially libcompat.a)
To: None <gnats-bugs@gnats.netbsd.org, bernd@arresum.inka.de>
From: Bernd Ernesti <bernd@arresum.inka.de>
List: netbsd-bugs
Date: 05/29/1997 23:13:36
>Number: 3683
>Category: misc
>Synopsis: problem with links in /usr/obj/build/usr/lib (especially libcompat.a)
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 29 14:20:01 1997
>Last-Modified:
>Originator: Bernd Ernesti
>Organization:
>Release: NetBSD-current 29-May-97 15:00GMT
>Environment:
System: NetBSD arresum 1.2E NetBSD 1.2E (VEEGO) #465: Sun May 25 20:01:33 MEST 1997 bernd@arresum:/home/work/obj_amiga/src/sys/arch/amiga/compile/VEEGO amiga
>Description:
bsd.lib.mk adds a link to /usr/obj/build/usr/lib for all libraries
which don't have their own lib*.*: lines in their Makefile.
cd /usr/obj/build/usr/lib
ls -l | grep -v "src/lib" | grep -v "src/gnu/lib/" | grep -v "src/gnu/usr.bin/gcc/lib"
libbfd.a -> /home/source/obj_i386/src/gnu/usr.bin/gdb/bfd/libbfd.a
libbib.a -> /home/source/obj_i386/src/gnu/usr.bin/groff/libbib/libbib.a
libcc1.a -> /home/source/obj_i386/src/gnu/usr.bin/gcc/common/libcc1.a
libdhcp.a -> /home/source/obj_i386/src/usr.sbin/dhcp/common/libdhcp.a
libdriver.a -> /home/source/obj_i386/src/gnu/usr.bin/groff/libdriver/libdriver.a
libgroff.a -> /home/source/obj_i386/src/gnu/usr.bin/groff/libgroff/libgroff.a
libiberty.a -> /home/source/obj_i386/src/gnu/usr.bin/gdb/libiberty/libiberty.a
librcs.a -> /home/source/obj_i386/src/gnu/usr.bin/rcs/lib/librcs.a
libreadline.a -> /home/source/obj_i386/src/gnu/usr.bin/gdb/readline/libreadline.a
libunix.a -> /home/source/obj_i386/src/gnu/libexec/uucp/libunix/libunix.a
libuuconf.a -> /home/source/obj_i386/src/gnu/libexec/uucp/libuuconf/libuuconf.a
libuucp.a -> /home/source/obj_i386/src/gnu/libexec/uucp/libuucp/libuucp.a
>How-To-Repeat:
Build a system with obj dirs and then build a kernel in
/usr/obj/src/sys/arch/<arch>/compile/<xxx> and watch the output:
[..]
building standard compat library
install -d /usr/obj/build/usr/lib
/usr/obj/build/usr/lib/libcompat.a -> /home/source/obj_i386/src/sys/arch/i386/compile/VEEGO/lib/compat/libcompat.a
ranlib libcompat.a
[..]
Bumm. The kernel build overwrittes the old link for libcompat.a and now you
have a real problem to link programms from the NetBSD src-tree with -lcompat.
cd /usr/obj/build/usr/lib; ls -la | grep libcompat.a
- before the kernel build:
libcompat.a -> /home/source/obj_i386/src/lib/libcompat/libcompat.a
- after the kernel build:
libcompat.a -> /home/source/obj_i386/src/sys/arch/i386/compile/VEEGO/lib/compat/libcompat.a
>Fix:
Only link libraries to ${BUILDDIR}${LIBDIR}/ which will be
installed to /usr/lib.
One solution will be a FLAG in the Makefile of this libraries
and use that in bsd.lib.mk.
>Audit-Trail:
>Unformatted: