X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Date: Mon, 30 Nov 2020 18:07:08 +0200 Message-Id: <83wny2kevn.fsf@gnu.org> From: "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" To: djgpp AT delorie DOT com In-Reply-To: (djgpp AT delorie DOT com) Subject: Re: GCC 10.2.0, collect2.exe error - cannot create temporary file References: <9d01fbcb-eae3-96c7-cc68-54c072dee20e AT iki DOT fi> <83zh31nbcx DOT fsf AT gnu DOT org> <834kl8mbua DOT fsf AT gnu DOT org> Reply-To: djgpp AT delorie DOT com > From: "Greg Kennedy (kennedy DOT greg AT gmail DOT com) [via djgpp AT delorie DOT com]" > Date: Mon, 30 Nov 2020 00:25:33 -0600 > > However, this did give me a way to try building with more or less .o > files on the command-line. As I did this I found that the pex-common > call was returning an FD that *increased* for every .o I added. For > example, here's where I put three .o files and the rest in a .a: > > collect2.c: make_temp_file(.ctc) > Called make_temp_file(.ctc), redirecting > Called make_temp_file_with_prefix(cc, .ctc): > 'c:/djgpp/tmp/ccXXXXXX.ctc'mkstemps(c:/djgpp/tmp/ccXXXXXX.ctc, 4): > trying open(c:/djgpp/tmp/cchFW50P.ctc, ...) > Got new file descriptor 5 > -> 'c:/djgpp/tmp/cchFW50P.ctc' > collect2.c: make_temp_file(.cto) > Called make_temp_file(.cto), redirecting > Called make_temp_file_with_prefix(cc, .cto): > 'c:/djgpp/tmp/ccXXXXXX.cto'mkstemps(c:/djgpp/tmp/ccXXXXXX.cto, 4): > trying open(c:/djgpp/tmp/ccoaJ1Rv.cto, ...) > Got new file descriptor 5 > -> 'c:/djgpp/tmp/ccoaJ1Rv.cto' > pex-common.c: make_temp_file(NULL) > Called make_temp_file((null)), redirecting > Called make_temp_file_with_prefix(cc, ): > 'c:/djgpp/tmp/ccXXXXXX'mkstemps(c:/djgpp/tmp/ccXXXXXX, 0): trying > open(c:/djgpp/tmp/ccYv0qDi, ...) > Got new file descriptor 9 > -> 'c:/djgpp/tmp/ccYv0qDi' > > (Meanwhile, just one .o file gave an FD of 7. All objects in a .a > never actually calls this function, I guess because it isn't > involved.) > > My assumption then is that I'm running out of free File Descriptors by > passing too many .o files at once. This seems like a bug, maybe? How many *.o files do you have in this case? You can have up to 255 files open at any given time, see the DJGPP FAQ for details.