From owner-freebsd-amd64@FreeBSD.ORG Thu Jun 30 10:14:08 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B0BF16A41C for ; Thu, 30 Jun 2005 10:14:08 +0000 (GMT) (envelope-from groot@kde.org) Received: from pandora.cs.kun.nl (pandora.cs.kun.nl [131.174.33.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C94A443D53 for ; Thu, 30 Jun 2005 10:14:07 +0000 (GMT) (envelope-from groot@kde.org) Received: from odin.cs.kun.nl [131.174.33.33] (helo=localhost.englishbreakfastnetwork.org) by pandora.cs.kun.nl (8.12.10/5.2) with ESMTP id j5UADwtn013067 for ; Thu, 30 Jun 2005 12:14:03 +0200 (MEST) From: Adriaan de Groot To: freebsd-amd64@freebsd.org Date: Thu, 30 Jun 2005 12:13:58 +0200 User-Agent: KMail/1.8.50 References: <42BC8310.9040501@cse.unl.edu> <20050626042355.GA41119@misty.eyesbeyond.com> <20050629221047.GC20836@dragon.NUXI.org> In-Reply-To: <20050629221047.GC20836@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506301213.58569.groot@kde.org> X-Spam-Score: -0.464 () BAYES_20,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.48 on 131.174.33.4 Subject: Re: sript (Perl) test code needed (was: How to build JDK15 on AMD64 with FreeBSD?) X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2005 10:14:08 -0000 On Thursday 30 June 2005 00:10, David O'Brien wrote: > On Sat, Jun 25, 2005 at 10:23:56PM -0600, Greg Lewis wrote: > > and follow the instructions. There is one caveat on amd64 -- one of the > > build commands will fail strangely (this is a bug in the Linux emulation > > on amd64 as far as I can determine). > > I know this should be trivial to do in perl and maybe someone here has the > time to hack it up. I want a small test script (actually some other > scripting language than perl preferred). > The script should run the following commands until an error is returned: > and when the error occurs print out the length of the command line. > I want to get the bottom of the "command too long" issue that causes too > much trouble deploying Java on FreeBSD/AMD64. Well, in the setup you posit here, you run into the maximum file-name length of 1024 well before you run into the length of the maximum command-line (kern.argmax). The following quick test tests the maximum command-line (it's a lot like the autoconf test for maximum command-line length); #! /usr/bin/env perl @what = ( "././././././././" ); while ( 0 == system( "ls",@what) ) { push(@what , @what); print STDERR "Length " . (@what + 0) . "\n"; } It stops after printing Length 4096, so 2+4096*16 bytes of command-line is too much (and indeed, my kern.argmax is 65536) (hm, does a NUL terminating byte count towards argmax?). Doing something more subtle finishes at Length 3776 (* 16 bytes, possibly 17 -- in any case less that 65536). -- These are your friends - Adem GPG: FEA2 A3FE Adriaan de Groot