You are not logged in.
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
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
Thanks Karol
When I try run dosemu I get "Segmentation fault" error.
Offline
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
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
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
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
darut, is the console stdout output of dosemu.bin run under those programs, in order to get info why or where they crashed .
Offline
Dosbox works very well.
Offline
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
What should I do? I'm not a programmer.
Offline
@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
EDIT:
Ok, managed to compile it, by removing sdl 1.3, and installing 1.2
here is the fixvoid 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
@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?
Offline
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
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?
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
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
Forgot to say: patch is based on nargil's solution.
Offline
Btw, this doesn't have any connection to SDL. What was the problem with 1.3? Maybe we can solve that?
Offline
SourceForge bug report:
https://sourceforge.net/tracker/?func=d … tid=457449
Offline
bocke, there is an Edit link. Its there for a reason. Make use of it instead of posting consecutively every 5 minutes.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
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
Thank you very much Nargil.
I've done changes according your advice, recompiled dosemu, fixed lowram mmap issue and it works!
Offline
Just to let you know that the patch has been accepted in the mainstream:
>Comment By: Bart Oldeman (bartoldeman)
Date: 2011-08-13 13:47Message:
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
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