Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-04

Dosemu problems compiling

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Coppens

Hello all,

After installing fpc 2.4.0 on a freedos directory, I had the following problems:

- I tried to install using the install program, but dosemu crashed when clicking on 'Continue'

- So I installed the base package manually, adjusted the path. Now fpc (without arguments) starts correctly, showing all the commandline options. Compiling a program (which compiled identically on Linux without errors), I get a load of errors about GOTO and LABEL not being defined. I recompiled with -Sg, and dosemu crashed again.

I tried increasing DPMI memory (from 20 MB to about 50 MB), no difference. The dosemu output is below.

Anyone had a similar experience?

(NOTE: I tried dosbox too. When I ran 'fpc', the screen output was garbled. Tried several options, but couldn't get that to work).

I'm trying to get a program compiled for use under DOS+extender (or win32). I looked up the possibility to cross-compile, but that doesn't seem possible under x86_64 (no 32bit targets)?

Help!
John

ERROR: Fault handler re-entered! signal=11 _trapno=0xE ERROR: cpu exception in dosemu code outside of DPMI client! trapno: 0x0e errorcode: 0x00000007 cr2: 0x00000000 eip: 0x004a2cc1 esp: 0x7fff16e2d270 eflags: 0x00010202 cs: 0x0033 ds: 0x013f es: 0x013f ss: 0x002b
ERROR: Please report the contents of ~/.dosemu/boot.log at http://sourceforge.net/tracker/?atid=457447&group_id=49784&func=browse It would be even more helpful if would recompile DOSEMU and reproduce this bug with "debug on" in compiletime-settings.
Page fault: write instruction to linear address: 0x00000000 CPU was in user mode
Exception was caused by insufficient privilege

Jonas Maebe
to John Coppens
John Coppens wrote
Anyone had a similar experience?

As the DosEMU output says: "ERROR: Please report the contents of ~/.dosemu/boot.log at http://sourceforge.net/tracker/?atid=457447&group_id=49784&func=browse"

This is a bug in DosEMU.

(NOTE: I tried dosbox too. When I ran 'fpc', the screen output was garbled. Tried several options, but couldn't get that to work).

And that's a bug in DosBox (furthermore DosBox is not supported for running arbitrary DOS programs, only for playing games -- although I guess you could write a DOS game in FPC and use that as case, since it'll probably have the same problems).

I'm trying to get a program compiled for use under DOS+extender (or win32). I looked up the possibility to cross-compile, but that doesn't seem possible under x86_64 (no 32bit targets)?

You have to build an x86_64 -> i386 cross-compiler first (or use a native i386 compiler, since all x86_64 platforms I know of can also run i386 binaries). You will also need cross-binutils targeting DJGPP 2.x to be able to link.

Jonas

Tomas Hajny
to Jonas Maebe
Jonas Maebe wrote 17 lines
On 05 Apr 2010, at 21:21, John Coppens wrote: > Anyone had a similar experience? As the DosEMU output says: "ERROR: Please report the contents of ~/.dosemu/boot.log at http://sourceforge.net/tracker/?atid=457447&group_id=49784&func=browse" This is a bug in DosEMU. > (NOTE: I tried dosbox too. When I ran 'fpc', the screen output was > garbled. Tried several options, but couldn't get that to work). And that's a bug in DosBox (furthermore DosBox is not supported for running arbitrary DOS programs, only for playing games -- although I guess you could write a DOS game in FPC and use that as case, since it'll probably have the same problems).

.
.

...especially if it was a text-mode game (I guess the trouble with FPC output comes from buggy console support which is probably not that well debugged in DosBox because that's usually not very important for games). I may be completely wrong though. ;-)

Show quoted text 8 lines
> I'm trying to get a program compiled for use under DOS+extender (or > win32). I looked up the possibility to cross-compile, but that doesn't > seem possible under x86_64 (no 32bit targets)? You have to build an x86_64 -> i386 cross-compiler first (or use a native i386 compiler, since all x86_64 platforms I know of can also run i386 binaries). You will also need cross-binutils targeting DJGPP 2.x to be able to link.

...or you can compile with -st and (assemble and) link under DosEmu / DosBox if the DJGPP binutils work correctly with either of them... Not necessarily very elegant, but a possible solution if you cannot find or compile the cross-binutils.

Tomas

John Coppens
to Jonas Maebe: As the DosEMU output says: "ERROR: Please report the contents of ~/.dosemu/boot.log at…
Show quoted text 7 lines
> Anyone had a similar experience? As the DosEMU output says: "ERROR: Please report the contents of ~/.dosemu/boot.log at http://sourceforge.net/tracker/?atid=457447&group_id=49784&func=browse" This is a bug in DosEMU.

I've reported the bug on the DosEmu mailing list and on the Sourceforge bug tracker - but I have the impression that the last 4 years little or no attention has been dedicated to either of them. I've also reported the (other) bug on the DosBox forum.

I just copied the fpc source files to my (32bit-) notebook, where I have dosemu installed, which I have used before to compile them under DOS. I also installed FPC 2.4.0 there. Same problem as the one reported above.

I have the impression that this problem appeared in the upgrade from FPC 2.2.x to 2.4.x. I just noticed, because 2.2.x didn't accept a writeln of an enumerated scalar, which 2.4.x does, apparently. But 2.2.x did start compiling.

Any recent changes in the fpc executable that could cause the DosEmu problem?

John