From owner-freebsd-stable@FreeBSD.ORG Tue Aug 12 07:28:46 2008 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4289106567F for ; Tue, 12 Aug 2008 07:28:46 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57013.mail.re3.yahoo.com (web57013.mail.re3.yahoo.com [66.196.97.117]) by mx1.freebsd.org (Postfix) with SMTP id 9A1788FC29 for ; Tue, 12 Aug 2008 07:28:46 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 81135 invoked by uid 60001); 12 Aug 2008 07:28:46 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=cc6AhF9pWW7mEB49qGNdj1r21MQV3LH/z/ZJqXefvYq72gy1aKa2HUsTqBrjuy0eRsM4X74RArlLYhNqYsIdgK2rpvgtzu/XGD8YraXCjcetX+DrO7RDAUbmX9V4JJXQEiL6lCZn96knbHXU+aIrehWICoLtBeZEqdeBD3apj1c=; Received: from [220.255.7.207] by web57013.mail.re3.yahoo.com via HTTP; Tue, 12 Aug 2008 00:28:46 PDT X-Mailer: YahooMailWebService/0.7.218 Date: Tue, 12 Aug 2008 00:28:46 -0700 (PDT) From: Unga To: freebsd-stable@FreeBSD.ORG In-Reply-To: <200808081336.m78DaIoV018488@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <76940.80951.qm@web57013.mail.re3.yahoo.com> Cc: olli@lurza.secnetix.de Subject: Re: sysinstall compilation issue X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: unga888@yahoo.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 07:28:46 -0000 --- On Fri, 8/8/08, Oliver Fromme wrote: > From: Oliver Fromme > Subject: Re: sysinstall compilation issue > To: freebsd-stable@FreeBSD.ORG, unga888@yahoo.com > Date: Friday, August 8, 2008, 9:36 PM > Unga wrote: > > This is i386 RELENG_7. > > > > Following section of the > /usr/src/usr.sbin/sysinstall/Makefile does not generate C > code properly: > > > > makedevs.c: Makefile rtermcap > > echo '#include ' > > makedevs.c > > ${RTERMCAP} ansi | \ > > file2c 'const char termcap_ansi[] > = {' ',0};' \ > > > > makedevs.c > > > > At compile time, above expands to: > > > TERMCAP=/usr/src/usr.sbin/sysinstall/../../share/termcap/termcap.src > ./rtermcap ansi | file2c 'const char termcap_ansi[] = > {' ',0};' >> makedevs.c > > > > Which generates C code as follows: > > const char termcap_ansi[] = { > > > > ,0}; > > > > That is, it generates 3 lines, which results a > compilation error. > > > > I presume, intended generated code should be: > > const char termcap_ansi[] = {' ',0}; > > > > Am I right? > > No, it should generate an array containung a dump of > the "ansi" termcap entry. Please see the > file2c(1) > manpage. > > > What is wrong at my end? > > > > Note, I linked the rtermcap with ncursesw libraries, > can that be the cause? Any ideas? > > Yes, that's the cause. Why did you do that? > > FreeBSD's ncurses port contains a patch so the > tgetent() > function (which is used by rtermcap) returns the actual > termcap entry in the buffer. The original ncurses code > (which is terminfo based) doesn't do that. > > When you linked rtermcap with the wrong library, you > restored the original behaviour of tgetent(), so the > output of rtermcap was empty, so file2c produced invalid > source. > Sorry for my late reply on this. I was not well during weekend, an eye ache due to over work :( Here is the situation at my end, no matter whether I link with ncurses widec libs or non-widec libs, its still return the same code as above I mentioned. Possible causes can be: 1. The way I compile and install ncurses is not correct. 2. OR some essential files required are missing 3. OR there can be an other option I used truss as follows: TERMCAP=/usr/src/usr.sbin/sysinstall/../../share/termcap/termcap.src truss -o truss.log -f ./rtermcap ansi | file2c 'const char termcap_ansi[] = {' ',0};' >> makedevs.c The last few lines of truss.log shows: 9310: stat("/usr/share/misc/terminfo.db",{mode=-rw-r--r-- ,inode=22613331,size= 3170304,blksize=4096}) = 0 (0x0) 9310: open("/usr/share/misc/terminfo.db",O_RDONLY,0644) = 4 (0x4) 9310: fcntl(4,F_SETFD,FD_CLOEXEC) = 0 (0x0) 9310: read(4,"\0\^F\^Ua\0\0\0\^B\0\0\^D\M-R\0"...,260) = 260 (0x104) 9310: __sysctl(0xbfbfd574,0x2,0xbfbfd570,0xbfbfd57c,0x0,0x0) = 0 (0x0) 9310: lseek(4,0x132000,SEEK_SET) = 1253376 (0x132000) 9310: read(4,"\^^\0\M-|\^O\M-T\^O\M-K\^O\M-*"...,4096) = 4096 (0x1000) 9310: lseek(4,0x26b000,SEEK_SET) = 2535424 (0x26b000) 9310: read(4,"\n\0\M-Y\^O\^O\n\0\n\r\^D\^E\^D"...,4096) = 4096 (0x1000) 9310: close(4) = 0 (0x0) 9310: ioctl(2,TIOCGETA,0xbfbfdba4) = 0 (0x0) 9310: ioctl(2,TIOCGETA,0x81020d8) = 0 (0x0) 9310: ioctl(2,TIOCGETA,0xbfbfdb64) = 0 (0x0) 9310: ioctl(2,TIOCGWINSZ,0xbfbfdbc4) = 0 (0x0) 9310: fstat(1,{mode=p--------- ,inode=0,size=0,blksize=4096}) = 0 (0x0) 9310: process exit, rval = 0 Note, above log has no entry to open /usr/src/usr.sbin/sysinstall/../../share/termcap/termcap.src. So what can be the issue, ncurses has not been patched correctly or some essential files missing? If you guys think that ncurses has not been patched correctly, then I'll open another thread to discuss that. Best Regards Unga