Monday, August 17, 2020

Building Hercules with the DLSw 3705 and BSC 2703 modifications

 GETTING SOURCE CODE FOR MODIFIED HERCULES

Matt Burk set up a fork of the Hercules SoftDevLabs code base which included his modification to the 3705 comm controller emulation to provide a socket that acts like a DLSw router, allowing me to connect from the Cisco 2811 that is attached to my IBM 3174. 

I cloned this on my desktop and did some investigating to see if it included the BSC socket in the 2703 comm controller emulation that is used by Mattis Lind's SyncDongle via the socat filter. If not, it would be necessary to retrieve any modifications made by Mattis and back fit them into this Hercules distribution.

The good news is that there are no code changes to Hercules, only configuration file adjustments and some changes to the MVS TCAM system. That means that this version of Hercules will support both BSC and SDLC connection to my terminals attached to my IBM 3174. 

BUILDING THE CODE - NEED VISUAL STUDIO 2008

The instructions and setup to build Hercules from the code I cloned requires Microsoft Visual Studio 2008. Although the Readme file asserts that you can use a free 45 day trial download, I couldn't find any evidence that Microsoft now allows download of this old and unsupported product.

Fortunately, I found a decent deal with a reseller and have an official copy of Visual Studio 2008 Professional that I will use. What I received was an ISO image to burn to DVD - but I couldn't locate my USB DVD drive anywhere. I thought I had to order another and wait a day before I could burn the DVD image to begin the install. 

However, I discovered that I can virtually mount the ISO image, just like in MacOS, so that I could run the setup without needing a physical DVD. The process ran smoothly and I soon has VS 2008 Pro installed on my laptop. 

MAKING THE HERCULES BINARIES

Overall it should be a straightforward matter of issuing nmake commands through a command line interface and letting VS 2008 do its thing. That didn't turn out to be the case.

Minor hiccups. 

I did the nmake and on the first compile, I was given a fatal error:

        Rc /r /nologo /D _MSVC_ /D MAX_CPU_ENGINES=8 -D VERSION=\"\" -D VERS_MAJ= -D VERS_INT= -D VERS_MIN= -D VERS_BLD= -DWIN32 -D_WIN32 -DWINVER=0x0600  -fo msvc.dllmod.obj\hercprod.res hercprod.rc

fatal error RC1106: invalid option: -ologo

I found some web dialog that makes it seem like this option, nologo, was added to 2008 and is probably in the service pack 1 that I haven't yet applied. Instead, the RC.exe sees this as the /n option about newline characters and then some random option text 'ologo'. I headed off to update VS 2008 before I tried again. That involved a 831 MB download from MS of another ISO image.

Sadly, that didn't correct this. The makefiles have the false option /nologo, which I had to remove. I then hit the next error in what I now expect to be a long chain of incompatibilities and errors.

        Rc /r /D _MSVC_ /D MAX_CPU_ENGINES=8 -D VERSION=\"\" -D VERS_MAJ= -D VERS_INT= -D VERS_MIN= -D VERS_BLD= -DWIN32 -D_WIN32 -DWINVER=0x0600  -fo msvc.dllmod.obj\hercprod.res hercprod.rc

hercver.rc2(45) : error RC2127 : version WORDs separated by commas expected

The substitutions to show the versions is going wrong. I decided to end this method suggested in the readme.md file (the command line method) and moved to method 2, using the solution file from VS 2008 itself.

I then discovered that my installation of VS 2008 didn't bother to include x64 support, only 32 bit support, so I had to go back and update it. I then loaded the solution file, set it to x64 and release, starting the build. Next problem - couldn't open bcrypt.dll - which is some other kind of configuration or pre-requisite issue with my VS 2008 environment. 

Nothing obvious is found with various Google searches, so this is going to take a bit of investigation before I can figure out what failed to install the DLL. My working guess is that this comes with the .NET prerequisite that was installed as part of my VS 2008 product. I will table this effort while I do some research. 

2 comments:

  1. Just to let you know, I cannot got Hyperion-SDL working very well when trying to connect over the 2703 emulation i commadpt.c. With or without SyncDongles. With ccw tracing switched on it core dumps. Without ccw tracing it is not core dumping but it tries to transmit a lot of crap as if there is some buffer weirdness. I recommend using Spinhawk with my patch.

    ReplyDelete
    Replies
    1. Thanks for the warning, Mattis. It would have been far too simple to have a single version of Hercules for both SDLC/router and BSC/SyncDongle systems!

      Delete