• What is in those 6 megs? (Was: gawk on Windows)

    From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.lang.awk on Mon Aug 1 19:41:27 2022
    From Newsgroup: comp.lang.awk

    In article <b336bd42-7e88-c560-f176-653bd3988d7e@scorecrow.com>,
    Bruce Horrocks <07.013@scorecrow.com> wrote:
    ...
    Despite its small size it is self-contained so nothing further to install.

    Do you know what that version is? What compiler/development system, etc?
    That would explain why it is smaller than expected...

    (If it doesn't require any DLLs, is it "statically linked" ?)

    I've no idea why the Cygwin one is so big, tbh.

    I just checked my Cygwin gawk.exe file; it is 640,000 bytes long (yeah,
    exactly 640K - heh heh). I didn't compile this; I installed it from the repo(s), using the usual Cygwin installer.

    So, I'd imagine that that Cygwin gawk (the one OP references, that is 6M
    size) was statically linked - that is, it includes all the DLLs that would normally be kept as separate files. The main cygwin dll (cygwin1.dll) is
    3.5M, the MPFR one is 2.5M, the rest are trivially small, so the total size should come to about 7M. Of course, it you compile without MPFR support
    (which OP probably doesn't need), it could be substantially smaller.

    Maybe, just to help OP and to put this thread to rest, someone should take
    the time and effort to compile up a statically linked (and thus standalone) version of gawk.exe and make it available to OP on some web site.
    --
    The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL:
    http://user.xmission.com/~gazelle/Sigs/CLCtopics
    --- Synchronet 3.19c-Linux NewsLink 1.113
  • From Bruce Horrocks@07.013@scorecrow.com to comp.lang.awk on Mon Aug 1 23:39:53 2022
    From Newsgroup: comp.lang.awk

    On 01/08/2022 20:41, Kenny McCormack wrote:
    In article <b336bd42-7e88-c560-f176-653bd3988d7e@scorecrow.com>,
    Bruce Horrocks <07.013@scorecrow.com> wrote:
    ...
    Despite its small size it is self-contained so nothing further to install.

    Do you know what that version is? What compiler/development system, etc?

    The original website I linked to just states MinGW, so presumably the
    latest prior to gawk v5.1.0 being released. <http://vkiefel.de/compiled-SW.html>

    That would explain why it is smaller than expected...

    Personally I don't think it's smaller than expected at all. It's the
    Cygwin one that I find to be much larger than I would expect. :-)

    (If it doesn't require any DLLs, is it "statically linked" ?)

    I suspect it is dynamically linked against the POSIX compatibility
    libraries provided by Windows - but I would have to pull it apart to
    check that and I no longer have those kinds of tools to hand.


    I've no idea why the Cygwin one is so big, tbh.

    I just checked my Cygwin gawk.exe file; it is 640,000 bytes long (yeah, exactly 640K - heh heh). I didn't compile this; I installed it from the repo(s), using the usual Cygwin installer.

    So, I'd imagine that that Cygwin gawk (the one OP references, that is 6M size) was statically linked - that is, it includes all the DLLs that would normally be kept as separate files. The main cygwin dll (cygwin1.dll) is 3.5M, the MPFR one is 2.5M, the rest are trivially small, so the total size should come to about 7M. Of course, it you compile without MPFR support (which OP probably doesn't need), it could be substantially smaller. >
    Maybe, just to help OP and to put this thread to rest, someone should take the time and effort to compile up a statically linked (and thus standalone) version of gawk.exe and make it available to OP on some web site.
    --
    Bruce Horrocks
    Surrey, England
    --- Synchronet 3.19c-Linux NewsLink 1.113
  • From Igenlode Wordsmith@Use-Author-Supplied-Address-Header@[127.1] to comp.lang.awk on Tue Aug 2 12:12:25 2022
    From Newsgroup: comp.lang.awk

    On 1 Aug 2022 Kenny McCormack wrote:

    [snip]

    I just checked my Cygwin gawk.exe file; it is 640,000 bytes long (yeah, >exactly 640K - heh heh). I didn't compile this; I installed it from the >repo(s), using the usual Cygwin installer.

    So, I'd imagine that that Cygwin gawk (the one OP references, that is 6M >size) was statically linked - that is, it includes all the DLLs that would >normally be kept as separate files. The main cygwin dll (cygwin1.dll) is >3.5M, the MPFR one is 2.5M, the rest are trivially small, so the total size >should come to about 7M. Of course, it you compile without MPFR support >(which OP probably doesn't need), it could be substantially smaller.

    No, I'm not using floating-point arithmetic -- nothing more complicated
    than "title[workname]+=1" :-)


    Maybe, just to help OP and to put this thread to rest, someone should take >the time and effort to compile up a statically linked (and thus standalone) >version of gawk.exe and make it available to OP on some web site.

    I'm hoping that's what Bruce has located. (None of these versions
    showed up during my initial attempts at searching for "Windows 32-bit
    gawk" or "gawk for Windows" - everything I could find on the Web points
    to the GnuWin32 and ezwinports pages.)

    My main concern is that it may turn out to rely on the existence of
    resources that are taken for granted on a programmer's machine but are
    not present by default on a 'clueless' user's laptop; I don't even know
    what version of Windows she is using. I did ask, but I think the
    question rather got lost amid the other issues...

    However, we shall find out, or may find out, *next* weekend. I have to
    say that if I'd had any idea getting a 'portable' 7Kb script to run
    under Windows would be this difficult I should never have suggested it -
    it just occurred to me that this was one piece of software I'd written
    that she *might* be able to use, since she was complaining about the
    same problem that I'd written it to solve :-(
    --
    Igenlode Visit the Ivory Tower http://ivory.ueuo.com/Tower/

    its: belonging to it - it's: "it is" (contraction )

    --- Synchronet 3.19c-Linux NewsLink 1.113