Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

bart (450)

Journal of bart (450)

Sunday February 19, 2006
05:14 AM

PXPerl + MinGW: the DLL files are too big

[ #28730 ]

Eek. I hate this. It's one of the reasons why I dispise working with C.

The DLLs built with PXPerl+MinGW are just too big. I tried this code:

use Inline C => <<'END_OF_C_CODE';
 
END_OF_C_CODE

That's right, an empty library, and the resulting DLL was a whopping 249k!

Urgh, not that nightmare again...

So I checked more DLLs includes with the distribution, and those built by MinGW, and the latter are all huge. For example, the DLL for HTML::Parser that comes in the distro, version 3.45, is 60kB... the one built with MinGW, using

test GAAS/HTML-Parser-3.45.tar.gz

in the CPAN shell, is 347kB!!!

WTF is all this junk, and is it possible to make this much smaller?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Scanning the web a little, plus my previous (bad) experiences with C compilers, made me look up a "strip" option, to "remove (debugging) symbols from the executables". I found that for MinGW, I need the -s [spacejack.org] flag.

    So I edited the "linker flags for DLLs", from

    -mdll

    to

    -mdll -s

    (For this, you have to run configure_pxperl.)

    Now, the HTML::Parser DLL is reduced to 40k (yay! I never expected it to work so well!), and the empty Inline DLL is 7k. Great.

    This should be a standard enabled option in PXPerl's configurat

  • I just checked, and VanillaPerl [sourceforge.net], which is built with mingw using perl5.8.8's win32/Makefile, has this option on by default.

    I downloaded and built HTML-Parser v3.45; the dll is 38.5kB.

    • Thanks for pointing me to VanillaPerl, I hadn't heard of it before. Well, seen it has had only 7 downloads until today, I think I'm not the only one. But it looks promising. A MinGW compiled perl that includes the compiler it was built with, is always very interesting.

      So CamelPack is a SourceForge project now, is it? Nice. And VanillaPerl is part of the grand project. Also nice.

      I am still planning on pushing forward with this PXPerl+MinGW combination. If I don't, it looks like nobody will. And that would be
      • PXPerl definitely has a different target 'audience' than VanillaPerl, which was just put together for Adam Kennedy's recent beer challenge; it's just the core modules; so it won't meet everyone's requirements.

        I'm currently just sending as many rt.cpan bug reports as I can, with the hope of getting as many modules as possible working on windows with cpan.pm, rather than start maintaining yet-another perl distro.
    • Off topic I know but: Any ideas on how to use MinGW and dmake to compile Apache under Windows?

      ron@savage.net.au