Mail Archives: djgpp/2020/11/30/01:29:32
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
X-Recipient: | djgpp AT delorie DOT com
|
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed;
|
| d=gmail.com; s=20161025;
|
| h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
|
| bh=q/ku/gRE2eBln+hsX6dDjJuvHaGysS+ioRW9wEU61gU=;
|
| b=NK1MpDKqRasn8tOe/DVPhalMTdah20/gWc6XzBF9AS7vLOeJX/PMGPPzatDpkn34W9
|
| 6YApevF/vbcfqfF5kxrOwyR24VsRRJRNDt8FLo9SWfxixlPLe453TYPgozglJmwr24kY
|
| LZb1Nj2Rg9wE6UL9eS/2HHebO2RVKirsURsg6PfTd4xDC9u5I+oi20MbtYD0sBcrfZfM
|
| QAPOn1nPbfVoor83usrZVXDWAHA6iZZpeNBQ1kcx47uLANRQzw8p+XlNx6zW5JnKEcLX
|
| BCCfzluVWgeSp86UrwQPChj8dpylz+Yky6bp2cvxGfnB9SohyoP0JS8WlE86WkntNg6w
|
| +p4g==
|
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed;
|
| d=1e100.net; s=20161025;
|
| h=x-gm-message-state:mime-version:references:in-reply-to:from:date
|
| :message-id:subject:to;
|
| bh=q/ku/gRE2eBln+hsX6dDjJuvHaGysS+ioRW9wEU61gU=;
|
| b=F77mhBFeUDx6+9HRYwIfuJ20NRD5XMD/Jt8woqFkF2zsaLbOiNbZ0Fbx4vv5OP7cN5
|
| GJfKh59+JPL3dB9Ck4YgbHNErDIyZfN4B2PzSOmMEgqgBeh0T9Z0uQ8HA5SlGMusRAq8
|
| mqsySiJhe6RRC9Wle1t19OIp49rDfp9sA6c97udyahWfjpI799+InQ4epzu6Yaa+U606
|
| WG6oPI0DuOZmWsIIn5viQ5IRnylfRNfHqrgS1A7llGrJVr5q0z50ws7TX02kcfuEweXo
|
| 3AXJEcR4aOzVWyiWVaytgjkdr01GWd5HXSzTVTM4ZDY3oBBEs50SL71YhtWJGFwfRWsO
|
| L5vg==
|
X-Gm-Message-State: | AOAM531t2hc3dwbEHPVrEyOfweVoT2/e3geqqnObi4kKVmq/IHHEEt/m
|
| 4JfKeTUfibnVPTAQZe8X9bi/HuEOmILlIngh47+SJRg3C7tIbw==
|
X-Google-Smtp-Source: | ABdhPJzmygQ2IO8ASE9ViYAoq7Y8Co95PljHBYHhtTghsccPx6fvgE7gcPuQGVnEOqJRmJ9DUud8lRSnSHywsEpp1uI=
|
X-Received: | by 2002:a50:cd0a:: with SMTP id z10mr20038952edi.223.1606717544543;
|
| Sun, 29 Nov 2020 22:25:44 -0800 (PST)
|
MIME-Version: | 1.0
|
References: | <CAN1+P_3UpFdU_V5bhaF+bT=9YG=qxjyVf7cgiM8etZL9EuKSGw AT mail DOT gmail DOT com>
|
| <CAN1+P_3Tj1yFHQ1ksFxWK-z1uuF+WtDoZ62rPy+wLp4bzUCU_A AT mail DOT gmail DOT com>
|
| <9d01fbcb-eae3-96c7-cc68-54c072dee20e AT iki DOT fi> <CAN1+P_0V5Y7Bn_K1AWpybNHqiEOpH1i5qc+Ca965nY9AAS+tvg AT mail DOT gmail DOT com>
|
| <CAN1+P_0MxAHta=HQ06dh5=CFpNS=STDQYtPfGSume6mokpLDuQ AT mail DOT gmail DOT com>
|
| <83zh31nbcx DOT fsf AT gnu DOT org> <CAN1+P_1tsGCRndvZfSMFOcPEvCHvcunpCiffNrNDryQwwbEFpw AT mail DOT gmail DOT com>
|
| <834kl8mbua DOT fsf AT gnu DOT org>
|
In-Reply-To: | <834kl8mbua.fsf@gnu.org>
|
From: | "Greg Kennedy (kennedy DOT greg AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
|
Date: | Mon, 30 Nov 2020 00:25:33 -0600
|
Message-ID: | <CAN1+P_1E4J8VveQkaeTt2mCsmpD1cBc+woeeKG7+CTM90B8uQA@mail.gmail.com>
|
Subject: | Re: GCC 10.2.0, collect2.exe error - cannot create temporary file
|
To: | djgpp AT delorie DOT com
|
Reply-To: | djgpp AT delorie DOT com
|
I had the idea that I could put all my .o files into a single .a
archive and attempt to build that way. Unfortunately, -flto with
archives requires the lto-plugin to be enabled, so nothing actually
built. I looked at the gcc-10.20 configure script and found that
DJGPP does not build the lto plugin.
# Among non-ELF, only Windows platforms support the lto-plugin so far.
# Build it unless LTO was explicitly disabled.
case $target in
*-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;;
*) ;;
esac
Bummer.
---
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? It
might be possible to open each .o in turn, read the contents, and then
close it, so the FDs don't run out. Or they're not being closed until
later. I will keep looking...
On Sun, Nov 29, 2020 at 9:23 AM Eli Zaretskii (eliz AT gnu DOT org) [via
djgpp AT delorie DOT com] <djgpp AT delorie DOT com> wrote:
>
> > From: "Greg Kennedy (kennedy DOT greg AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
> > Date: Sat, 28 Nov 2020 18:41:35 -0600
> >
> > Tried again with that. mkstemps calls open() from fcntl, which is
> > apparently returning EACCES. So the problem is coming from djgpp's
> > libc somewhere.
>
> Yes, it sounds like that.
>
> > While adding this it occurred to me that there are a *lot* of .o files
> > being linked at once here, plus a couple .a with stuff inside. I
> > don't know what all happens in the intervening time between the
> > collect2 and the pex-common calls but it's possible there is a
> > resource limit being hit in the meantime (open file descriptors, stack
> > space, memory allocation, whatever).
>
> It could be. You can try enlarging the stack of collect2.exe, to
> eliminate that. Given the small numbers of file descriptor (5), it
> seems unlikely that this should be the problem, but who knows...
>
> > 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/ccF27J2I, ...)
> > encountered fatal error during open: : Permission denied (EACCES)
> > Zeroing pattern and returning -1
> > -> ''
> > Cannot create temporary file in c:/djgpp/tmp/: Permission denied (EACCES)
>
> I guess the next question is: with what DOS error code does 'open'
> fail and why?
- Raw text -