From owner-freebsd-bugs Thu Apr 20 3:19: 4 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from happy.checkpoint.com (happy.checkpoint.com [199.203.156.41]) by hub.freebsd.org (Postfix) with ESMTP id A6AA837B5A1 for ; Thu, 20 Apr 2000 03:18:58 -0700 (PDT) (envelope-from mellon@pobox.com) Received: (from mellon@localhost) by happy.checkpoint.com (8.9.3/8.9.3) id NAA02946; Thu, 20 Apr 2000 13:18:40 GMT (envelope-from mellon@pobox.com) Date: Thu, 20 Apr 2000 13:18:40 +0000 From: Anatoly Vorobey To: Martin Cracauer Cc: bugs@freebsd.org Subject: Re: bin/18104: missing include file in sh(1) Message-ID: <20000420131840.A1964@happy.checkpoint.com> References: <200004200400.VAA88954@freefall.freebsd.org> <20000420120542.B14071@cons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000420120542.B14071@cons.org>; from cracauer@cons.org on Thu, Apr 20, 2000 at 12:05:42PM +0200 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, Apr 20, 2000 at 12:05:42PM +0200, Martin Cracauer wrote: > > I've goofed here, in fact; sh(1) still won't build with DEBUG since -- > > get that! -- the function trace() defined in show.c conflicts with > > trace() in lib_trace.o of libtermcap.a of ncurses fame. > > > > I've renamed the sh function, and retested everything. When build with > > DEBUG_FLAGS=-DDEBUG=2 , it'll create a file 'trace' in the current > > directory and will write tons of good info there. Would someone please > > review/commit? > > For me, it builds and writes to ./trace even without renaming > trace(). > > It appears that the ncurses trace() hijacks your sh-internal trace > where it should not and does not for me. Yes, this is apparently what happens, but I have no idea why. > I'm also not sure why you > refer to DEBUG_FLAGS, maybe you use a non-standard build structure? Presumably you build debug by uncommenting the corresponding line in the Makefile, while I ``export DEBUG_FLAGS="-DDEBUG=2 -g" '' and just make afterwards; does the rest. > What does > nm -A *.o | grep trace > show in your build directory? cd.o: U trace error.o: U trace eval.o: U trace exec.o: U trace expand.o: U trace jobs.o: U trace main.o: U opentrace main.o: U trace parser.o: U trace show.o:00000b34 T opentrace show.o:000007d0 T trace show.o:00000004 C tracefile trap.o: U trace Here's also the make error: cc -O -pipe -DSHELL -I. -I/usr/src/bin/sh -g -DDEBUG=2 -Wall -Wformat -static -o sh alias.o arith.o arith_lex.o cd.o echo.o error.o eval.o exec.o expand.o histedit.o input.o jobs.o mail.o main.o memalloc.o miscbltin.o mystring.o options.o output.o parser.o printf.o redir.o show.o trap.o var.o builtins.o init.o nodes.o syntax.o -ll -ledit -ltermcap /usr/lib/libtermcap.a(lib_trace.o): In function `trace': lib_trace.o(.text+0x0): multiple definition of `trace' show.o:/usr/src/bin/sh/show.c:310: first defined here /usr/libexec/elf/ld: Warning: size of symbol `trace' changed from 75 to 5 in lib_trace.o *** Error code 1 Stop in /usr/src/bin/sh. My environment is completely normal CURRENT tree cvsupped and updated daily. -- Anatoly Vorobey, mellon@pobox.com http://pobox.com/~mellon/ "Angels can fly because they take themselves lightly" - G.K.Chesterton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message