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=nrrmNsmBBhfOOZtGGKzOOyJRLBKtODHCIkXN1zvUIpg=; b=SjOr7o3Xg+tWf3QX8QPXnaDA475m9GHcP3oy9KHNLmywzUx2Iw5hAGEGm55yRhrlXI aQwwGNZ3pcsSGeAZIBponobt22d+2DwaGkdEc9rHFNKkura8jHv2b9qPJcskXRALhSOh DYqPVw0M0n9pPQqr61dCgZznwjFPlOFZeQV1CAzIiklW+r7rC3AeZEeGStzI+AOz8a33 D+zkNAdqfb8X3G7nL7t8Hl3PRxKr3TNvpyW7fF89FCqfqLtpgU4hjInYW3KkE5prgQSi bxZzkWz5NE6j9uLYLzN1tKg0cNPT2TsK9RA6EJcSKdAWzxEfSQTPCd15exRa3rqkZ3GW rn6A== 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=nrrmNsmBBhfOOZtGGKzOOyJRLBKtODHCIkXN1zvUIpg=; b=QfqVJRzt5qKVfnOpYmxqYvrmD7SZMpZZXb0IeMDNpPsS1md2euqgeeYRYDD4BA6k5M JGm4od3A3lKYfWK3Qqupfl26QdpNtwwwVZaNjuaTpVmoR3Nkqro5G1Go6rL95tFh2M3j ABut+3cjJTmyFzH0fj4n0Jk3m4AUG3pcJk4S+6TBXDC7cZtIUcaGmNWXUu+cJpITu4/Q GF4yoajd9NS1ewu5lZgM6AnscwQahlqEPFxBH3QzKGxX3omWfEP8WCbY75GpJJGkIpi1 KrkH1lrEMPGxbaTTI+O4fV1XalVpvU5PO3ejkBphJh/SJTMATUca5eLoheybchW/3Z5S rLbQ== X-Gm-Message-State: AOAM530Gw/e48vjRmJBuBV3k7CXO4C/sAaELvJABG8SblgENIOXZ5xoB 113JPIKCUhtQIuHH3AcSoFN775Y58L6RuLOPpE41fk+y2jA= X-Google-Smtp-Source: ABdhPJwQ9y4rC2g0B+PWUg44VFT1sfQ5FH7cJ/AjDaLTlQXNwQwuVft3g9xzruU8sPbxBnn2If5nYLxie+bhT83pMDc= X-Received: by 2002:a50:cd0a:: with SMTP id z10mr3971187edi.223.1606318383132; Wed, 25 Nov 2020 07:33:03 -0800 (PST) MIME-Version: 1.0 References: <9d01fbcb-eae3-96c7-cc68-54c072dee20e AT iki DOT fi> In-Reply-To: <9d01fbcb-eae3-96c7-cc68-54c072dee20e@iki.fi> From: "Greg Kennedy (kennedy DOT greg AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Wed, 25 Nov 2020 09:32:50 -0600 Message-ID: Subject: Re: GCC 10.2.0, collect2.exe error - cannot create temporary file To: djgpp AT delorie DOT com Content-Type: text/plain; charset="UTF-8" Reply-To: djgpp AT delorie DOT com 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] 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 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 > > >