It is currently Tue Mar 19, 2024 2:21 am


All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Trying to get a Cygwin port going
PostPosted: Sun May 27, 2012 5:11 pm 
User avatar

Joined: Mon Nov 01, 2010 1:39 pm
Posts: 51
Real Name: John Willis
Began Programming in MUMPS: 01 Apr 2010
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!

_________________
John Willis, Founder
Coherent Logic Development
http://youngmumpster.wordpress.com/
jwillis@coherent-logic.com


Top
Offline Profile  
 
 Post subject: Re: Trying to get a Cygwin port going
PostPosted: Fri Jun 29, 2012 5:09 am 
User avatar

Joined: Mon Nov 01, 2010 3:33 pm
Posts: 104
Location: Australia
Real Name: Ray Newman
Began Programming in MUMPS: 01 Jul 1976
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


Top
Offline Profile  
 
 Post subject: Re: Trying to get a Cygwin port going
PostPosted: Tue Jul 03, 2012 9:46 pm 
User avatar

Joined: Mon Nov 01, 2010 3:33 pm
Posts: 104
Location: Australia
Real Name: Ray Newman
Began Programming in MUMPS: 01 Jul 1976
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


Top
Offline Profile  
 
 Post subject: Re: Trying to get a Cygwin port going
PostPosted: Tue Jul 03, 2012 9:50 pm 
User avatar

Joined: Mon Nov 01, 2010 1:39 pm
Posts: 51
Real Name: John Willis
Began Programming in MUMPS: 01 Apr 2010
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.

_________________
John Willis, Founder
Coherent Logic Development
http://youngmumpster.wordpress.com/
jwillis@coherent-logic.com


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net