You are not logged in.

#1 2011-08-10 11:57:24

darut
Member
Registered: 2004-04-17
Posts: 69

dosemu

Does dosemu work after update to kernel 3.0?
Mine doesn't. I get memory violation error (I'm not sure how to translate this error from polish).

Offline

#2 2011-08-10 12:11:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: dosemu

Run

LC_ALL=C <command>

to get output in English.
If you enabled C locale, it should work.


BTW, have you tried using dosbox?

Last edited by karol (2011-08-10 12:14:14)

Offline

#3 2011-08-10 12:36:23

darut
Member
Registered: 2004-04-17
Posts: 69

Re: dosemu

Thanks Karol

When I try run dosemu I get "Segmentation fault" error.

Offline

#4 2011-08-10 12:45:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: dosemu

darut wrote:

Thanks Karol

When I try run dosemu I get "Segmentation fault" error.

That's what I thought.

I don't know what happened (yet), but in the meantime, please add 'linux 3.0' to the title.


Edit: Please post the exact command you're running, because I get

[karol@black ~]$ dosemu
LOWRAM mmap: Invalid argument
Segmentation fault

on kernel26 2.6.39.3-1. (so maybe it's not kernel-related after all).
Was it working for you while still on kernel26?

dosemu --version

works as expected.

Last edited by karol (2011-08-10 12:51:32)

Offline

#5 2011-08-10 12:55:40

Andertxu
Member
Registered: 2009-11-26
Posts: 22

Re: dosemu

Dosemu 1.0.4.3 , Linux archlinux 3.0-ARCH #1 SMP PREEMPT Sat Aug 6 16:18:35 CEST 2011 x86_64 Genuine Intel(R) CPU T1600 @ 1.66GHz GenuineIntel GNU/Linux .

I run dosemu.bin under these programs, hope it helps .

Strace output : http://pastebin.com/DsUHmmt1
Ltrace output : http://pastebin.com/9fkZUA49
Valgrind output : http://pastebin.com/NdY9pP0S

Offline

#6 2011-08-10 14:04:19

darut
Member
Registered: 2004-04-17
Posts: 69

Re: dosemu

I run "dosemu" command in terminal emulator.
It worked before last update with all previous 2.6.xx kernels.
It is possible that it is not kernel matter, I don't remember what packages were updated with the kernel.
Command "dosemu --version" also returns "Segmentation fault"

My dosemu version is 1.4.0-3.

Last edited by darut (2011-08-10 14:05:33)

Offline

#7 2011-08-10 14:10:54

darut
Member
Registered: 2004-04-17
Posts: 69

Re: dosemu

Andertxu I don't know how to use your links. Is this a kind of online emulator or debbuger?

Last edited by darut (2011-08-10 14:12:19)

Offline

#8 2011-08-10 14:18:52

Andertxu
Member
Registered: 2009-11-26
Posts: 22

Re: dosemu

darut, is the console stdout output of dosemu.bin run under those programs, in order to get info why or where they crashed .

Offline

#9 2011-08-11 06:10:32

darut
Member
Registered: 2004-04-17
Posts: 69

Re: dosemu

Dosbox works very well.

Offline

#10 2011-08-11 20:09:56

nargil
Member
Registered: 2010-07-21
Posts: 14

Re: dosemu

karol wrote:

because I get

[karol@black ~]$ dosemu
LOWRAM mmap: Invalid argument
Segmentation fault

To fix lowram mmap issue you need to call from root:

echo 0 > /proc/sys/vm/mmap_min_addr

There is another issue with the 3.0 kernel. As you look closer to dosemu\src\base\init\init.c

void version_init(void) {
  struct utsname unames;
  char version[80];

  uname((struct utsname *)&unames);
#ifdef __linux__
  strcpy(version,unames.release);
  running_kversion = atoi(strtok(version,".")) *1000000;
  running_kversion += atoi(strtok(NULL,".")) *1000;
  running_kversion += atoi(strtok(NULL,"."));
#endif
  ... // cut 
}

So what it basicly does it expects uname -r to return x.y.z version.
It would be an easy fix, but I have problems compiling dosemu\src\plugin\sdl\sdl.c

sdl.c: In function ‘init_x11_support’:
sdl.c:147:34: error: ‘struct <anonymous>’ has no member named ‘lock_func’
sdl.c:148:36: error: ‘struct <anonymous>’ has no member named ‘unlock_func’
sdl.c: In function ‘SDL_handle_events’:
sdl.c:772:40: error: ‘SDL_SysWMmsg’ has no member named ‘event’

and don't know how to solve it.


EDIT:
Ok, managed to compile it, by removing sdl 1.3, and installing 1.2
here is the fix

void version_init(void) {
  struct utsname unames;
  char version[80];

  uname((struct utsname *)&unames);
#ifdef __linux__
  strcpy(version,unames.release);
  running_kversion = atoi(strtok(version,".")) *1000000;
  running_kversion += atoi(strtok(NULL,".")) *1000;
  char *c = strtok(NULL,".");
  if(c)
      running_kversion += atoi(c);
#endif

Please try it.

Last edited by nargil (2011-08-11 20:46:18)

Offline

#11 2011-08-11 21:35:01

darut
Member
Registered: 2004-04-17
Posts: 69

Re: dosemu

What should I do? I'm not a programmer.

Offline

#12 2011-08-11 21:40:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: dosemu

@nargil
Arch ships sdl 2, not 3 :-)

It would be cool if you could provide a patch for dosemu\src\base\init\init.c or whatever is needed to make it work w/ linux 3.0 and send it upstream http://sourceforge.net/tracker/?atid=45 … unc=browse

Offline

#13 2011-08-11 22:03:45

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

nargil wrote:

EDIT:
Ok, managed to compile it, by removing sdl 1.3, and installing 1.2
here is the fix

void version_init(void) {
  struct utsname unames;
  char version[80];

  uname((struct utsname *)&unames);
#ifdef __linux__
  strcpy(version,unames.release);
  running_kversion = atoi(strtok(version,".")) *1000000;
  running_kversion += atoi(strtok(NULL,".")) *1000;
  char *c = strtok(NULL,".");
  if(c)
      running_kversion += atoi(c);
#endif

Please try it.

Does this work only with SDL 1.2? Have you tried with fixing 1.3?

I also get segfaults after upgrade to Linux 3.0, but I haven't used dosemu after upgrade so I noticed it after seeing this thread.

Offline

#14 2011-08-11 22:04:18

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

karol wrote:

@nargil
Arch ships sdl 2, not 3 :-)

It would be cool if you could provide a patch for dosemu\src\base\init\init.c or whatever is needed to make it work w/ linux 3.0 and send it upstream http://sourceforge.net/tracker/?atid=45 … unc=browse

So, his patch should work? smile

Offline

#15 2011-08-11 22:13:12

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

Yep, it's SDL 1.2.14. Thanx for the patch. I will try it tommorow.

Last edited by bocke (2011-08-11 22:27:01)

Offline

#16 2011-08-11 22:16:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: dosemu

bocke wrote:
karol wrote:

@nargil
Arch ships sdl 2, not 3 :-)

It would be cool if you could provide a patch for dosemu\src\base\init\init.c or whatever is needed to make it work w/ linux 3.0 and send it upstream http://sourceforge.net/tracker/?atid=45 … unc=browse

So, his patch should work? smile

Yes, it should work for Archers using packages provided by the official repos :-)


@darut
You have to change a line in dosemu\src\base\init\init.c and recompile.
Remove

running_kversion += atoi(strtok(NULL,"."));

and insert

  char *c = strtok(NULL,".");
  if(c)
      running_kversion += atoi(c);

You can see where the lines are in the snippets posted here by nargil.

Offline

#17 2011-08-12 14:37:52

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

I reported the bug to Flyspray:
https://bugs.archlinux.org/task/25536

You can find a patch and changed PKGBUILD attached in the report. I am going to report this to SF too.

Basically this is a version string problem. version_init function makes an assumption that the kernel version is in the form of X.Y.Z, but for 3.0 that's not true. So when strtok doesn't find 'Z' it returns NULL, further making atoi to segfault.

It works now.

Offline

#18 2011-08-12 14:39:00

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

Forgot to say: patch is based on nargil's solution. smile

Offline

#19 2011-08-12 14:42:23

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

Btw, this doesn't have any connection to SDL. What was the problem with 1.3? Maybe we can solve that?

Offline

#20 2011-08-12 14:48:46

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

Offline

#21 2011-08-12 14:57:36

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: dosemu

bocke, there is an Edit link. Its there for a reason. Make use of it instead of posting consecutively every 5 minutes.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#22 2011-08-12 15:06:27

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

Sorry. Will pay attention in the future. I am used to the forum software that automatically appends to the first message instead creating a new post for each message. I don't have much experience with FluxBB.

Last edited by bocke (2011-08-12 15:07:07)

Offline

#23 2011-08-12 16:47:28

darut
Member
Registered: 2004-04-17
Posts: 69

Re: dosemu

Thank you very much Nargil.
I've done changes according your advice, recompiled dosemu, fixed lowram mmap issue and it works!

Offline

#24 2011-08-13 18:17:50

bocke
Member
Registered: 2011-07-15
Posts: 40

Re: dosemu

Just to let you know that the patch has been accepted in the mainstream:

>Comment By: Bart Oldeman (bartoldeman) 
Date: 2011-08-13 13:47

Message:
Thanks, applied!

Somehow I had the impression that the 3.0 kernel would still report 3.0.0
in uname, because that's what I have.
In any case your patch doesn't hurt so I applied it.

Offline

#25 2011-08-15 13:25:51

Andertxu
Member
Registered: 2009-11-26
Posts: 22

Re: dosemu

I installed the last Dosemu (1.4.0.-5)  from repos but now Freedos/Command.com does not load ...

Linux DOS emulator 1.4.0.0 $Date: 2007-05-05$
Last configured at Mon Aug 15 08:50:54 UTC 2011 on linux
This is work in progress.
Please test against a recent version before reporting bugs and problems.
Submit Bug Reports, Patches & New Code to linux-msdos@vger.kernel.org or via
the SourceForge tracking system at http://www.sourceforge.net/projects/dosemu

DPMI-Server Version 0.9 installed

FreeDOS kernel build 2036 cvs [version Aug 18 2006 compiled Aug 18 2006]
Kernel compatibility 7.10 - WATCOMC - 80386 CPU required - FAT32 support

(C) Copyright 1995-2006 Pasquale J. Villani and The FreeDOS Project.
All Rights Reserved. This is free software and comes with ABSOLUTELY NO
WARRANTY; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation;
either version 2, or (at your option) any later version.
C: HD1, Pri[ 1], CHS=    0-1-1, start=     0 MB, size=   392 MB
D: HD2, Pri[ 1], CHS=    0-1-1, start=     0 MB, size=   392 MB
Bad or missing Command Interpreter: command.com /P /E:256
Enter the full shell command line

Offline

Board footer

Powered by FluxBB