Subject: Re: defined(SHAREDSTRINGS) == failed build, and more.
To: NetBSD Current Users <>
From: Greywolf <>
List: current-users
Date: 10/24/2003 11:55:38
Following on:

G> Greetings, all, please redirect this to the appropriate place (would
G> tech-toolchain have been better?).
G> If I define SHAREDSTRINGS in /etc/mk.conf, the build fails in gnu/dist/bc
G> with:...


TEST_MK_CONF when defined sets the following parameters in mk.conf
(a comfortable little subset, as I'm trying to determine what's breaking
my build):

	MKPIC=no		# build everything static
	NO_MK_CONF=yes		# cuts all the other garbage out from mk.conf

I have COPTS tuned to -march=athlon-xp.

Does COPTS mess with something it oughtn't?  I was told that modifying
COPTS (via +=) was the way to go.  Please correct me if I'm wrong.

If I define MKPIC=no (i.e. "please build everything static"),
I run into the following problems [output run thru fold]:

===> command: ./ -T /usr/src/tools/tools-i386 -M /d2/arch/i386/
obj -D /d2/arch/i386/build -R /d2/arch/i386/release -m i386 -V BUILD=you bet -V TEST_MK_CONF=1 build
===> started: Fri Oct 24 10:45:28 PDT 2003
/.amd/rivendell/.../src/tools -> /d2/arch/i386/obj/.amd/rivendell/.../src/tools
===> MACHINE:          i386
===> MACHINE_ARCH:     i386
===> TOOLDIR path:     /usr/src/tools/tools-i386
===> DESTDIR path:     /d2/arch/i386/build
===> RELEASEDIR path:  /d2/arch/i386/release
===> makewrapper:      /usr/src/tools/tools-i386/bin/nbmake-i386
===> Updated /usr/src/tools/tools-i386/bin/nbmake-i386
Build started at: Fri Oct 24 10:45:29 PDT 2003
cleandir ===> tools
cleandir ===> tools/host-mkdep
rm -f a.out [Ee]rrs mklog core *.core     config.cache config.log config.status
cleandir ===> tools/compat
rm -r -f include
rm -f config.cache config.h
rm -f a.out [Ee]rrs mklog core *.core  libnbcompat.a atoll.lo basename.lo dirnam
e.lo fgetln.lo flock.lo fparseln.lo getmode.lo getopt_long.lo gettemp.lo issetug
id.lo lchflags.lo lchmod.lo lchown.lo libyywrap.lo md2c.lo md2hl.lo md4c.lo md4h
l.lo md5c.lo md5hl.lo mkdtemp.lo mkstemp.lo pread.lo putc_unlocked.lo pwcache.lo
 pwrite.lo pw_scan.lo rmd160.lo rmd160hl.lo setenv.lo setgroupent.lo setpassent.
lo setprogname.lo sha1.lo sha1hl.lo snprintf.lo strlcat.lo strlcpy.lo strmode.lo
 strsep.lo strsuftoll.lo strtoll.lo unvis.lo vis.lo _err.lo _errx.lo _verr.lo _v
errx.lo _vwarn.lo _vwarnx.lo _warn.lo _warnx.lo __fts13.lo __glob13.lo bt_close.
lo bt_conv.lo bt_debug.lo bt_delete.lo bt_get.lo bt_open.lo bt_overflow.lo bt_pa
ge.lo bt_put.lo bt_search.lo bt_seq.lo bt_split.lo bt_utils.lo db.lo hash.lo has
h_bigkey.lo hash_buf.lo hash_func.lo hash_log2.lo hash_page.lo mpool.lo rec_clos
e.lo rec_delete.lo rec_get.lo rec_open.lo rec_put.lo rec_search.lo rec_seq.lo re
c_utils.lo config.log config.status configure.lineno confdefs.h *.stamp

rm -f .depend __fts13.d __glob13.d _err.d _errx.d _verr.d _verrx.d _vwarn.d _vwa
rnx.d _warn.d _warnx.d atoll.d basename.d bt_close.d bt_conv.d bt_debug.d bt_del
ete.d bt_get.d bt_open.d bt_overflow.d bt_page.d bt_put.d bt_search.d bt_seq.d b
t_split.d bt_utils.d db.d dirname.d fgetln.d flock.d fparseln.d getmode.d getopt
_long.d gettemp.d hash.d hash_bigkey.d hash_buf.d hash_func.d hash_log2.d hash_p
age.d issetugid.d lchflags.d lchmod.d lchown.d libyywrap.d md2c.d md2hl.d md4c.d
 md4hl.d md5c.d md5hl.d mkdtemp.d mkstemp.d mpool.d pread.d putc_unlocked.d pw_s
can.d pwcache.d pwrite.d rec_close.d rec_delete.d rec_get.d rec_open.d rec_put.d
 rec_search.d rec_seq.d rec_utils.d rmd160.d rmd160hl.d setenv.d setgroupent.d s
etpassent.d setprogname.d sha1.d sha1hl.d snprintf.d strlcat.d strlcpy.d strmode
.d strsep.d strsuftoll.d strtoll.d unvis.d vis.d /.amd/rivendell/.../src/tools/c
cleandir ===> tools/binstall
rm -f a.out [Ee]rrs mklog core *.core  xinstall xinstall.lo getid.lo  xinstall.l
n getid.ln
rm -f .depend getid.d xinstall.d /.amd/rivendell/.../src/tools/binstall/tags
cleandir ===> tools/mktemp
rm -f a.out [Ee]rrs mklog core *.core  mktemp mktemp.lo  mktemp.ln
rm -f .depend mktemp.d /.amd/rivendell/.../src/tools/mktemp/tags
cleandir ===> tools/cap_mkdb
rm -f a.out [Ee]rrs mklog core *.core  cap_mkdb cap_mkdb.lo getcap.lo  cap_mkdb.
ln getcap.ln
rm -f .depend cap_mkdb.d getcap.d /.amd/rivendell/.../src/tools/cap_mkdb/tags
cleandir ===> tools/crunchgen
rm -f a.out [Ee]rrs mklog core *.core  crunchgen crunchgen.lo crunched_skel.lo
crunchgen.ln crunched_skel.ln crunched_skel.c
#   compile  varobj.o
/usr/src/tools/tools-i386/bin/i386--netbsdelf-gcc -O2    -march=athlon-xp     -m
arch=athlon-xp   -Werror  -I/.amd/rivendell/.../src/gnu/usr.bin/gdb53/gdb/../arc
h/i386  -I/usr/src/gnu/dist/gdb/gdb  -I/usr/src/gnu/dist/gdb/gdb/config  -I/usr/
src/gnu/dist/gdb/include  -I/usr/src/gnu/dist/gdb/include/opcode  -I/usr/src/gnu
/dist/gdb/bfd  -I/.amd/rivendell/.../src/gnu/usr.bin/gdb53/gdb/../bfd  -I/usr/sr
c/gnu/dist/gdb/gdb/tui  -DHAVE_CONFIG_H  -DLOCALEDIR='"/usr/share/locale"'  -DUS
E_INCLUDED_REGEX  -DNETBSD_CORE  -nostdinc -isystem /d2/arch/i386/build/usr/incl
ude  -c    /usr/src/gnu/dist/gdb/gdb/varobj.c
#   compile  version.o
/usr/src/tools/tools-i386/bin/i386--netbsdelf-gcc -O2    -march=athlon-xp     -m
arch=athlon-xp   -Werror  -I/.amd/rivendell/.../src/gnu/usr.bin/gdb53/gdb/../arc
h/i386  -I/usr/src/gnu/dist/gdb/gdb  -I/usr/src/gnu/dist/gdb/gdb/config  -I/usr/
src/gnu/dist/gdb/include  -I/usr/src/gnu/dist/gdb/include/opcode  -I/usr/src/gnu
/dist/gdb/bfd  -I/.amd/rivendell/.../src/gnu/usr.bin/gdb53/gdb/../bfd  -I/usr/sr
c/gnu/dist/gdb/gdb/tui  -DHAVE_CONFIG_H  -DLOCALEDIR='"/usr/share/locale"'  -DUS
E_INCLUDED_REGEX  -DNETBSD_CORE  -nostdinc -isystem /d2/arch/i386/build/usr/incl
ude  -c    /.amd/rivendell/.../src/gnu/usr.bin/gdb53/arch/i386/version.c
#   compile  wrapper.o
/usr/src/tools/tools-i386/bin/i386--netbsdelf-gcc -O2    -march=athlon-xp     -m
arch=athlon-xp   -Werror  -I/.amd/rivendell/.../src/gnu/usr.bin/gdb53/gdb/../arc
h/i386  -I/usr/src/gnu/dist/gdb/gdb  -I/usr/src/gnu/dist/gdb/gdb/config  -I/usr/
src/gnu/dist/gdb/include  -I/usr/src/gnu/dist/gdb/include/opcode  -I/usr/src/gnu
/dist/gdb/bfd  -I/.amd/rivendell/.../src/gnu/usr.bin/gdb53/gdb/../bfd  -I/usr/sr
c/gnu/dist/gdb/gdb/tui  -DHAVE_CONFIG_H  -DLOCALEDIR='"/usr/share/locale"'  -DUS
E_INCLUDED_REGEX  -DNETBSD_CORE  -nostdinc -isystem /d2/arch/i386/build/usr/incl
ude  -c    /usr/src/gnu/dist/gdb/gdb/wrapper.c
#      link  gdb
/usr/src/tools/tools-i386/bin/i386--netbsdelf-gcc    -o gdb -nostdlib  /d2/arch/
i386/build/usr/lib/crt0.o /d2/arch/i386/build/usr/lib/crti.o /d2/arch/i386/build
/usr/lib/crtbegin.o annotate.o arch-utils.o ax-gdb.o ax-general.o bcache.o block
frame.o breakpoint.o buildsym.o builtin-regs.o c-lang.o c-typeprint.
o c-valprint.o ch-exp.o ch-lang.o ch-typeprint.o ch-valprint.o cli-cmds.o cli-de
code.o cli-dump.o cli-out.o cli-script.o cli-setshow.o coffread.o complaints.o c
ompleter.o copying.o corefile.o corelow.o cp-abi.o cp-valprint.o dbxread.o dcach
e.o demangle.o doublest.o dwarf2read.o dwarfread.o elfread.o environ.o eval.o ev
ent-loop.o event-top.o exec.o expprint.o f-lang.o f-typeprint.o f-va
lprint.o findvar.o fork-child.o frame.o gdb.o gdb-events.o gdbarch.o gdbtypes.o
gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o i386-tdep.o i386bsd-nat.o i386bsd-tdep.o i
386nbsd-nat.o i386nbsd-tdep.o i387-tdep.o inf-loop.o infcmd.o inflow.o infptrace
.o infrun.o inftarg.o init.o jv-lang.o jv-typeprint.o jv-valprint.o
 kcore-nbsd.o kod-cisco.o kod.o language.o linespec.o m2-lang.o m2-
typeprint.o m2-valprint.o macrocmd.o macroexp.o macroscope.o macrotab.o main.o m
aint.o mdebugread.o mem-break.o memattr.o mi-cmd-break.o mi-cmd-disas.o mi-cmd-s
tack.o mi-cmd-var.o mi-cmds.o mi-console.o mi-getopt.o mi-main.o mi-out.o mi-par
se.o minsyms.o mipsread.o nbsd-tdep.o nbsd-thread.o nlmread.o objfiles.o os9krea
d.o osabi.o p-lang.o p-typeprint.o p-valprint.o parse.o printcmd.o r
egcache.o remote-utils.o remote.o scm-exp.o scm-lang.o scm-valprint.o ser-pipe.o
 ser-tcp.o ser-unix.o serial.o signals.o solib-svr4.o solib.o source.o stabsread
.o stack.o std-regs.o symfile.o symmisc.o symtab.o target.o thread.o top.o trace
point.o typeprint.o ui-file.o ui-out.o utils.o valarith.o valops.o valprint.o va
lues.o varobj.o version.o wrapper.o -lcurses -ltermcap -lintl -lm -lkvm -lpthrea
d_dbg  -L/d2/arch/i386/obj/.amd/rivendell/.../src/gnu/usr.bin/gdb53/opcodes -lop
codes -L/d2/arch/i386/obj/.amd/rivendell/.../src/gnu/usr.bin/gdb53/bfd -lbfd  -l
edit  -L/d2/arch/i386/obj/.amd/rivendell/.../src/gnu/usr.bin/gdb53/libiberty -li
berty -L/d2/arch/i386/build/usr/lib -L/d2/arch/i386/build/usr/lib  -lgcc -lc -lg
cc /d2/arch/i386/build/usr/lib/crtend.o /d2/arch/i386/build/usr/lib/crtn.o
/d2/arch/i386/build/usr/lib/libedit.a(editline.o): In function `el_gets':
editline.o(.text+0x779a): undefined reference to `tgoto'
editline.o(.text+0x77ae): undefined reference to `tputs'
editline.o(.text+0x7853): undefined reference to `tputs'
editline.o(.text+0x796b): undefined reference to `tgoto'
editline.o(.text+0x797f): undefined reference to `tputs'
editline.o(.text+0x7a1e): undefined reference to `tgoto'
editline.o(.text+0x7a3a): undefined reference to `tgoto'
editline.o(.text+0x7b66): undefined reference to `tgoto'
editline.o(.text+0x7b7a): undefined reference to `tputs'
editline.o(.text+0x7bca): undefined reference to `tputs'
editline.o(.text+0x7c1b): undefined reference to `tputs'
editline.o(.text+0x7c88): undefined reference to `tgoto'
editline.o(.text+0x7c9c): undefined reference to `tputs'
editline.o(.text+0x7d31): undefined reference to `tputs'
editline.o(.text+0x7d4e): undefined reference to `tputs'
editline.o(.text+0x7d6b): undefined reference to `tputs'
editline.o(.text+0x7dc7): undefined reference to `tputs'
/d2/arch/i386/build/usr/lib/libedit.a(editline.o)(.text+0x7e31): more undefined
references to `tputs' follow
/d2/arch/i386/build/usr/lib/libedit.a(editline.o): In function `el_gets':
editline.o(.text+0x91fe): undefined reference to `tgoto'
editline.o(.text+0x9212): undefined reference to `tputs'
editline.o(.text+0x9335): undefined reference to `tgoto'
editline.o(.text+0x7da7): undefined reference to `tputs'
collect2: ld returned 1 exit status

ERROR: Failed to make build
	-T /usr/src/tools/tools-i386
	-M /d2/arch/i386/obj
	-D /d2/arch/i386/build
	-R /d2/arch/i386/release
	-V BUILD='you bet'
	-m i386
	-V TEST_MK_CONF=1 build