Subject: Re: make build error - 970619 src from ftp.netbsd.org
To: c5666305 <c5666305@csns02.COMP.POLYU.EDU.HK>
From: Alistair Crooks <azcb0@juno.uts.amdahl.com>
List: current-users
Date: 06/20/1997 01:52:12
> I encountered the following error when I tried to make build for the 970619
> source from fto.netbsd.org.
> 
> ===> usr.sbin/pkg_install/add
> cc -O  -I/usr/src/usr.sbin/pkg_install/add/../lib  -Werror  -c main.c
> cc -O  -I/usr/src/usr.sbin/pkg_install/add/../lib  -Werror  -c perform.c
> cc -O  -I/usr/src/usr.sbin/pkg_install/add/../lib  -Werror  -c futil.c
> cc -O  -I/usr/src/usr.sbin/pkg_install/add/../lib  -Werror  -c extract.c
> cc   -o pkg_add main.o perform.o futil.o extract.o -L -linstall
> main.o: Undefined symbol `_Force' referenced from text segment
> main.o: Undefined symbol `_Fake' referenced from text segment
> main.o: Undefined symbol `_Verbose' referenced from text segment
> main.o: Undefined symbol `_whinge' referenced from text segment
> main.o: Undefined symbol `_isURL' referenced from text segment
> .
> .
> .
> 
> Error 1
> 
> 
> Any idea ?

The INSTALLOBJDIR make definition is missing above (see -L in call to
link pkg_add).  This definition is set in
usr.sbin/pkg_install/Makefile.inc.  This file was last changed on June
6th, when it was imported from FreeBSD.  So either you have an
incorrect set of files, or you have modified them locally. This is what
it should look like (I use obj dirs):

root@pumpy:/usr/src/usr.sbin/pkg_install(1341)# make
===> lib
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/lib/exec.c
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/lib/file.c
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/lib/global.c
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/lib/msg.c
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/lib/pen.c
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/lib/plist.c
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/lib/str.c
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/lib/ftpio.c
cc -O -I/usr/pkg/src/usr.sbin/pkg_install/lib   -Werror  -c ftperr.c
building standard install library
ranlib libinstall.a
===> add
cc -O  -I/usr/pkg/src/usr.sbin/pkg_install/add/../lib  -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/add/main.c
cc -O  -I/usr/pkg/src/usr.sbin/pkg_install/add/../lib  -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/add/perform.c
cc -O  -I/usr/pkg/src/usr.sbin/pkg_install/add/../lib  -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/add/futil.c
cc -O  -I/usr/pkg/src/usr.sbin/pkg_install/add/../lib  -Werror  -c /usr/pkg/src/usr.sbin/pkg_install/add/extract.c
cc   -o pkg_add main.o perform.o futil.o extract.o -L/usr/pkg/src/usr.sbin/pkg_install/add/../lib/obj -linstall
pen.o: warning: mktemp() possibly used unsafely, consider using mkstemp()

etc etc etc.

Alistair