From owner-freebsd-questions@FreeBSD.ORG Thu Jul 17 05:37:44 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 714611065681 for ; Thu, 17 Jul 2008 05:37:44 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57011.mail.re3.yahoo.com (web57011.mail.re3.yahoo.com [66.196.97.115]) by mx1.freebsd.org (Postfix) with SMTP id 059448FC0A for ; Thu, 17 Jul 2008 05:37:43 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 13218 invoked by uid 60001); 17 Jul 2008 05:37:43 -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:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=wv4zzUX/OpwzhmUnZ5IGUULwu5qMSe9nn57hV6/tC8AQo9KbUAnlfhxrjg5SAk3CA8MIJVtqrc+v47bblkY8tHzmb79gfdrOdhzUHsWkdw8QnHY65H9U9RZ7+evg7wliidrdWIwbwEvQL/mBSFf59ViNqnLhAWcTColH0Z2JBgs=; Received: from [165.21.155.75] by web57011.mail.re3.yahoo.com via HTTP; Wed, 16 Jul 2008 22:37:43 PDT X-Mailer: YahooMailWebService/0.7.218 Date: Wed, 16 Jul 2008 22:37:43 -0700 (PDT) From: Unga To: freebsd-questions@freebsd.org In-Reply-To: <171650.21223.qm@web57004.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <248478.13159.qm@web57011.mail.re3.yahoo.com> Subject: Re: Why this linking fail? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: unga888@yahoo.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 05:37:44 -0000 --- On Thu, 7/17/08, Unga wrote: > Sorry guys, I have found an issue. In the libc compile log > shows following error: > lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l > | sed -e '/YY_BUF_SIZE/s/16384/1024/' > >nslexer.c > lex: fatal internal error, exec failed > > Let me check why the lex failed. > Ok, I managed to narrow down the problem. I'm in a chroot jail. lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l >nslexer.c lex: could not create /dev/stdout ls -l /dev/stdout lrwxr-xr-x 1 root wheel 4 Jul 17 12:24 /dev/stdout -> fd/1 ls -l /dev/fd/ crw-rw-rw- 1 root wheel 0, 17 Jul 17 10:30 0 crw-rw-rw- 1 root wheel 0, 19 Jul 17 10:30 1 crw-rw-rw- 1 root wheel 0, 21 Jul 17 10:30 2 echo xxx > /dev/stdout xxx Note, writing /dev/stdout works, it prints back the xxx. Before I enter into chroot jail, this is how mount devfs: mount -v -o rw -t devfs dev /somepath/dev But this statement works well outside of jail: lex -P_nsyy -o/dev/stdout /usr/src/lib/libc/net/nslexer.l >nslexer.c Is my devfs mount correct? I did not do any devfs configuration. Does it require any devfs configuration on the new /somepath/dev mount? Appreciate very much your reply on this. Unga