Author Topic: Unzip Version 6.0 hangs when booting to a commandline  (Read 9815 times)

Lars

  • Hero Member
  • *****
  • Posts: 1351
  • Karma: +69/-0
    • View Profile
Unzip Version 6.0 hangs when booting to a commandline
« on: July 28, 2024, 01:16:25 pm »
I recently had the need to boot to a commandline (hitting F2 on boot) and to use UNZIP to overwrite a couple of files that would prevent proper system operation.
However, when I called the "unzip.exe" version 6.00 that is installed via YUM, the bootup commandline would hang and the unzip help screen would never show up.
When I instead used the "unzip.exe" version 5.52 that is still in my ECS\BIN subdirectory, it would properly work without such a problem. I am sure it is not a DLL loading problem as the LIBPATH setting is the same as for the regular boot, but of course, the newer UNZIP uses different DLLs (gcc, libcn0) than the older version (which directly uses the OS/2 API).

Anyone knows what's going on or how to fix that ?

Lars
« Last Edit: July 28, 2024, 01:18:04 pm by Lars »

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1062
  • Karma: +26/-0
    • View Profile
    • Blonde Guy
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #1 on: July 28, 2024, 03:34:24 pm »
I keep around a 2nd copy of unzip.exe for these purposes. This one is statically linked, and requires only DOSCALLS, KBDCALLS, VIOCALLS, NLS and MSG.

5-26-09  13:06         248,768    124  unzip.exe

http://www.os2site.com/sw/util/archiver/zip/unz600.exe

The other course could be to update the libpath for the F2 command line to include the needed DLLs.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Lars

  • Hero Member
  • *****
  • Posts: 1351
  • Karma: +69/-0
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #2 on: July 28, 2024, 08:05:21 pm »
As I said, the used LIBPATH is the same for the commandline boot and the operational boot. I also do mot get an error on missing DLLs.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4984
  • Karma: +110/-1
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #3 on: July 28, 2024, 08:55:06 pm »
Could unzip or more likely, one of its dependents have WINDOWAPI declared in a DEF file? I quickly looked at the source of unzip and the def file hasn't been changed in ages and is simply, https://github.com/bitwiseworks/unzip-os2/blob/master/os2/unzip.def
Code: [Select]
NAME WINDOWCOMPAT NEWFILES
DESCRIPTION 'The world-famous Info-ZIP unarchiving utilities'
; SEGMENTS
;   _MSGSEG32 CLASS 'CODE'

Not sure if it is currently used.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4940
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #4 on: July 28, 2024, 09:44:03 pm »
Hello

I just wanted to test it too. Indeed on the VM (ArcaOS 5.0.7 ), the unzip.exe hangs when you boot with Alt+F1 and F2 for command line.
(It also fails here)

I don't recall which was the config.sys for that F2 boot. config.1 or config.x ?

For what I see on the F2 boot the %LIBPATH% is not recognized, but the config files looks fine. Is there any elegant way to see full the enviroment variables on the command line (image LIBPATH_F2.png )?

Regards
« Last Edit: July 28, 2024, 09:50:17 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Tom

  • Full Member
  • ***
  • Posts: 211
  • Karma: +6/-0
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #5 on: July 28, 2024, 11:46:10 pm »
I recently had the need to boot to a commandline (hitting F2 on boot) and to use UNZIP to overwrite a couple of files that would prevent proper system operation.
However, when I called the "unzip.exe" version 6.00 that is installed via YUM, the bootup commandline would hang and the unzip help screen would never show up.
When I instead used the "unzip.exe" version 5.52 that is still in my ECS\BIN subdirectory, it would properly work without such a problem. I am sure it is not a DLL loading problem as the LIBPATH setting is the same as for the regular boot, but of course, the newer UNZIP uses different DLLs (gcc, libcn0) than the older version (which directly uses the OS/2 API).

Anyone knows what's going on or how to fix that ?

Lars

When using the commandline boot with Alt+F1  --> F2, the system boots using ?:\os2\boot\config.x instead of ?:\config.sys .
I would compare config.x and config.sys .

Tom

  • Full Member
  • ***
  • Posts: 211
  • Karma: +6/-0
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #6 on: July 28, 2024, 11:49:08 pm »
As I said, the used LIBPATH is the same for the commandline boot and the operational boot. I also do mot get an error on missing DLLs.

Is there an entry in \popuplog.os2 ?
Unfortunately it is not possible to use PMDLL when booted to a commandline, and I don't know about an existing VIO-equivalent.

Tom

  • Full Member
  • ***
  • Posts: 211
  • Karma: +6/-0
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #7 on: July 28, 2024, 11:55:43 pm »
Hello

I just wanted to test it too. Indeed on the VM (ArcaOS 5.0.7 ), the unzip.exe hangs when you boot with Alt+F1 and F2 for command line.
(It also fails here)

I don't recall which was the config.sys for that F2 boot. config.1 or config.x ?

For what I see on the F2 boot the %LIBPATH% is not recognized, but the config files looks fine. Is there any elegant way to see full the enviroment variables on the command line (image LIBPATH_F2.png )?

Regards

For a F2-boot ?:\os2\boot\config.x is used (read the description on the line that starts with F2 when you have used Alt+F1).

LIBPATH is not an environment variable (in config.sys there is a line that starts with LIBPATH=..., but not a line that starts with SET LIBPATH=...).
So trying to use %LIBPATH% does not work.

Seeing all environment variables is easy: on a commandline type

SET | more

(or pipe the output of SET to a file: SET > somefile.name)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4984
  • Karma: +110/-1
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #8 on: July 28, 2024, 11:57:14 pm »
Also the env command will list all variables. env | less

Andi B.

  • Hero Member
  • *****
  • Posts: 852
  • Karma: +11/-2
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #9 on: July 29, 2024, 08:52:35 am »
Quote
Unfortunately it is not possible to use PMDLL when booted to a commandline, and I don't know about an existing VIO-equivalent.
chkdll32.exe. Not tested if it works from ALT-F1.

Lars

  • Hero Member
  • *****
  • Posts: 1351
  • Karma: +69/-0
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #10 on: July 29, 2024, 03:49:40 pm »
The problem is not that a DLL could not be found as that should show up as a load error.

The problem is that starting unzip.exe simply hangs the (boot) commandline, a simple "unzip.exe" will not even show the help text (listing the options).

As others have already stated, the older UNZIP 5.52 is linked against the very basic OS/2 DLLs (like DOSCALLS, MSG etc.) and works just fine.

Lars

  • Hero Member
  • *****
  • Posts: 1351
  • Karma: +69/-0
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #11 on: July 29, 2024, 03:52:33 pm »
Could unzip or more likely, one of its dependents have WINDOWAPI declared in a DEF file? I quickly looked at the source of unzip and the def file hasn't been changed in ages and is simply, https://github.com/bitwiseworks/unzip-os2/blob/master/os2/unzip.def
Code: [Select]
NAME WINDOWCOMPAT NEWFILES
DESCRIPTION 'The world-famous Info-ZIP unarchiving utilities'
; SEGMENTS
;   _MSGSEG32 CLASS 'CODE'

Not sure if it is currently used.

But the DEF file says WINDOWCOMPAT and that is the correct value to use.
But NEWFILES is suspicious. At least, it should no longer be necessary under OS/2 32-bit.

« Last Edit: July 29, 2024, 03:55:32 pm by Lars »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4984
  • Karma: +110/-1
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #12 on: July 29, 2024, 04:52:40 pm »
I was wondering about the dependencies, which are few. Does bzip2 run under the command prompt?

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4940
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #13 on: July 29, 2024, 05:50:36 pm »
I was wondering about the dependencies, which are few. Does bzip2 run under the command prompt?
On F2 boot mode, bzip2.exe also hangs without giving any message.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1599
  • Karma: +4/-2
    • View Profile
Re: Unzip Version 6.0 hangs when booting to a commandline
« Reply #14 on: July 29, 2024, 09:54:10 pm »
The modern ZIP.EXE does not work in a command line boot. Use
Code: [Select]
C:\sys\install\ZIP2.EXEwhich is the OLD standalone ZIP.  note that the OLD ZIP cannot do files larger than 2GB (in, or out).