• Open Watcom 2.0 port of HPT

    From andrew clarke@3:633/267 to All on Sunday, February 14, 2021 06:05:12
    Earlier this week I backported HPT to Open Watcom 2.0, which can be used to build the 32-bit OS/2 & Windows versions.

    I say "backported" loosely. SMAPI could once be built with the closed-source Watcom C 10.0. This was common when Paul Edwards ported Msged to 32-bit OS/2 in
    1995, and when I ported MSGAPI38 (which was then renamed SMAPI) to Windows NT a
    few years later. Fast forward to 2021 and there's a working Watcom makefile (make/makefile.watcom) for each Husky module (huskylib, smapi, etc) needed to build HPT.

    The makefile.watcom file for each module was written to be cross-platform, so you can cross-compile the OS/2 & Windows version from Linux, using the Linux version of OW 2.0. Or you can build it from Windows or OS/2 in the normal way, with the same makefile, without cross-compiling.

    Theoretically the binaries should run on anything from Windows NT 3.1 and OS/2 2.0 onwards.


    The forked modules are here:

    https://github.com/zoomosis/huskylib
    https://github.com/zoomosis/smapi
    https://github.com/zoomosis/fidoconf
    https://github.com/zoomosis/areafix
    https://github.com/zoomosis/hpt


    To build the Windows version:

    Install Git.

    Install the latest snapshot of Open Watcom 2.0 from here:

    https://github.com/open-watcom/open-watcom-v2/releases/download/Last-CI-build/ow-snapshot.tar.gz

    Set the correct PATH, INCLUDE and LIB environment variables for OW 2.0, then:

    git clone https://github.com/zoomosis/huskylib
    cd huskylib/make
    wmake -f makefile.watcom
    cd ../..

    etc.

    The correct build order for each module is: huskylib smapi fidoconf areafix hpt


    To build the OS/2 version use this instead:

    wmake -f makefile.watcom OS2=1


    Disclaimer:

    I haven't actually tested the resulting binaries much yet. The main challenge I
    set myself was just to get HPT to build without errors.


    Footnote:

    I actually did all the porting work under FreeBSD 12 AMD64. FreeBSD can run most Linux binaries, and the 64-bit Linux binaries of OW 2.0 all run without any problems. There's no real emulation going on. FreeBSD just translates the binary's Linux system calls to and from its native BSD syscalls. This is similar to how WINE works but with much less translation overhead.

    Like older versions of Watcom, OW 2.0 can also compile to 32-bit DOS as well as
    16-bit DOS, OS/2 & Windows. Cross-compiling a 16-bit OS/2 binary from a FreeBSD
    host is fun in a weird twisted way.

    --- GoldED+/BSD 1.1.5-b20180707
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From Oli@2:280/464.47 to andrew clarke on Saturday, February 13, 2021 22:19:38
    andrew wrote (2021-02-14):

    Earlier this week I backported HPT to Open Watcom 2.0, which can be used to build the 32-bit OS/2 & Windows versions.

    [...]

    Like older versions of Watcom, OW 2.0 can also compile to 32-bit DOS as well as 16-bit DOS, OS/2 & Windows. Cross-compiling a 16-bit OS/2 binary from a FreeBSD host is fun in a weird twisted way.

    awesome ...

    ---
    * Origin: . (2:280/464.47)
  • From Michael Pierce@1:105/81 to andrew clarke on Saturday, February 13, 2021 18:16:16

    Hello andrew!

    14 Feb 21 06:05, you wrote to all:

    Earlier this week I backported HPT to Open Watcom 2.0, which can be
    used to build the 32-bit OS/2 & Windows versions.

    Thank you for your help :-)

    The forked modules are here:

    https://github.com/zoomosis/huskylib
    https://github.com/zoomosis/smapi
    https://github.com/zoomosis/fidoconf
    https://github.com/zoomosis/areafix
    https://github.com/zoomosis/hpt

    git clone https://github.com/zoomosis/huskylib
    cd huskylib/make
    wmake -f makefile.watcom
    cd ../..

    etc.

    The correct build order for each module is: huskylib smapi fidoconf areafix hpt


    To build the OS/2 version use this instead:

    wmake -f makefile.watcom OS2=1


    Disclaimer:

    I haven't actually tested the resulting binaries much yet. The main challenge I set myself was just to get HPT to build without errors.
    this is on OS2, using wmake -f makefile.watcom OS2=2

    huskylib compiles, smapi compiles but
    areafix gives Error! E1011: Symbol 'MAXPATHLEN' has not been declared
    and
    Error! Expression most be comstant


    Michael

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Our Awesome Net - Portland, OR - awesome.abon.us (1:105/81)
  • From andrew clarke@3:633/267 to Michael Pierce on Sunday, February 14, 2021 19:09:48
    13 Feb 21 18:16, you wrote to me:

    Disclaimer:

    I haven't actually tested the resulting binaries much yet. The main
    challenge I set myself was just to get HPT to build without errors.

    this is on OS2, using wmake -f makefile.watcom OS2=2

    huskylib compiles, smapi compiles but
    areafix gives Error! E1011: Symbol 'MAXPATHLEN' has not been declared
    and
    Error! Expression most be comstant

    Strange. Evidently OW2.0 is a bit of a moving target, but that shouldn't happen. It built without error on a OW2.0 snapshot from 2020-12-26.

    I've subsequently updated to the latest OW2.0 snapshot and got the same error as you, so have committed a fix to huskylib just now.

    The bad news is running "hpt.exe toss" (without any configuration set) actually
    froze my OS/2 VM.


    Actually I think the freezing is a problem with the VM or a bug in the OS/2 JFS
    driver and not Watcom's fault, because it (1) wouldn't boot correctly the first
    time after a reboot and (2) generated a POPUPLOG.OS2 error before it froze:

    02-14-2021 19:08:14 SYS3175 PID 0165 TID 0001 Slot 006d C:\SRC\WATHUSKY\HPT\MAKE\HPT.EXE
    c0000005
    00020de6
    P1=00000001 P2=00000d9d P3=XXXXXXXX P4=XXXXXXXX
    EAX=00000d9d EBX=00000d9d ECX=00000000 EDX=00000000
    ESI=00000002 EDI=00000d9d
    DS=0053 DSACC=d0f3 DSLIM=5fffffff
    ES=0053 ESACC=d0f3 ESLIM=5fffffff
    FS=150b FSACC=00f3 FSLIM=00000030
    GS=0000 GSACC=**** GSLIM=********
    CS:EIP=005b:00020de6 CSACC=d0df CSLIM=5fffffff
    SS:ESP=0053:0008ff9c SSACC=d0f3 SSLIM=5fffffff
    EBP=001000f4 FLG=00010246

    HPT.EXE 0002:00000de6


    But until I reinstall my OS/2 VM so it's stable, I can't tell you what's causing HPT to segfault. I bet it's something stupid though.

    --- GoldED+/BSD 1.1.5-b20180707
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From andrew clarke@3:633/267 to All on Wednesday, February 17, 2021 03:44:02
    On Sun 2021-02-14 19:09:48, andrew clarke (3:633/267) wrote to Michael Pierce:

    The bad news is running "hpt.exe toss" (without any configuration set) actually froze my OS/2 VM.

    Now fixed.

    As I suspected the freeze was a complete red herring and unrelated.

    --- GoldED+/BSD 1.1.5-b20180707
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From Tommi Koivula@2:221/360 to andrew clarke on Sunday, March 07, 2021 18:01:35
    On 13.2.2021 21:05, andrew clarke wrote:

    Earlier this week I backported HPT to Open Watcom 2.0, which can be used to
    build the 32-bit OS/2 & Windows versions.

    I say "backported" loosely. SMAPI could once be built with the closed-source
    Watcom C 10.0. This was common when Paul Edwards ported Msged to 32-bit OS/2 in
    1995, and when I ported MSGAPI38 (which was then renamed SMAPI) to Windows NT a
    few years later. Fast forward to 2021 and there's a working Watcom makefile (make/makefile.watcom) for each Husky module (huskylib, smapi, etc) needed to build HPT.

    The makefile.watcom file for each module was written to be cross-platform, so
    you can cross-compile the OS/2 & Windows version from Linux, using the Linux version of OW 2.0. Or you can build it from Windows or OS/2 in the normal way, with the same makefile, without cross-compiling.

    Theoretically the binaries should run on anything from Windows NT 3.1 and
    OS/2 2.0 onwards.


    The forked modules are here:

    https://github.com/zoomosis/huskylib
    https://github.com/zoomosis/smapi
    https://github.com/zoomosis/fidoconf
    https://github.com/zoomosis/areafix
    https://github.com/zoomosis/hpt


    Any plans of watcom makefiles of other husky tools? Like sqpack, hptutil and hptkill? :)

    'Tommi

    --- Mozilla/5.0 (Windows NT 5.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0
    * Origin: nntp://rbb.fidonet.fi - Lake Ylo - Finland (2:221/360.0)
  • From andrew clarke@3:633/267 to Tommi Koivula on Monday, March 08, 2021 17:35:12
    On 2021-03-07 18:01:34, Tommi Koivula (2:221/360) wrote to andrew clarke:

    Any plans of watcom makefiles of other husky tools? Like sqpack, hptutil and hptkill? :)

    I only have plans for htick and Msged, after I finish working on hpt. I'm not familiar with the ones you listed.

    --- GoldED+/BSD 1.1.5-b20180707
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From Tommi Koivula@2:221/360 to andrew clarke on Tuesday, March 09, 2021 08:14:22
    On 8.3.2021 8.35, andrew clarke wrote:

    Any plans of watcom makefiles of other husky tools? Like sqpack,
    hptutil and hptkill? :)

    I only have plans for htick and Msged, after I finish working on hpt.
    I'm not familiar with the ones you listed.

    Ok, I see.

    The reason I asked is that I have seen crashes when using JAM with EMX builds of Husky. The watcom build has been working perfect now in my old OS/2 (WSeB).

    'Tommi

    --- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0
    * Origin: nntp://rbb.fidonet.fi - Lake Ylo - Finland (2:221/360.0)
  • From andrew clarke@3:633/267 to Tommi Koivula on Tuesday, March 09, 2021 20:36:32
    On 2021-03-09 08:14:22, Tommi Koivula (2:221/360) wrote to andrew clarke:

    Any plans of watcom makefiles of other husky tools? Like sqpack,
    hptutil and hptkill? :)

    I only have plans for htick and Msged, after I finish working on
    hpt. I'm not familiar with the ones you listed.

    Ok, I see.

    The reason I asked is that I have seen crashes when using JAM with EMX builds of Husky. The watcom build has been working perfect now in my old OS/2 (WSeB).

    It would be better to try to fix any serious bugs in the EMX build first.

    Note that there was a bug accidentally introduced into the JAM code a few weeks
    ago that has since been fixed. It affected all platforms. That may be the cause
    of the bug you saw, though I can only speculate without details.

    --- GoldED+/BSD 1.1.5-b20180707
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From Tommi Koivula@2:221/360 to andrew clarke on Tuesday, March 09, 2021 12:11:04
    On 9.3.2021 11.36, andrew clarke wrote:

    The reason I asked is that I have seen crashes when using JAM with EMX builds of Husky. The watcom build has been working perfect now in my old OS/2 (WSeB).

    It would be better to try to fix any serious bugs in the EMX build first.

    Of course! :)

    Note that there was a bug accidentally introduced into the JAM code a
    few weeks ago that has since been fixed. It affected all platforms.
    That may be the cause of the bug you saw, though I can only speculate
    without details.

    My experiences are from the past. I first started to run HPT in OS/2 mainly as passthru tosser, then swithed some areas to Squish. Now some areas are also JAM.

    Anyway, I have the current source compiled with EMX, I'll check how it works with JAM areas.

    'Tommi

    --- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0
    * Origin: nntp://rbb.fidonet.fi - Lake Ylo - Finland (2:221/360.0)