Mumpster
https://www.mumpster.org/

Trying to get a Cygwin port going
https://www.mumpster.org/viewtopic.php?f=22&t=1705
Page 1 of 1

Author:  jollis [ Sun May 27, 2012 5:11 pm ]
Post subject:  Trying to get a Cygwin port going

Hello all,

I've undertaken to start a Cygwin port of MUMPSV1, in hopes that the community could benefit from a FOSS, non-InterSystems M implementation on Windows.

First problem I came across was that shmat() on Cygwin (32-bit) doesn't seem to like the 1GB address for SYSTAB_BASE. Instead of giving you a pointer to 0x40000000 as requested, it gives you a pointer to 0x7FD70000. I tried as an experiment defining SYSTAB_BASE as 0x7FD70000, which at least allows the database to be created and the environment to be initialized. However, something goes awry at this point:

Code:
hephaestus:[~/mumps]$ ./mumps testdb
M> S ^MYVAR=1
M> W ^MYVAR,!

M> H


So, no globals are getting stored. Go back into the environment, and the following happens:

Code:
M> S ^MYGLB=1
M> W ^MYGLB,!
$ECODE=,Z61,
Database integrity violation found
M> h


There's also a MUMPS_CRASH file:

Code:
MUMPS CRASH OCCURED on Sun May 27 17:38:05 2012
MUMPS V1.56 for CYGWIN_NT-6.1 i686 Built May 27 2012 at 17:35:43.
FATAL MUMPS ERROR occured - pid 6592!!
lseek failed in Write_Chain()!!
errno = 2 No such file or directory
------------------------------------------------
MUMPS CRASH OCCURED on Sun May 27 17:38:08 2012
MUMPS V1.56 for CYGWIN_NT-6.1 i686 Built May 27 2012 at 17:35:43.
FATAL MUMPS ERROR occured - pid 996!!
lseek failed in Write_Chain()!!
errno = 3 No such process
------------------------------------------------


What I'm wondering is if someone has any ideas of what else to try. I'm guessing (somewhat blindly) that I need a better understanding of the "magic" behind SYSTAB_BASE.

Thanks much!

Author:  raynewman [ Fri Jun 29, 2012 5:09 am ]
Post subject:  Re: Trying to get a Cygwin port going

I don't think it's a SYSTAB problem as SYSTAB used to be defined as follows:
#define SYSTAB_BASE (void *)0x1000000 // Base systab for linux

Having said that, I am getting the exact same set of problems trying to port MUMPS to the Raspberry Pi. I changed SYSTAB to the above and am now looking for the other problem which is in the code:

file_off = lseek( dbfd, file_off, SEEK_SET); // Seek to block

I'll let you know when I find the problem.

Ray

Author:  raynewman [ Tue Jul 03, 2012 9:46 pm ]
Post subject:  Re: Trying to get a Cygwin port going

The problem was in the packing of structures that described on-disk data.
Now fixed - it would be worth trying the Cygwin port again.

Ray

Author:  jollis [ Tue Jul 03, 2012 9:50 pm ]
Post subject:  Re: Trying to get a Cygwin port going

raynewman wrote:
The problem was in the packing of structures that described on-disk data.
Now fixed - it would be worth trying the Cygwin port again.

Ray


Thank you sir! I will look into the Cygwin port again once I get out from under some time-critical projects.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/