Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Dariusz Piatkowski

Pages: [1] 2 3 ... 13
1
Programming / app high-mem capability, how to tell if it's there?
« on: December 31, 2024, 09:27:43 pm »
...basically, when looking at either an EXE or a DLL, how can I tell whether the application was written/compiled with highmem support?

I am aware of 'highmem', and stuff like 'exehdr', but even in the case of 'exehdr' I do not see how to interpret the results (i.e. is there anything in the output I am missing that already shows me that "yup, highmem capable" flag?).

Yes, I agree that leaving things "as-is" (meaning: the way the software was supplied) is a good recommendation, but if changes were made (we've all marked DLLs to load-high I'm sure) how the heck do I figure out what the intended DEFAULT mode is???

2
Programming / DISKIO - preferred TIMER to use
« on: December 26, 2024, 11:24:45 pm »
DISKIO uses a TIMER in order to track the duration of various data xfer events.

More specifically, provisions were made in the old code to account for an incorrectly working high-resolution timer on SMP machines.

Subsequently right at the start of DISKIO a call is made to determine which TIMER should be used by examining the CPU core count, and if >1 than we force the use of "standard MS counter":

Original Code
Code: [Select]
// init flHiresTmr flag
// note: DosTmrQueryTime() API not works on OS/2 SMP as designed (thanks scott),
// so on SMP systems we must use other timer - standart MS counter.
void init_timer (void)
{
    int nCPUs = 0;

    if (DosQuerySysInfo (QSV_NUMPROCESSORS,
                         QSV_NUMPROCESSORS,
                         &nCPUs,
                         sizeof(nCPUs)) == NO_ERROR)
    {
        if (nCPUs > 1) flHiresTmr = 0;
    }
}

My udpated code
Code: [Select]
// init flHiresTmr flag
// note: DosTmrQueryTime() API does not work on OS/2 SMP as designed (thanks scott),
// so on SMP systems we must use other timer - standart MS counter.
void init_timer (void)
{
   //int iCPUs = 0; //moved this to a GLOBAL variable in diskio.h, v1.26

   if (DosQuerySysInfo (QSV_NUMPROCESSORS,    /* ordinal of first system variable */
                        QSV_NUMPROCESSORS, /* ordinal of the last system variable */
                        &iCPUs,              /* address of output data buffer */ 
                        sizeof(iCPUs))          /* size of output data buffer */
       == NO_ERROR)
   {
      if (iCPUs > 1)
         flHiresTmr = 1;
   }
         
   #ifdef DEBUG
      printf("\n DEBUG => CPU cores detected is: %d\n", iCPUs);
      printf(" DEBUG => flHiresTmr is: %d\n", flHiresTmr);
   #endif /* DEBUG */

} // end of init_timer

...where I basically ignore that original comment and force flHiresTmr = 1, which also means that throughout DISKIO's execution I will always use the hi-res TIMER, that being through DosTmrQueryTime API.

OK, so when I had initially encountered this I thought to myself: umm, I recall we had some troubles in the past with the hi-res stuff being spotty. Firefox had encountered some of this, heck we even made use of the 'SET NSPR_OS2_NO_HIRES_TIMER=1' flag. But digging into this further, by all accounts today that no longer appears to be the case. My FF install no longer uses this, I have several other apps that use the hi-res TIMER, and I believe some work was done in the ACPI codebase to manage this better, although some opinions remainder for a while as to whether these changes were working or not.

Needless to say, my testing here appears to be showing correct results as the results match what the original DISKO logic was showing.

Here is a more specific example of code (API comments have been added by me, as well as some variable name changes) that relies on previous determination of what TIMER should be used:

Code: [Select]
// use MS counter timer for SMP systems and HiRes Timer for any other
int start_timer (TIMER *tStart)
{
   if (flHiresTmr)
   {
      if (DosTmrQueryTime (tStart) != NO_ERROR)
      {
         printf("Timer error.\n");
         return (-1);
      }
   }
   else
   {
      tStart->ulHi = 0;
      if (DosQuerySysInfo (QSV_MS_COUNT,   /* ordinal of first system variable */
                           QSV_MS_COUNT,/* ordinal of the last system variable */
                           tStart,           /* address of output data buffer */
                           sizeof(tStart))      /* size of output data buffer */
          != NO_ERROR)
      {
         printf("Timer error.\n");
         return (-1);
      }
   }

   return (0);

} // end of start_timer

My question to you all is: should we be still concerned about this?

I feel like simplifying the codebase is a good pursuit and if the hi-res TIMER works (which I understand to be the more precise one given that at the standard frequency the PIT chip runs at (roughly) 1.193182 MHz, so that gives us a microsecond precision as opposed to the ms stuff that DosQuerySysInfo is capable of), we should use it.

3
Programming / DISKIO - storage device detection logic
« on: December 22, 2024, 05:18:41 am »
Alright...the one well known DISKIO problem/challenge stems due to the fact that any removable storage devices, these being primarily connected through USB, cause DISKIO to error when no actual media is mounted.

AFAIU at the start of execution DISKIO simply asks DosPhysicalDisk API for a number of partitionable disks using this API call:
Code: [Select]
DosPhysicalDisk (INFO_COUNT_PARTITIONABLE_DISKS, &nDisks, sizeof(nDisks), 0, 0)

Sure enough, ALL devices defined as storage media, whether these are currently mounted and accessible, show up in that list.

Further on, DosPhysicalDisk is called again but this time in order to obtain the device handle for DosDevIOCtl32 calls later on:
Code: [Select]
DosPhysicalDisk (INFO_GETIOCTLHANDLE, &usPhysical, sizeof(usPhysical)

OK, so far so good, only one caveat here: "...The handle returned for the specified partitionable disk can only be used with the DosDevIOCtl function for the Category 09h Physical Disk Control IOCtl Commands...".

Now DISKIO proceeds to query the device parameters by calling DosDevIOCtl32:
Code: [Select]
DosDevIOCtl32 (&dpb, sizeof(dpb), &bCmd, sizeof(bCmd), DSK_GETDEVICEPARAMS, hfHandle)

Here is the thing: I think it ONLY gets the parameters but doesn't actually do any checking to see if the media can actually be accessed. It assumes that since the storage device was found it can therefore be tested.

What I am not sure about however is how to interpret the meaning of the logic that decides whether to retrieve the DEVICEPARAMETERBLOCK or BIOSPARAMETERBLOCK record structures.

In other words, the IF statement check "if (hfHandle & PHYSICAL)" below, where we have the following defines:

#define PHYSICAL     0x1000
#define CDROM        0x2000

...does that mean that hfHandle will be BIT anded with PHYSICAL and if they MATCH the device we are querying must therefore be a mounted storage media?

I see we distinguish between PHYSICAL & CDROM, perhaps USB attached should have a different define as well?

Code: [Select]
   // now check if we have a valid physical file handle
  if (hfHandle & PHYSICAL)
   {
      // get the info for DEVICEPARAMETERBLOCK
      if (DosDevIOCtl32 (&dpb, sizeof(dpb), &bCmd, sizeof(bCmd), DSK_GETDEVICEPARAMS, hfHandle))
      {
         DosPhysicalDisk (INFO_FREEIOCTLHANDLE, NULL, 0, &usPhysical, sizeof(usPhysical));
         return (-1);
      }

      *lSectors = dpb.cSectorsPerTrack;
      *lTracks  = dpb.cCylinders;
      *lSides   = dpb.cHeads;
      *lSector  = DSK_DEFAULT_SECTOR_SIZE;

      #ifdef DEBUG
         printf("\n DEBUG => found the disk and storing in DEVICEPARAMETERBLOCK...\n");
      #endif /* DEBUG */
   }
   else
   {
      // get the info for BIOSPARAMETERBLOCK
      if (DosDevIOCtl32 (&bpb, sizeof(bpb), &bCmd, sizeof(bCmd), DSK_GETDEVICEPARAMS, hfHandle))
      {
         DosClose (hfHandle);
         return (-1);
      }

      *lSectors = bpb.usSectorsPerTrack;
      *lTracks  = bpb.cCylinders;
      *lSides   = bpb.cHeads;
      *lSector  = bpb.usBytesPerSector;

      #ifdef DEBUG
         printf("\n DEBUG => found the disk and storing in BIOSPARAMETERBLOCK...\n");
      #endif /* DEBUG */
   }

Anyways...a LOT of detail there, and so I'm going to run some debug sessions to understand this a tad better. In the meantime, any hints would of course be greatly appreciated!!!

4
Programming / DISKIO - Dhrystone benchmark calc
« on: December 21, 2024, 06:23:55 am »
OK, so DISKIO, the continuing mission to boldly go where I haven't gone before! LOL

Working through what seems like funny results, outcomes that change based on duration of the test, which to me implies an overflow.

In the case of the Dhrystone benchmark for the CPU, here is the pertinent section of the code:

Code: [Select]
...
void run_dhrystone (void)
{
   long lDhryTime = dhry_stone ();

   /* originally, time is measured in ms */
   lDhryTime = (lDhryTime + 5) / 10;
   /* now it is in units of 10 ms */

   if (lDhryTime == 0)
      lDhryTime = 1; /* if less than 10 ms, then assume at least 10 ms */

   /* now calculate runs per second */
   ulDhryStones = Number_Of_Runs * 100 / lDhryTime;
   /* by the time we cross 20 million dhrystones per second with a CPU,
      we will hopefully have only 64-bit machines to run this on ... */

   #ifdef DEBUG
      printf("\n DEBUG => lDhryTime      is: %ld", lDhryTime);
      printf("\n DEBUG => Number_Of_runs is: %lu", Number_Of_Runs);
      printf("\n DEBUG => ulDhryStones   is: %lld", ulDhryStones);

      printf("\n\n DEBUG => ULONG size     is: %d\n", sizeof(ULONG));
      printf(" DEBUG => ULONG bit size is: %d\n", sizeof(ULONG) * CHAR_BIT);

      printf("\n DEBUG => LONG LONG size     is: %d\n", sizeof(long long));
      printf(" DEBUG => LONG LONG bit size is: %d\n", sizeof(long long) * CHAR_BIT);
   #endif /* DEBUG */
   
} // end of run_dhrystone
...

...and what I'm seeing is the following weird situation:

1) t=5 secs
Code: [Select]
Dhrystone benchmark for this CPU:
 DEBUG => lDhryTime      is: 502
 DEBUG => Number_Of_runs is: 31084783
 DEBUG => ulDhryStones   is: 6192187    6192187 runs/sec

 DEBUG => ULONG size     is: 4
 DEBUG => ULONG bit size is: 32

 DEBUG => LONG LONG size     is: 8
 DEBUG => LONG LONG bit size is: 64

2) t=7 secs
Code: [Select]
Dhrystone benchmark for this CPU:
 DEBUG => lDhryTime      is: 1003
 DEBUG => Number_Of_runs is: 65230248
 DEBUG => ulDhryStones   is: 2221393    2221393 runs/sec

 DEBUG => ULONG size     is: 4
 DEBUG => ULONG bit size is: 32

 DEBUG => LONG LONG size     is: 8
 DEBUG => LONG LONG bit size is: 64

Clearly, the result for t=7 secs is wrong.

ulDhryStones is defined as 'long long', was originally 'ULONG' but it looked like it was overflowing so I changed it to 'long long', but that's still not big enough.

So this is the weird part (to me anyways), long long is a substantial –9,223,372,036,854,775,807 to 9,223,372,036,854,775,807, so why am I seeing this? Is my printf use of '%lld' incorrect?

5
Programming / CPUMON - source code location?
« on: December 01, 2024, 01:47:49 am »
I have Trevor Hemsley's CPUMON here and I love the overall arrangment / functionality that little util has...BUT...there are a few things I'd like to change: the graph legend as getting past the 2-4 core CPUs these days produces a bit of a mess, colour sync between the lines and CPUx on the legend, provide for a user-controllable refresh rate, etc.

Needless to say, I looked everywhere and haven't found the sources...any ideas where I might though?

Thanks!

6
Programming / DosSetThreadAffinity - process or thread only?
« on: October 19, 2024, 02:52:52 pm »
Trying to learn a bit about SMP capabilities on our platform and I would like to understand the functionality of the DosSetThreadAffinity API.

The Toolkit 'Programming Guide and Reference Addendum' states "...DosSetThreadAffinity allows the calling thread to change the processor affinity mask for the current thread...", so this very much feels like THREAD only control for the current thread I am in, as in: executing right now.

In the meantime, I am curious if this can be applied to a process, and by default all of it's threads?

Further on, could I develop a system driver which would enforce the execution of specific programs (i.e. processes) on a specific CPU/core of a SMP system?

The example code shown in the addendum is:

Code: [Select]
#define INCL_DOS
#define INCL_32
#define INCL_DOSERRORS
#define INCL_NOPMAPI
#include <os2.h>
#include <stdio.h>

int main(void)
{
APIRET rc;
MPAFFINITY affinity;

rc = DosSetThreadAffinity(affinity);
printf("Set thread's affinity rc = %08.8xh\n", rc);
printf("Set thread's affinity affinity[0] = %08.8xh, affinity[1] = %08.8xh\n",
        affinity.mask[0], affinity.mask[1]);
return rc;
}

Given what is shown above, and the fact that no 'target THREAD' parameter is provided, I conclude that indeed this API will only control the current thread.

Any ideas where else I could dig up some info on this and the DosQueryThreadAffinity APIs?

Thanks, as always!

7
Internet / HTTPS server?
« on: October 02, 2024, 03:05:54 am »
I'm using Peter Moylan's excellent WebServe 2.4 at the moment to host a few of my thigns, but given the whole move from http to https, I started to think it would be nice to look into this further (have heard some complaints from people that they can't get to my stuff).

Sooo...what are our choices besides the Apache stuff?

8
Question for the masses: I'm at libtiff-tools 4.0.9 level here, and the 4.6.x release has been sitting out there in EXP state, so I thought I'd take a stab at it with the pre-req of course being the baseline libtiff itself.

The libtiff-tools however drops just about all the "tiff2..." EXE files...so tools themselves, and I see not legacy version out there that still provides these.

Specifically I am after the tiff2pdf.exe one, as PDFmergeNX uses that...

Sooo...I went back to the previous version b/c the latest & greatest doesn't quite seem to be just that.

Is there something else out there that has this? Doing a 'yum provides */tiff2pdf.exe' just lists the previous releases and shows nothing at the 4.6.x level.

EDIT
====

Just spotted libtiff-legacy-tools, but that's at 3.9.5-2 level, and wouldn't that be an older version of libtiff-tools-4.0.9-1? (which is what I had before I executed the upgrade)

9
Multimedia / mplayer - just stopped working...sort of...
« on: March 30, 2024, 07:23:15 pm »
I've been using mplayer for years...only recently (yesterday in fact) noticed that when attempting to play a MP4 file it looks like no actual video is created, although the app itself starts.

So looking into this I found the following in the LOG:

Quote
MPlayer SVN-r38083-9.1.0 (C) 2000-2021 MPlayer Team
Setting process priority: realtime

Playing G:\tmp\AUTO\20210128_201140.mp4.
Cache fill:  0.00% (0 bytes)

libavformat version 58.65.101 (internal)
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x307b00]Protocol name not provided, cannot determine
 if input is local or a network protocol, buffers and access patterns cannot be
configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
VIDEO:  [H264]  1920x1080  24bpp  30.000 fps  34089.8 kbps (4161.4 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.118.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2021-01-29T01:14:08.000000Z
 location: +42.2680-083.0048/
 location-eng: +42.2680-083.0048/
 com.android.version: 10
 com.android.capture.fps: 30.000000
Load subtitles in G:\tmp\AUTO\
Audio: no sound
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [kva] 1920x1080 => 1920x1080 Planar YV12
KVA: Setup failed!!!
...

...indeed, the "KVA: Setup failed!!!" is reporting out a problem initiating the video outout.

OK, so I went back to my startup CMD, which is:

Code: [Select]
@mode 80,60
G:\apps\multimedia\mplayer\mplayer.exe -xy %1 %2 %3 %4 %5 %6

And here is what my mplayer.ini file looks like:

Quote
# Write your default config options here!
# VIDEO
vo=kva:snap

# 'geometry' settings, where '+0+0' is the top left
# 'x:y' will put the display at this specific location
# 'x%;y%' will put the display at this percentage of the overall screen location (50%:50% would be center of screen)

# slightly moved from LEFT and TOP sides, good for 720 playback
#geometry=10%

# full-screen-width for 1080 playback (fits on HEAD-0 window)
geometry=0%

#aspect=16:9
double=yes              # double buffering(recommended for subtitles)
autoq=100               # AUTO control the video quality
#vf=pp=de,hqdn3d        # additional post-processing options
#vf=pp                  # additional post-processing options
#framedrop="1"          # For slow machines
#hardframedrop="0"      # Make sure hard frame drop is off but can turn on easily now

# AUDIO
ao=kai:dart
#ao=kai:uniaud
#srate=48000
softvol-max=300

#font=g:\psfonts\verdana.ttf
#subfont=g:\psfonts\verdana.ttf

codecpath=g:\apps\multimedia\mplayer\codecs

# OTHER CONTROLS
msglevel:all=5          # set the DEBUG level (5 = DEFAULT)
cache=20480             # set the TOTAL cache size
cache-min=50            # fill xx% of TOTAL cache before playback start
autosync=30             # sync up video/audio by adjusting the algorithm
#mc=1.0                 # up to how many seconds/frame to adjust
priority=realtime       # set the priority of mplayer (idle,belownormal,normal,abovenormal,high,realtime)

# Video Overlay Options and VIO Message Window Options
#really-quiet=yes       # limit what the VIO window shows
#fixed-vo=yes           # keep display output window open between different feeds
colorkey=0x000001       # change the background to off-black, instead of bright green

# Setting for Browser User Agent response
user-agent=NSPlayer/4.1.0.3856

Is anything jumping out at anyone here? Like I said above, this is the config I've been running for somet time now, heck, my last update of anything is about 2022 timeframe.

Going to try with DIVE next to see if that results in something different...

As always: thanks everyone!

10
Utilities / LinearMemoryMap.cmd => new version produces an error...why?
« on: December 23, 2023, 05:06:46 pm »
So Steven Levine published an updated version of this awesome util, but I'm now seeing an error, which I can't quite decipher:

Code: [Select]
[G:\util\theseus]linearmemorymap
Writing results to G:\util\theseus\linearmemorymap-20231223-1059.lst

[G:\util\theseus]G:\OS2\CMD.EXE /c G:\UTIL\MISC\LinearMemoryMap.cmd -  1>G:\util\theseus\linearmemorymap-20231223-1059.lst
Running from G:\util\theseus
NOVALUE signaled at G:\UTIL\MISC\LinearMemoryMap.cmd line 190.
REXX reason = DIR.
Source ="if dir \== '' then".
   545 *-*         Call lineout 'STDERR', 'Exiting.';
Exiting.
       +++   Interactive trace. "Trace Off" to end debug, ENTER to Continue.

   546 *-*         Nop;

   547 *-*         If symbol('RC') \== 'VAR';

   547 *-*         Then;
   548 *-*           rc = 255;

   549 *-*         Exit rc;

ERROR signaled at G:\UTIL\MISC\LinearMemoryMap.cmd line 114.
REXX reason = G:\OS2\CMD.EXE /c G:\UTIL\MISC\LinearMemoryMap.cmd - >G:\util\theseus\linearmemorymap-20231223-1059.lst.
RC = 255.
Source ="cmd".
   545 *-*         Call lineout 'STDERR', 'Exiting.';
Exiting.
       +++   Interactive trace. "Trace Off" to end debug, ENTER to Continue.

   546 *-*         Nop;

   547 *-*         If symbol('RC') \== 'VAR';

   549 *-*         Exit rc;


I'm running this from the Theseus directory, the linearmemorymap-20231223-1059.lst is created, and appears to be fine.

Any ideas?

11
Programming / EXE header 'Module' field change - how?
« on: December 10, 2023, 09:09:05 pm »
This is more of a nuisance driven inquiry, but the UPSMONS util (UPS Monitor) has the following EXEHDR defintion:

Code: [Select]
...
Module:                         TEMPLATE
Description:                    VisPro/REXX Runtime Version 2.01, COPYRIGHT (c)
HockWare Inc. 1994
Executable format level:        0
CPU type:                       Intel 80386 or upwardly compatible
Operating system:               Operating System/2

Module type:                    Program
                                NO internal fixups in executable image
Application type:               Uses PM Windowing API
...

Subsequently, TEMPLATE is what shows up in Theseus instead of 'UPSMONS'.

Looking at this I thought: "hmm, so I'm guessing this may be coming from the EXE HDR", and indeed it is, "so how can I change that?"

Is there a quick way to to do so? I'm thinking one of the OS/2 Toolkit utils may do this...but nothing obvious jumps out at me looking at the "Tools" INF.

Any ideas?

12
Setup & Installation / sigh....Python3 upgrade - curl problem?
« on: December 10, 2023, 06:06:09 pm »
So this whole 'upgrade to python3' is by now a well traversed path, I did my reading, took to the CLI approach of executing: 'yum install python3 python2.7', which gave me the following results:

Code: [Select]
[G:\]yum install python3 python2.7
Loaded plugins: changelog, downloadonly, ps, replace, verify
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-comp
lete-transaction first to finish them.
--> Running transaction check
---> Package python2.7.pentium4 0:2.7.18-3.oc00 will be installed
--> Processing Dependency: python-rpm-macros for package: python2.7-2.7.18-3.oc00.pentium4
--> Processing Dependency: python-srpm-macros for package: python2.7-2.7.18-3.oc00.pentium4
---> Package python3.pentium4 0:3.9.17-1.oc00 will be installed
--> Processing Dependency: python3-libs = 3.9.17-1.oc00 for package: python3-3.9.17-1.oc00.pentium4
--> Processing Dependency: python39.dll for package: python3-3.9.17-1.oc00.pentium4
--> Running transaction check
---> Package python-libs.pentium4 0:2.7.6-25.oc00 will be obsoleted
--> Processing Dependency: python-libs = 2.7.6-25.oc00 for package: python-2.7.6-25.oc00.pentium4
---> Package python-rpm-macros.noarch 0:3.9-3.oc00 will be installed
---> Package python-srpm-macros.noarch 0:3.9-3.oc00 will be installed
---> Package python3-libs.pentium4 0:3.9.17-1.oc00 will be obsoleting
--> Running transaction check
---> Package python.pentium4 0:2.7.6-25.oc00 will be obsoleted
---> Package python-unversioned-command.pentium4 0:3.9.17-1.oc00 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

 Package                      Arch       Version            Repository     Size
================================================================================

Installing:
 python-unversioned-command   pentium4   3.9.17-1.oc00      netlabs-rel   8.6 k
     replacing  python.pentium4 2.7.6-25.oc00
 python2.7                    pentium4   2.7.18-3.oc00      netlabs-rel    18 M
 python3                      pentium4   3.9.17-1.oc00      netlabs-rel    22 k
 python3-libs                 pentium4   3.9.17-1.oc00      netlabs-rel    13 M
     replacing  python-libs.pentium4 2.7.6-25.oc00
Installing for dependencies:
 python-rpm-macros            noarch     3.9-3.oc00         netlabs-rel   9.1 k
 python-srpm-macros           noarch     3.9-3.oc00         netlabs-rel    15 k

Transaction Summary
================================================================================

Install       6 Packages

Total download size: 30 M
Is this ok [y/N]:

INPUT => Y

Downloading Packages:
(1/6): python-rpm-ma | 9.1 kB  00:00
(2/6): python-srpm-m |  15 kB  00:00
(3/6): python-unvers | 8.6 kB  00:00
(4/6): python2.7-2.7 |  18 MB  00:07     ====-] 2.1 MB/s |  17 MB  00:00 ETA
(5/6): python3-3.9.1 |  22 kB  00:00
(6/6): python3-libs- |  13 MB  00:05     ==== ] 1.9 MB/s |  12 MB  00:00 ETA
--------------------------------------------------------------------------------

Total                                           2.2 MB/s |  30 MB     00:13

Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : python-srpm-macros-3.9-3.oc00.noarch                         1/8
  Installing : python3-libs-3.9.17-1.oc00.pentium4                          2/8
  Installing : python3-3.9.17-1.oc00.pentium4                               3/8
  Installing : python-rpm-macros-3.9-3.oc00.noarch                          4/8
  Installing : python2.7-2.7.18-3.oc00.pentium4                             5/8
  Installing : python-unversioned-command-3.9.17-1.oc00.pentium4            6/8
  Erasing    : python-2.7.6-25.oc00.pentium4                                7/8
  Erasing    : python-libs-2.7.6-25.oc00.pentium4                           8/8

Rpmdb checksum is invalid: dCDPT(pkg checksums): python3-libs.pentium4 0:3.9.17-1.oc00 - u

Following this upgrade my inventory of python RPM packages installed is as follows:

Code: [Select]
Installed Packages
python-dateutil.noarch                        2.6.0-1.oc00           installed
python-pycurl.pentium4                        7.19.5.1-2.oc00        installed
python-rpm-macros.noarch                      3.9-3.oc00             installed
python-srpm-macros.noarch                     3.9-3.oc00             installed
python-unversioned-command.pentium4           3.9.17-1.oc00          installed
python2-deltarpm.pentium4                     3.6-1.oc00             installed
python2-libxml2.pentium4                      2.9.10-3.oc00          installed
python2-rpm.pentium4                          4.13.0-20.oc00         installed
python2.7.pentium4                            2.7.18-3.oc00          installed
python3.pentium4                              3.9.17-1.oc00          installed
python3-libs.pentium4                         3.9.17-1.oc00          installed

Therefore, my next logical (and maybe this was a mistake???) step was to upgrade all the pythonx stuff to python3, which I went to ANPM for:

1) python3-dateutil - this seems to have gone fine
Code: [Select]
----------[ 10 Dec 2023 10:26:12 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_install_dep.py python3-dateutil
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
No argument pipe.
Return code: 0
----------[ 10 Dec 2023 10:26:25 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_install.py python3-dateutil
No argument pipe.
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
Running Transaction Check
Warning: RPMDB altered outside of yum.
PackageSackError(): Rpmdb checksum is invalid: dCDPT(pkg checksums): python3-six.noarch 0:1.10.0-2.oc00 - u
Error: Rpmdb checksum is invalid: dCDPT(pkg checksums): python3-six.noarch 0:1.10.0-2.oc00 - u
PackageSackError()
Return code: 0
----------[ 10 Dec 2023 10:26:41 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_list.py
Setting up yum
No argument pipe.
Adding temporary repositories
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
Initializing cache
Requesting package list
Return code: 0
----------[ 10 Dec 2023 10:27:05 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_info.py python3-six
Warning: progress pipe not available.
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
No argument pipe.
Return code: 0
----------[ 10 Dec 2023 10:27:17 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_files.py installed python3-six
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
No argument pipe.
Return code: 0
----------[ 10 Dec 2023 10:27:51 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_files.py installed python-unversioned-command
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
No argument pipe.
Return code: 0
----------[ 10 Dec 2023 10:28:02 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_info.py python-unversioned-command
Warning: progress pipe not available.
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
No argument pipe.
Return code: 0

2) python3-curl - this seems to have NOT gone fine
Code: [Select]
----------[ 10 Dec 2023 10:29:24 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_install_dep.py python3-pycurl
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
No argument pipe.
Return code: 0
----------[ 10 Dec 2023 10:29:32 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_install.py python3-pycurl
No argument pipe.
Enabling temporary repository arcanoae-sub
Enabling temporary repository arcanoae-exp
Enabling temporary repository arcanoae-stage
Enabling temporary repository arcanoae-arcaos
Running Transaction Check
Warning: RPMDB altered outside of yum.
PackageSackError(): Rpmdb checksum is invalid: dCDPT(pkg checksums): python3-pycurl.pentium4 0:7.44.1-3.oc00 - u
Error: Rpmdb checksum is invalid: dCDPT(pkg checksums): python3-pycurl.pentium4 0:7.44.1-3.oc00 - u
PackageSackError()
Return code: 0
----------[ 10 Dec 2023 10:29:58 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_list.py
Traceback (most recent call last):
  File "G:\UTIL\ANPM\scripts\yum_list.py", line 6, in <module>
    import yum
  File "G:/usr/lib/python2.7/site-packages/yum/__init__.py", line 52, in <module>
    import config
  File "G:/usr/lib/python2.7/site-packages/yum/config.py", line 30, in <module>
    from parser import ConfigPreProcessor, varReplace
  File "G:/usr/lib/python2.7/site-packages/yum/parser.py", line 4, in <module>
    import urlgrabber
  File "G:/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
    from grabber import urlgrab, urlopen, urlread
  File "G:/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 512, in <module>
    import pycurl
ImportError: No module named pycurl
Return code: 0
----------[ 10 Dec 2023 10:30:00 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_list.py available
Traceback (most recent call last):
  File "G:\UTIL\ANPM\scripts\yum_list.py", line 6, in <module>
    import yum
  File "G:/usr/lib/python2.7/site-packages/yum/__init__.py", line 52, in <module>
    import config
  File "G:/usr/lib/python2.7/site-packages/yum/config.py", line 30, in <module>
    from parser import ConfigPreProcessor, varReplace
  File "G:/usr/lib/python2.7/site-packages/yum/parser.py", line 4, in <module>
    import urlgrabber
  File "G:/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
    from grabber import urlgrab, urlopen, urlread
  File "G:/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 512, in <module>
    import pycurl
ImportError: No module named pycurl
Return code: 0
----------[ 10 Dec 2023 10:39:59 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_populate.py
Traceback (most recent call last):
  File "G:\UTIL\ANPM\scripts\yum_populate.py", line 6, in <module>
    import yum
  File "G:/usr/lib/python2.7/site-packages/yum/__init__.py", line 52, in <module>
    import config
  File "G:/usr/lib/python2.7/site-packages/yum/config.py", line 30, in <module>
    from parser import ConfigPreProcessor, varReplace
  File "G:/usr/lib/python2.7/site-packages/yum/parser.py", line 4, in <module>
    import urlgrabber
  File "G:/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
    from grabber import urlgrab, urlopen, urlread
  File "G:/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 512, in <module>
    import pycurl
ImportError: No module named pycurl
Return code: 0
----------[ 10 Dec 2023 10:40:01 ]----------
Executing: @python2.7 G:\UTIL\ANPM\scripts\yum_list.py
Traceback (most recent call last):
  File "G:\UTIL\ANPM\scripts\yum_list.py", line 6, in <module>
    import yum
  File "G:/usr/lib/python2.7/site-packages/yum/__init__.py", line 52, in <module>
    import config
  File "G:/usr/lib/python2.7/site-packages/yum/config.py", line 30, in <module>
    from parser import ConfigPreProcessor, varReplace
  File "G:/usr/lib/python2.7/site-packages/yum/parser.py", line 4, in <module>
    import urlgrabber
  File "G:/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
    from grabber import urlgrab, urlopen, urlread
  File "G:/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 512, in <module>
    import pycurl
ImportError: No module named pycurl
Return code: 0

Sure enough, ANPM is no longer able to pull anything up, reports a pipe error, although from CLI I get the following:

Code: [Select]
[G:\]yum list python* |less
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named pycurl

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.18 (default, Dec 27 2021, 15:11:56)
[GCC 9.2.0 20190812 (OS/2 RPM build 9.2.0-5.oc00)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

So it would appear that installing python3-pycurl obsoleted python-pycurl (which I would have expected is the correct thing to do), but for some reason ANPM continues to see python 2.7.18 as the version it is executing.

From any CLI when checking for the installed Python3 version I get the following:

Code: [Select]
[G:\]python --version
Python 3.9.17

...so clearly I'm running Python3, but ANPM is still using 2.7.18, is that by design?

Either way, any ideas how I can get back to a working YUM/RPM/ANPM config?...and what (if anything) do I do about the remaining pythonx RPM packages (do I upgrade, or leave alone)?

OH, BTW: a system reboot was executed to rule out any other impacts, results are the same

13
Programming / Resources, dialogs, etc - what tools for what jobs?
« on: November 18, 2023, 04:41:34 pm »
PUMonitor enhancement project follow-up...

The original author provided a text RC file that defines all the resources the utility uses. No problem there, the Resource Compiler get that into a RES file, which is then ultimately attached to the EXE itself. My makefile handles that. Keep in mind that he developed this in Borland C++, so I am assuming he used the Borland Resource Workshop.

Alright...so now I need to change the Settings dialogs and as best as I know (which granted is very little on this topic ;)) I was expecting to use the Dialog Editor to actually visually modify/add the right layouts, etc. The Dialog Editor however (which is the Toolkit one) only wants to open a RES file, which while managable (b/c I have that as an output of the Resource Compiler run) will not afterwards reflect the changes in the source RC file. In other words: it looks like I can make changes to the RES itself, but once I do how do I get these into the underlying RC itself?

I understand why the ability to just change the RES is desirable: after all, if I want to adjust just a resource it is awfully nice to do so w/o having to recompile all the sources, etc.

OK, so back to my task, my thinking here is: if my makefile is looking to always compile the RC, clearly when I modify just the RES I will always overwrite those changes with the output of compiled RC, no?

Further on I understand that the Dialog Editor should allow me to create the DLG file, with the option to create the compiled version, that being the RES extension. OK, but trying to do this with my Dialog Editor only allows me to open a RES file, and attempting to save it simply points back to the same RES and optional H files.

Alright...so digging through my OS/2 DEV library I see the mention of Dialog Editor ONLY creating DLG text files when one starts with a NEW dialog...hmm??? So is the expectation really that all further changes are to be done by hand (if I want to reflect the actual changes in the underlying DLG source), or through a direct GUI manipulation of the previously generated RES file (using Dialog Editor)?

That just seems weird...I should be able to visually modify a dialog and upon saving it update the source definition file itself, be it RC or DLG (depending of course on what particular resource I am modifying).

So what am I missing here?

FYI - attempting to open the RC file itself in Borland Resource Workshop produces an error:

"Compiling MENU: ID_MENU"

Code: [Select]
Error
G:\code\source\os2\pumonitor\src\source\pumon2.rc 20:Expecting END

The Help feedback states:

Quote
Resource Workshop encountered an unexpected token when searching for the END keyword. This error is frequently caused by a typo in an identifier name.

Which I think is strange given that this RC file compiles successfully into RES, which itself is attached into the EXE and by all accounts that's working quite fine.

Here is the matching part of the RC itself:

Code: [Select]
...
MENU ID_MENU
{
    MENUITEM "~About"    , ID_MENU_ABOUT, MIS_TEXT
    MENUITEM "~Settings" , ID_MENU_SET  , MIS_TEXT | MIS_SUBMENU
    {
        MENUITEM "~General"       , ID_MENU_SET_0, MIS_TEXT
        MENUITEM "~CPU Meter"     , ID_MENU_SET_1, MIS_TEXT
        MENUITEM "~Memory Meter"  , ID_MENU_SET_2, MIS_TEXT
        MENUITEM "~TCP/IP Traffic", ID_MENU_SET_3, MIS_TEXT
        MENUITEM "M~ail Checker 1", ID_MENU_SET_4, MIS_TEXT
        MENUITEM "M~ail Checker 2", ID_MENU_SET_5, MIS_TEXT
        MENUITEM "M~ail Checker 3", ID_MENU_SET_6, MIS_TEXT
        MENUITEM "M~ail Checker 4", ID_MENU_SET_7, MIS_TEXT
        MENUITEM "M~ail Checker 5", ID_MENU_SET_8, MIS_TEXT
        MENUITEM "C~onnectivity"  , ID_MENU_SET_9, MIS_TEXT
    }
    MENUITEM ""            ,            -1, MIS_SEPARATOR
    MENUITEM "Read ~Mail  ", ID_MENU_MAIL , MIS_TEXT
    MENUITEM ""            ,            -1, MIS_SEPARATOR
    MENUITEM "~Close"      , ID_MENU_CLOSE, MIS_TEXT
}
...

14
Applications / NewView - control over NEW window placement?
« on: October 15, 2023, 01:47:53 am »
Is there any sort of parameter/setting that defines where each NEW NewView window is to be placed on screen?

I ask b/c in my setup (dual-monitor & 12 virtual desktops) every time I invoke NewView it pops up right next to the previous instantiation, which most of the time puts it in another window and normally in a different virtual desktop altogether. So I then chase it down and re-position, etc, etc.

OK, so having said that, I did see the following in the app help:

Quote
/pos:<left>,<bottom>,<width>,<height>

Set the main program window to the given position and size

...and while that allows me to position & size a NEW window in specific ways, as soon as I open a NEW window (w/o first closing the already opened one) that NEW window gets created right over the previous one, although safely offset by a few pixels.

Needless to say, that control doesn't help as I'm back to "square one".

15
Programming / makefile interpretation - help needed
« on: October 15, 2023, 01:20:08 am »
LOL...so this is part of my on-going attempt to add shared memory monitor to the PUMonitor utility.

Alright...PUMon relies on Borland's BMAKE for makefile handling, so I figured I would take a stab at converting that to NMAKE32 instead so I can use my VAC++ 3.6.5. Heck, I started this a looonnnnggg time ago (see https://www.os2world.com/forum/index.php/topic,2646.msg29061.html#msg29061) and now that I've made the memory watch code changes I really needed to commit and get that previous attempt to produce results!!!

Ha...but OK, I am basing this work on the original makefile and in the TARGET section:

Code: [Select]
...
# Targets
all :  pumon2.exe

COMMON.LIB : $(OBJS)
@cd .\obj
-@del COMMON.LIB >nul 2>nul
@$(LIBRARIAN) COMMON.LIB @..\library.rsp;
@cd ..

pumon2.exe : COMMON.LIB pumon2.obj pumon2.res
@cd .\obj
$(CC) @&&|
pumon2.obj COMMON.LIB   ..\source\si2.lib ..\source\win32k.lib so32dll.lib tcp32dll.lib pumon2.def
|
@$(RC) pumon2.res pumon2.exe
@cd ..
...

there I find the following snippet which I'm thrown off by:

Code: [Select]
$(CC) @&&|
pumon2.obj COMMON.LIB   ..\source\si2.lib ..\source\win32k.lib so32dll.lib tcp32dll.lib pumon2.def
|

I need help understanding this.

'CC' macro expands to => CC=icc -O+ -Oc+ -Ss+ -G5 -Q+ -Gm+ -I..\include -B"/ST:327680 /NOE /E:2" -B"/PMTYPE:PM"

Seems simple at first: the compiler is called, and given the placement of that command (PUMON2.EXE target) it appears that this is the FINAL call to link everything together.

OK, but that "@&&" string right after it implies a CLI conditional execute call that will only execute the stuff following "|" if the CC call is successful, but the "|" (pipe)??? what is that about (what sort of CC output am I expecting to pipe into the next section???)...and if CC will execute as-is, what the heck is it processing anyways given that I do not see anything telling it to pick up a dependent, nor to create a target.

Clearly I am missing something here and having spent a couple of hours on this tonight I'm stuck...

Pages: [1] 2 3 ... 13