cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/2020/11/22/04:16:22

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Subject: Re: GCC 10.2.0, collect2.exe error - cannot create temporary file
To: djgpp AT delorie DOT com
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>
From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
Message-ID: <9d01fbcb-eae3-96c7-cc68-54c072dee20e@iki.fi>
Date: Sun, 22 Nov 2020 11:12:07 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.4.3
MIME-Version: 1.0
In-Reply-To: <CAN1+P_3Tj1yFHQ1ksFxWK-z1uuF+WtDoZ62rPy+wLp4bzUCU_A@mail.gmail.com>
X-MIME-Autoconverted: from Quoted-Printable to 8bit by delorie.com id 0AM9Ct3j007281
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

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