I want it the way I want it.

I got around to trying my own suggestion for altering the Config for StrawberryPerl in the manner I proposed, in the discussion over here, recently. I had said:

So a superior approach might be to set cc in the Perl Config-heavy.pl file to the fully-qualified pathname where the mingw gcc that's shipped with Strawberry is installed. That way the right gcc is always called:

Strawberry's setup program alters the MSWindows system PATH (%Path%) env var but that's inherently fragile when something later (like a brain-damaged user or other software setup program) could come along and clobber that.

The results thus far have not been ok. The error seen pertains to how EU::MM is deciding what the semantics for invoking the link step of extention library file creation ought to be... see Link: extracted snippet from the Makefile generated by ExtUtils::MakeMaker on Strawberry, showing how it tells make to direct the compilation of the extention lib (in this case, for the extension module List::MoreUtils).

Those familiar with the technicalities of the GNU ld linker and how gcc syntax for its invocation works will recognize that -out: and -def: are completely unGNUish and in fact are the parameter syntax for the Microsoft linker.

This is drearily familiar because this is what using Perl the way I want to on MS Windows has always been like. Things often "almost work" but not quite. In this case what I believe is happening is that somewhere in the depths of the MakeMaker apparatus, somebody coded a fragile, over-simplified test for the Config value of cc; and if it is not just plain gcc in Config, the apparatus decides that 'that other compiler' (Microsoft's cl.exe) must be the one available. I am surely going to check that out and see if I'm right ...

Ok, checked, and it's the line in ExtUtils::MM_Win32 that does
my $GCC     = $Config{'cc'} =~ /^gcc/i ? 1 : 0;
that is responsible for this badness. That was a piece of coding lacking in foresight if ever I have seen one. How about a more reasonable, reliable, flexible
my $GCC     = ($Config{'cc'} =~ /^gcc/i or $Config{'cc'} =~ /gcc(?:\.exe)?$/i) ? 1 : 0;
instead?

It is such a bummer that the way adding modules on MS Windows works, is based on these contortions deemed necessary for the historical MS Studio tools etc, then awkwardly twisted back to the GNU toolset provided by the MinGW project. MinGW GCC + friends are basically the familiar *nix tools and work so very similarly, yet where Perl is concerned MinGW's gcc is some half-known mystery that can barely be dealt with. Apparently that's 'OK' because the main port of Perl to MS Windows is fashioned in such a way as to build and interoperate mainly with the Microsoft proprietary development system ;-/.

What I am truly wishing for is a way to override ExtUtils::MM_Unix code with MinGW-compatible syntax only instead of going anywhere near that damn ExtUtils::MM_Win32 module. ;-/

The other thing I am most wishing for from Strawberry and similar Win32 perls is that the GNU make tool can be chosen to build CPAN modules, instead of the dmake program. I know GNU make inside and out and use it for building all my other software. It's apparently still a notion out there that "GNU make on Windows as MinGW provides it, isn't working well enough to build Perl modules"; but MinGW's build of GNU make now reflects steady improvement and is perfectly up to that task. And it's bundled as part of the MinGW included in StrawberryPerl.

Node Updates
27 Oct 2008 UTC

Wanted to mention Link: ExtUtils::MM_Win32's method for creating the link step make recipe (sub dynamic_link) …for deeper meditations.

Two in the box, ready to go!
We be fast and they be slow!
      — GhostBusters II

    Soren Andersen / “somian” / “perlspinr”


In reply to EU::MM, StrawberryPerl, Gnu make ... by Intrepid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.