From owner-freebsd-questions@FreeBSD.ORG Sat Jul 19 16:35:25 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 3D579106564A for ; Sat, 19 Jul 2008 16:35:25 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id F0C838FC22 for ; Sat, 19 Jul 2008 16:35:24 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (unknown [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 39A9CAFC214; Sat, 19 Jul 2008 08:35:24 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org, unga888@yahoo.com Date: Sat, 19 Jul 2008 18:35:22 +0200 User-Agent: KMail/1.9.7 References: <248478.13159.qm@web57011.mail.re3.yahoo.com> In-Reply-To: <248478.13159.qm@web57011.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807191835.22733.fbsd.questions@rachie.is-a-geek.net> Cc: Subject: Re: Why this linking fail? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2008 16:35:25 -0000 On Thursday 17 July 2008 07:37:43 Unga wrote: > --- 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 Usually, it's: mount -t devfs devfs /somepath/dev ^^ However, I don't know if that token distinction matters or that it's just a label. > 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. This can be a problem, if you jexec into the jail as no full environment is created, but it's usually just the /dev/tty that is the problem, not std{out| err|null}. Have you considered compiling on the host and using DESTDIR on installworld? -- Mel Problem with today's modular software: they start with the modules and never get to the software part.