Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

EU::MM, StrawberryPerl, Gnu make ...

by Intrepid (Deacon)
on Oct 26, 2008 at 20:31 UTC ( #719665=perlmeditation: print w/ replies, xml ) Need Help??

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:

  • Config_heavy.pl: cc='gcc'
  • becomes: cc='C:/strawberry/c/bin/gcc'

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

Comment on EU::MM, StrawberryPerl, Gnu make ...
Select or Download Code
Re: EU::MM, StrawberryPerl, Gnu make ...
by ysth (Canon) on Oct 26, 2008 at 20:49 UTC
Re: EU::MM, StrawberryPerl, Gnu make ...
by Anonymous Monk on Oct 27, 2008 at 07:29 UTC
    I think what you want is your own Perl::Dist, I know I do (no release notes for strawberryperl bugs me)
Re: EU::MM, StrawberryPerl, Gnu make ...
by jeffa (Chancellor) on Oct 27, 2008 at 18:00 UTC

    I want to drink water. But I don't want to use a cup. I want to use a fork. Now, I know most people use a cup to drink water, but that's not how I want to drink water. I want to use a fork. In fact, it is my God given birth right to do so. I think there's even an amendment in the Constitution. I have been working on this chosen method to drink water and so far the results have been tedious and painful.

    I'm sorry dude, it's just that every single time i read what you are working on I cannot figure out why you consistently try to drink water with a fork when their are perfectly good cups out there. I guess part of being intrepid is not doing what every one else does -- because they do it with such ease and flair.

    STRUGGLE!!!!!! STRUGGLE!!! ;)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

      jeffa wrote in followup 719796:

      I'm sorry dude, it's just that every single time i read what you are working on I cannot figure out why you consistently try to drink water with a fork when their are perfectly good cups out there. I guess part of being intrepid is not doing what every one else does -- because they do it with such ease and flair.

      STRUGGLE!!!!!! STRUGGLE!!! ;)

      LOL. Yeah! I don't have much difficulty seeing how my posts would prompt such a reaction ;-). It's pretty arcane stuff to begin with — like, why is this guy using MS Windows if he wants to do complex stuff with CPAN modules and all??. It is easy to think that I ought to just only do any of it on a free *nix platform where it is all so native and smooth. ;-)

      I think you have it right: It's just part of what being Intrepid is about ;-).

      Back a few years: I wasn't using Linux™ or anything like it, though, and in fact the Windows port of Perl (mostly by Gurusamy Sarathy) had just been "finished" and ActiveState was just a little startup... etc. My itch to see Perl on Windows work better goes back that long. It's a long-lived itch.

      I talked with Tye McQueen on Perlmonks years ago about creating a binary distro of Perl for Windows using the Free GNU gcc tools from MinGW, long before Strawberry existed. I keep thinking about this stuff – experiencing this itch – and that makes me look with particular intensity at how the current efforts, like StrawberryPerl, work.

      One thing that really itches for me in particular is that few people really understand how dmake works, but we still rely on it for building Perl on a Windows platform. I have an uncomfortable feeling any time a black box is involved in something I am particularly interested in. It's been a necessary evil(?) all this time but I wonder if it has to stay that way.

      Regards!,

        I forgot to add the part where I first walk into a restaurant and announce my needs. Since the restaurant serves water -- they clearly should be able to address my needs, right?

        Why don't you just join the Strawberry Perl project?

        jeffa

        L-LL-L--L-LL-L--L-LL-L--
        -R--R-RR-R--R-RR-R--R-RR
        B--B--B--B--B--B--B--B--
        H---H---H---H---H---H---
        (the triplet paradiddle with high-hat)
        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://719665]
Approved by Corion
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-12-25 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls