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
Any ideas on this? I get the same error with 9.3.0. I believe it
could be related to trying to use -flto?
On Sat, Oct 31, 2020 at 1:39 AM Greg Kennedy <kennedy.greg@gmail.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
On 11/21/20 5:39 AM, Greg Kennedy (kennedy.greg@gmail.com) [via djgpp@delorie.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@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@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.greg@gmail.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
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.pavenis@iki.fi)
[via djgpp@delorie.com] <djgpp@delorie.com> wrote:
On 11/21/20 5:39 AM, Greg Kennedy (kennedy.greg@gmail.com) [via djgpp@delorie.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@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@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.greg@gmail.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
From: "Greg Kennedy (kennedy.greg@gmail.com) [via djgpp@delorie.com]" <djgpp@delorie.com>
Date: Fri, 27 Nov 2020 22:11:21 -0600
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?
'c:/djgpp/tmp/ccFoBQz9.ctc'
'c:/djgpp/tmp/ccaD2wZ8.cto'
''Cannot create temporary file in c:/djgpp/tmp/: Permission denied (EACCES) Abort!
From: "Greg Kennedy (kennedy.greg@gmail.com) [via djgpp@delorie.com]" <djgpp@delorie.com>
Date: Fri, 27 Nov 2020 22:11:21 -0600
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!
Given this trace, I think the problem is in libiberty's mkstemps,
which is called with 'c:/djgpp/tmp/ccXXXXXX' and fails due to EACCES.
Can you trace inside that as well?
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?
No, that's not so. It's collect2.exe that calls pex-common functions
as part of its code. And process permissions on MS-DOS have no
meaning anyway.
From: "Greg Kennedy (kennedy.greg@gmail.com) [via djgpp@delorie.com]" <djgpp@delorie.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.
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).
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)
'c:/djgpp/tmp/cchFW50P.ctc'collect2.c: make_temp_file(.cto)
'c:/djgpp/tmp/ccoaJ1Rv.cto'pex-common.c: make_temp_file(NULL)
From: "Greg Kennedy (kennedy.greg@gmail.com) [via djgpp@delorie.com]" <djgpp@delorie.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?
From: "Greg Kennedy (kennedy.greg@gmail.com) [via djgpp@delorie.com]" <djgpp@delorie.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.
From: "Greg Kennedy (kennedy.greg@gmail.com) [via djgpp@delorie.com]" <djgpp@delorie.com>
Date: Fri, 11 Dec 2020 22:35:46 -0600
More than that, unfortunately. (It's a MAME compile, each cpu or
machine is essentially in its own .o)
I also have a few static libs I'd like compiled in. Since this
apparently requires the lto-plugin for visibility, it looks like I
should just abandon this attempt to use lto. Oh well.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 251 |
Nodes: | 16 (0 / 16) |
Uptime: | 29:43:09 |
Calls: | 5,571 |
Calls today: | 1 |
Files: | 11,684 |
Messages: | 5,128,298 |