cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/2020/11/27/23:15:40

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=KutbP5tolyJ+RfR2G99yFWenwxQWghD7Mh+jM7Lg0Zo=;
b=IB3amQVFkPsp0liUsNlv6KpVsZFpVaSaY0gI5qu+MHJ7GjBk0U+dx1SzgUgiLKnIes
m2p9tis1OU0ecPW8a2kJiy1+SStXtCHAYII7hl7bS9tnJ9c1Cinx6MH9oFvnhv4rz0DZ
TwKS1Hm1ciIses/dwLpShPn6Uz7eVtlYmGIgPMb7GWaXZhARtt/XmSkGEy581gIkEcjQ
b84ltiITdYt8tcaDkES3YVOYGii2KNH5vW6JcCgjMv8nriAWzD2r8jNp/+dnoLQveet+
m0FonRLexb7gUxSVm3iU6aRRuhqUn03H62gQwj71uRpOte7M9JcV9V7KTAWTp+iKNR6L
TEDg==
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=KutbP5tolyJ+RfR2G99yFWenwxQWghD7Mh+jM7Lg0Zo=;
b=d4eolrpTXMt1DK6GBbAsIzqaK28cL3K9ocb5y9vDY2F1w5lDGdNeGB1iwmgM4jD9Ub
dYLzuY1qYLpfoLAjwmZDZx+jljjAddvSD58BsoI5WsaQDFzOYAldCnV+8p9HcE1G2Pyt
5qAJNCSBpVvGQE++VNyhWW+DAHho5auW2e+yfFBmGCeNLI3bhsMJetIKN5SsqB+iHTMH
rErS1abE3b7YBUBrl2Yjps7MLs5KyS2L+9hz2nHLk/tLk6pcvELh+YZZMXWhr+yygw5C
DcweeCr03p3k/PBcYxDfjwP6yRbnfMSBNEeD4XBBN5eRcXI8hQwYfZ2t4Mqr3b5nwCFL
BI2g==
X-Gm-Message-State: AOAM530AqoWcHpyho1a+iZQqETlOnUToBmjM0TVCIS5a2vtgsIGdv8hu
p23oJrV4Y/B4KLNnF/F2m/Yys/9o3r0D0OBv2whUAQSSd6Prqg==
X-Google-Smtp-Source: ABdhPJxtvwbEGTOMNbWqHj8pFTMDFe33vCb7pAFgelQiOtFX7HIv3D7ocd6u62hvD4eoBesFy1QSZjcz68xqVhM3UA8=
X-Received: by 2002:a50:cd08:: with SMTP id z8mr6297302edi.256.1606536693291;
Fri, 27 Nov 2020 20:11:33 -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>
In-Reply-To: <CAN1+P_0V5Y7Bn_K1AWpybNHqiEOpH1i5qc+Ca965nY9AAS+tvg@mail.gmail.com>
From: "Greg Kennedy (kennedy DOT greg AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
Date: Fri, 27 Nov 2020 22:11:21 -0600
Message-ID: <CAN1+P_0MxAHta=HQ06dh5=CFpNS=STDQYtPfGSume6mokpLDuQ@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 have added some debug print.  The problem is in pex-common.c, line
109, which creates a temp file using make_temp_file(null);

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'-> 'c:/djgpp/tmp/ccehuQ7Q.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'-> 'c:/djgpp/tmp/ccioOw5x.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'-> ''
Cannot create temporary file in c:/djgpp/tmp/: Permission denied (EACCES)
Abort!

I *think* the problem is that pex-common functions are being run "as a
subprocess", which may not have the same permissions as the original
launch process?  but I am not sure about this.  I will look at Windows
XP folder permissions and see if I can figure out more details.

On Wed, Nov 25, 2020 at 9:32 AM Greg Kennedy <kennedy DOT greg AT gmail DOT com> wrote:
>
> Thanks for the tip - Compilation works fine without -flto, but it
> fails with it enabled.  I have LFN=Y and am building under Windows XP,
> so it's definitely supported.
>
> Since I have a reliable test case I will try building a new
> collect2.exe with some debug print and report back :)
>
> On Sun, Nov 22, 2020 at 3:19 AM Andris Pavenis (andris DOT pavenis AT iki DOT fi)
> [via djgpp AT delorie DOT com] <djgpp AT delorie DOT com> wrote:
> >
> > On 11/21/20 5:39 AM, Greg Kennedy (kennedy DOT greg AT gmail DOT com) [via djgpp AT delorie DOT com] wrote:
> > > Any ideas on this? I get the same error with 9.3.0.  I believe it
> > > could be related to trying to use -flto?
> >
> > Checked sources: -flto will not work without long file name support. Without LTO gcc recent
> > versions for DJGPP should work:
> >
> > [andris AT ap gcc]$ git checkout djgpp/native/gcc-10.2.0
> > HEAD is now at 0de6b027530 Merge branch 'djgpp/gcc-10' into djgpp/native/gcc-10
> > [andris AT ap gcc]$ grep make_temp_file gcc/*.c
> > gcc/collect2.c:      c_file = make_temp_file (CDTOR_C_NAME);
> > gcc/collect2.c:      o_file = make_temp_file (CDTOR_O_NAME);
> > gcc/collect2.c:      export_file = make_temp_file (".x");
> > gcc/collect-utils.c:      response_file = make_temp_file ("");
> > gcc/gcc.c:  char *temp_file = make_temp_file ("");
> > gcc/gcc.c:                  temp_filename = make_temp_file (t->suffix);
> > gcc/gcc.c:      temp_stdout_files[attempt] = make_temp_file (".out");
> > gcc/gcc.c:      temp_stderr_files[attempt] = make_temp_file (".err");
> > gcc/lto-wrapper.c:  filename = make_temp_file (".target.o");
> > gcc/lto-wrapper.c:      char *crtoffloadtable = make_temp_file (".crtoffloadtable.o");
> > gcc/lto-wrapper.c:    outfile = make_temp_file (".debug.temp.o");
> > gcc/lto-wrapper.c:      flto_out = make_temp_file (".lto.o");
> > gcc/lto-wrapper.c:        ltrans_output_file = make_temp_file_with_prefix (prefix,
> > gcc/lto-wrapper.c:        makefile = make_temp_file (".mk");
> > gcc/selftest.c:  m_filename = make_temp_file (suffix);
> >
> > 1) CDTOR_C_NAME and CDTOR_O_NAME should be compatible with SFN (defined inside #ifdef __DJGPP__ ....)
> >
> > 2) gcc/lto-wrapper.c: generated temporary file name are unusable without LFN and expected error
> > message is as seen below.
> >
> > So try without -flto.
> >
> >
> > Andris
> >
> >
> > PS. one can see sources on GitHub (no need to download source archive gcc1020s.zip):
> >
> > - collect2.c: should be OK without LFN support:
> > https://github.com/apavenis/djgpp-gcc/blob/djgpp/native/gcc-10.2.0/gcc/collect2.c
> >
> > - lto-wrapper.c: will not work without LFN:
> > https://github.com/apavenis/djgpp-gcc/blob/djgpp/native/gcc-10.2.0/gcc/lto-wrapper.c
> >
> > - implementation of make_temp_file():
> > https://github.com/apavenis/djgpp-gcc/blob/djgpp/native/gcc-10/libiberty/make-temp-file.c
> >
> >
> > > On Sat, Oct 31, 2020 at 1:39 AM Greg Kennedy <kennedy DOT greg AT gmail DOT com> wrote:
> > >> Receiving this error when trying to compile AdvanceMAME using DJGPP.
> > >> I have the latest version of all packages (based on the Mini-FAQ).
> > >> This is a 32-bit Windows XP VM in VirtualBox.
> > >>
> > >> I have seen that there is a problem with LFN ?  but I assumed that
> > >> only applied to 16-bit systems, while NTVDM supports LFN already.  So
> > >> I don't know why this would be happening.
> > >>
> > >> Cannot create temporary file in c:/djgpp/tmp/: Permission denied (EACCES)
> > >> Abort!
> > >> Exiting due to signal SIGABRT
> > >> Raised at eip=0013e551
> > >> eax=0039d8c4 ebx=00000120 ecx=00000000 edx=00000000 esi=0013e3ca edi=003acec8
> > >> ebp=0039d9e8 esp=0039d8b0 program=c:\djgpp\libexec\gcc\djgpp\10\collect2.exe
> > >> cs: sel=0257  base=031d0000  limit=003bffff
> > >> ds: sel=025f  base=031d0000  limit=003bffff
> > >> es: sel=025f  base=031d0000  limit=003bffff
> > >> fs: sel=022f  base=0000ff40  limit=0000ffff
> > >> gs: sel=026f  base=00000000  limit=0010ffff
> > >> ss: sel=025f  base=031d0000  limit=003bffff
> > >> App stack: [0039dc58..0019dc5c]  Exceptn stack: [0019dba8..0019bc68]
> > >>
> > >> Call frame traceback EIPs:
> > >>    0x00167a04
> > >>    0x0013e551
> > >>    0x0013eb12
> > >>    0x0013ef45
> > >>    0x0013f279
> > >>    0x0000557a
> > >>    0x00003952
> > >>    0x0017a8e7
> >
> >
> >

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019