Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some thoughts about cross development #56

Open
mgrossmann opened this issue Dec 17, 2020 · 7 comments
Open

Some thoughts about cross development #56

mgrossmann opened this issue Dec 17, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@mgrossmann
Copy link

Hi guys,

I just tried to get the CMS variant of BREXX to fly in my development environment. First of all, I fell flat on my face because of the cmssys.h is missing. Then I noticed that in some places the import of cmssys.h is surrounded by an #ifdef, but in some places, it is not.

So my first question is, where do I get the header file, and the second, what is your preferred procedure for importing it?

I would like to have CMSBREXX locally debuggable, then I could test errors I find in BREXX/370 against CMSBREXX.
I could also build a Windows version of CMSBREXX for Walter.

Many greetings
Mike

@mgrossmann
Copy link
Author

Ok folks,

sorry for opening this issue that fast. I managed to find the include in the gcclib, now.
But maybe we could leave this issue open for a while. Just for discussing some thoughts
about cross development.

@adesutherland , how are you developing in CLion?

/MIG

@adesutherland
Copy link
Owner

Hi Mike - Sorry for the delay!

Glad you got it working. BTW the releases include tapes of the source and built binaries, and of course you can always use the docker image. I also have an online host (the most tiny of tiny GCP instances). Let me know if access to that would be useful.

I have only just started using Clion (and for CREXX) and have not attempted to do a BREXX/VM370 build on windows. Instead I have a slow build process which sends the files to a docker image to be built and run - a bit of a sticky tape solution. I added CMAKE just for the IDE code warnings etc. A local build and debug would be better - but we would need to make a GCCLIB emulator library for the CMS functions I added to STD C, which would not be a bad thing. How did you do it for MVS? What do you think?

Adrian

@mgrossmann
Copy link
Author

Hi Adrian..

np...

It's not yet running. :) I just found the include file. :)

As you named, in brexx/370 I have created a jccdummy.hand a jccdummy.cfile.
Everytime I have to use a special JCC feature, I do include the jccdummy.hand implement a
dummy function in jccdummy.c.

I thought about doing the same for your brexx version, just for testing. But you are using CMSGetPG()
in nearly every file. And I'm a lazy guy. :)

So I'm still not sure, what could be the best way for cmsbrexx.

But I think there is a need for being able to do cross development.
At least for me, a newbie in C. ;)

Mike

@mgrossmann
Copy link
Author

Currently struggeling with this:

((Memory *) (context->bmem_mem_head)) = mem;

/Users/mike/git/cms-370-brexx/bmem.c:105:10: error: assignment to cast is illegal, lvalue casts are not supported

@adesutherland
Copy link
Owner

LOL - I am just in the middle of something but will try a decode the error - don't you love C :-)

@mgrossmann
Copy link
Author

No hurry, Adrian :)
And ya, I do not understand everything, but I like it.

@adesutherland
Copy link
Owner

So this is my bad - assignment to a cast is indeed illegal since 30+ years (even in C90) - it obviously was supported back in the GCC days in ANSI C or whatever.

It was caused when I put mem_head (which was a global) into the structure context as context-bmem_mem_head.

The trouble I had was that it had a type Memory* but I didn't want to include all BREXX headers into context.h. What I should have done is added a

typedef struct Memory Memory;

to context.h

Instead, I changed it to type void* and I must have done global search & replace adding a (Memory*) cast everywhere. I wasn't thinking about Lvalues - anyway our old GCCCMS compiler didn't complain - so all good I thought!

The line can be changed to

context->bmem_mem_head = mem;

But there will be a few changes like that ... :-(

@adesutherland adesutherland added the enhancement New feature or request label Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants