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

CPANEL on Linux? #1

Open
n00dle042 opened this issue May 25, 2022 · 52 comments
Open

CPANEL on Linux? #1

n00dle042 opened this issue May 25, 2022 · 52 comments

Comments

@n00dle042
Copy link

I see pre-built binaries for windows including the CPANEL support, but haven't found any documents on how to build binaries to make it work in Linux. (Debian 9, 10, 11 ish, specifically). I thought I'd defined the right symbols, but make didn't agree. What other information do you need, or have I missed?

Sincere thanks for your efforts! (I don't want to build a windows machine just to try out the panels!)

@rsanchovilla
Copy link
Owner

Hi
I do not have a Linux dev environment, so I'm guessing what is wrong. It've updated makefile to include sim_video.c
This should help ...

@rsanchovilla
Copy link
Owner

I've updated makefile again. You can try it if you want

@n00dle042
Copy link
Author

Between the last two notes I tried it again, and was running into makefile issues, so I will re-merge and give it one more go. :) Thanks!

@n00dle042
Copy link
Author

n00dle042 commented Jun 2, 2022

Make still failing... after fixing (what I surmised were) some errors, it still blows up while linking. Makefile diff and Log tail attached. I do have SDL support (with -dev!) installed, but it seems to not link.

SimH_cpanel.errors.txt
makefile.diff.txt
.

@rsanchovilla
Copy link
Owner

rsanchovilla commented Jun 3, 2022 via email

@rjolbrich
Copy link

Hello,
Just by chance I came across Simh cpanel a few weeks ago. I'm trying to build on Linux Mint 19.1.
A simple make command on my system complains about <SDL.h> not found before or after installing
LibSDL2-dev. Do I need some options with the make command? Are there any docs?

@rsanchovilla
Copy link
Owner

rsanchovilla commented Jul 18, 2022 via email

@rjolbrich
Copy link

If N00dle is still monitoring this thread I'd appreciate any help.
I'm moderately proficient on Linux, but far from an expert on make and makefiles.

@wrljet
Copy link
Contributor

wrljet commented Jul 19, 2022

I got it to build and run on Linux.
Info and diffs to come later.

cpanel-ibm360-on-linux

@rsanchovilla
Copy link
Owner

rsanchovilla commented Jul 20, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Jul 20, 2022

Roberto,

Does the graphics perform well on linux?

I don't know. The animations seemed to be working well.
I've never run the project before (not even on Windows) so don't know what to expect.
Very cool project, by the way.

It didn't react to + or - keystrokes to change the zoom, so maybe it doesn't fully work (yet).

Bill

@rsanchovilla
Copy link
Owner

rsanchovilla commented Jul 20, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Jul 21, 2022

Di[d] you try +/- keys on keypad?

+/- keys on the keypad do work for the main CPU window.
Do not work in the console window.

@rsanchovilla
Copy link
Owner

rsanchovilla commented Jul 21, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Jul 21, 2022

Hi
This behavior is correct. 3215 Console sees +/- as a valid key to type, as A..Z.

That explains what I saw when I typed into the console.

To resize console try "Control +" and "Control -"- Hold on Control Key and press +/- without releasing it

That works!
Bill

@rsanchovilla
Copy link
Owner

rsanchovilla commented Aug 1, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Aug 1, 2022

Sorry for delay. Many other things going on here.

@wrljet
Copy link
Contributor

wrljet commented Aug 23, 2022

I have created a Pull Request, #2, with preliminary changes for this issue.

Bill

@rsanchovilla
Copy link
Owner

rsanchovilla commented Aug 24, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Aug 24, 2022

Attached here:

I701_tests.zip

@rsanchovilla
Copy link
Owner

rsanchovilla commented Aug 26, 2022 via email

@rsanchovilla
Copy link
Owner

Hi

The problem is in the deck to assemble. It is not prepared as expected, so the computer halts.
I've created a new i701_test.ini file to debug the issue. Can you drop it in the /test folder and rebuild the project? the resulting console.txt and debug.txt should give some clue of what's going on
Thanks

i701_test.zip

@wrljet
Copy link
Contributor

wrljet commented Sep 9, 2022

I will check that out and get back to you.

First, however, in your "Some clean up" commit 00ed35e

Removing the #defines I had added for min() and max() breaks the Linux support.

@rsanchovilla
Copy link
Owner

rsanchovilla commented Sep 9, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Sep 9, 2022

The symbols are undefined and the compiles fail.
They are used here and there in a few source files. (thus putting them in the sim_defs.h)

@rsanchovilla
Copy link
Owner

rsanchovilla commented Sep 9, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Sep 9, 2022

Ok, the change I made (to be coherent with the SimH style elsewhere) is

// added to not depend on stdlib max() and min()
#ifndef MAX
#define MAX(a,b) (((a) >= (b)) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a,b) (((a) <= (b)) ? (a) : (b))
#endif

In Win32 VS2012, if MAX symbol not defined in cpanel (it isn't) the defines MAX The ifndef is if fact a rather unnecessary safeguard

Can you test using this?

#include
#include cpanel.h
// added to not depend on stdlib max() and min()
#define MAX(a,b) (((a) >= (b)) ? (a) : (b))
#define MIN(a,b) (((a) <= (b)) ? (a) : (b))

Sure, but I don't see how that'll work since the code is looking for lowercase min and max.

@rsanchovilla
Copy link
Owner

rsanchovilla commented Sep 9, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Sep 9, 2022

OK, I'll have a look and make those changes.

I'm fussing with it right now on MacOS. :-)

@wrljet
Copy link
Contributor

wrljet commented Sep 9, 2022

Hi

The problem is in the deck to assemble. It is not prepared as expected, so the computer halts. I've created a new i701_test.ini file to debug the issue. Can you drop it in the /test folder and rebuild the project? the resulting console.txt and debug.txt should give some clue of what's going on Thanks

i701_test.zip

Here you go. (this is from MacOS, BTW)

SimH_cpanel_i701_console_debug.zip

@wrljet
Copy link
Contributor

wrljet commented Sep 10, 2022

sim_video.h refers to the lowercase min().

How do you want that addressed? Change source to use your MIN() or leave in my original
change to sim_defs.h?

@rsanchovilla
Copy link
Owner

rsanchovilla commented Sep 10, 2022 via email

@rsanchovilla
Copy link
Owner

rsanchovilla commented Sep 10, 2022 via email

@rsanchovilla
Copy link
Owner

Hi Bill

The problem seems to be in the "carddeck sort" command.
I send attached a nee i701_test.ini and to source code files. I just added some debug traces.

Can you build and send console.txt and debug.txt back to me?
Thanks!
i701_test2.zip

@rsanchovilla
Copy link
Owner

rsanchovilla commented Oct 11, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Oct 12, 2022

Sorry, I've been backed up with non-fun responsibilities. But I want to get to it soon!

@wrljet
Copy link
Contributor

wrljet commented Nov 3, 2022

Hi, I got back on this today. It doesn't compile with the changes in i701_test2.zip.

sim_card_test() is declared differently in the .h and .c files.

./sim_card.c: At top level:
./sim_card.c:1480:8: error: conflicting types for ‘sim_card_test’
 1480 | t_stat sim_card_test (DEVICE *dptr, const char *cptr)
      |        ^~~~~~~~~~~~~
In file included from ./sim_card.c:81:
./sim_card.h:148:15: note: previous declaration of ‘sim_card_test’ was here
  148 | extern t_stat sim_card_test (DEVICE *dptr);
      |               ^~~~~~~~~~~~~
make: *** [makefile:2876: BIN/i650] Error 1

@rjolbrich
Copy link

wrljet,
Look at this: simh/simh@a4054f3
It shows that sim_card.h was changed in February.

@rsanchovilla
Copy link
Owner

rsanchovilla commented Dec 12, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Dec 22, 2022

Roberto,

wrljet, Look at this: simh/simh@a4054f3 It shows that sim_card.h was changed in February.

Yeah, the problem was the remote/master had been updated, and the i701_test2 was based on the newer code.
I put it into my older clone.

So please disregard my message from 2 Nov:

sim_card_test() is declared differently in the .h and .c files.

Bill

@wrljet
Copy link
Contributor

wrljet commented Dec 22, 2022

Roberto,

I don't see the sources to build the test_run zip files, so I offer these changes as just a suggestion.

test_run/IBM360/IBM370_OSVS1.zip contains a directory IBM 360 with an embedded space.
I respectfully suggest to avoid using filenames with embedded spaces. (they can be a pain to work with)

Within the zip file, in sw/IBM370M148_1x3420Tapes_3350dasd_cpanel.ini, there are references to cpanel/ibm370.ini. The ini filename however is uppercase ( cpanel/IBM370.ini ). On Linux this doesn't work because the filesystems are strict about case, where Windows is more lenient.

I have not looked, but I suspect other of the .ini files are similarly affected. Either the references need to be uppercase, or the IBM370.ini itself should be lowercase.

Lastly attached here is a sample Bash script, similar to your .bat, that I used to do a test run.
run-CPanel-IBM-370-148-OSVS1-R6-sysgen-8MB.sh.txt

Bill

@rsanchovilla
Copy link
Owner

rsanchovilla commented Dec 22, 2022 via email

@wrljet
Copy link
Contributor

wrljet commented Dec 24, 2022

This works now also on WSL2 Ubuntu under Windows 10 22H2.

@rjolbrich
Copy link

wrljet,
Have you completed work on the i701 or are you still focused on the 360?

@rsanchovilla
Copy link
Owner

rsanchovilla commented Jan 3, 2023 via email

@rjolbrich
Copy link

Hello,
There's been no activity here for several months.
Should this issue be closed?
Or, are there Linux issues that still need to be addressed?

@rjolbrich
Copy link

Hello,
I see the hardware support that was added yesterday.
I'm still interested in the Linux build. Is Mr. Lewis still a contributor?
I do not own a recent version of Visual Studio so I can't compile in Windows.
That is, unless someone knows about an open source alternative for compilation,
I require the Linux build. Any recommendations are appreciated.

@rsanchovilla
Copy link
Owner

rsanchovilla commented Nov 7, 2023 via email

@rjolbrich
Copy link

Hello,
If the old VS2012 works, why not!
I'll get a copy and fire it up.
That will simpilfy my communication with you.
I don't know the exact date that I'll get started, but I'll be in touch.

@wrljet
Copy link
Contributor

wrljet commented Nov 7, 2023

I'm still a contributor but the project seemed idle for a long time.
The Linux build mostly worked the last time I was involved with it.

Bill

@rjolbrich
Copy link

Hello,

Success!

I did not follow your suggestion of old compilers for old computers, but...

I downloaded and installed the community version of VS 2022. After this
I cloned your repository and made a successful test run of the i701. I'll
have to read the documentation to rearrange the images as I don't like
the printer to appear at the far right ( It's a pain to drag it all the way to the left )
Otherwise I'm quite impressed. I've got a lot of reading to complete. This has been
a good learning experience for me as I have no experience with GitHub repositories.
I'll keep you informed on my progress.
.

@rsanchovilla
Copy link
Owner

rsanchovilla commented Nov 10, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants