X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Date: Fri, 27 Dec 2013 09:50:11 +0200 From: Eli Zaretskii Subject: Re: Too many open files In-reply-to: <8E878A70F6BE4A809C4650F42EA072D2@dev.null> X-012-Sender: halo1 AT inter DOT net DOT il To: djgpp AT delorie DOT com Message-id: <83site4tsc.fsf@gnu.org> References: <8E878A70F6BE4A809C4650F42EA072D2 AT dev DOT null> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Gisle Vanem" > Date: Thu, 26 Dec 2013 23:36:47 +0100 > > With the recent update of bintils 2.24, the ar program (dated Dec 9 2013) is > misbehaving. Comparing to what always has worked fine. In adding 137 > .o-files, it now stops at: > > e:\djgpp\bin/ar.exe: creating ../lib/libwatt.a > e:\djgpp\bin/ar.exe: djgpp/getnet.o: Too many open files (EMFILE) > > The command is as it has always been (in Watt-32): > ar rs ../lib/libwatt.a djgpp/file1.o djgpp/file2.o .. > > Incidently I have "files = 30" in my %windir\system32\config.nt under > Win-XP and the djgpp/getnet.o is the 22n'd file 'ar' is trying to add to > the ../lib/libwatt.a. > > Do I need to use a response-file now? How do I fix this? Juan, anyone? I'd first enlarge "files =" to 40, and see if that affects the number of files ar is able to process before it barfs. (The fact that it currently barfs on the 22nd file could be explained by inheriting some of the handles from the parent process.) I'm not familiar with 'ar's sources: does it need to keep files open, or can it close a file after it has copied it into the archive? Might as well look this up in the sources.