in reply to Funny-business with Win32 extension module build

Given It's Tuesday, so it must be the day for Trouble With Cpan, I am not convinced you have your Strawberry Perl build environment setup correctly yet with the standard cpan client. When you say you ran the make step, to be clear, did you mean you used some other make like the cygwin make in the other conversation, or are you 100% certain you are using the gmake from Strawberry Perl?

Instead of using the standard client, with Strawberry, I've always used cpanm , because it's always "just worked" for me -- the builds are reliable, and there are no extra steps needed.

To give more details, I will use the cpanm-enabled version of the "standard incantation":

cpanm --look Win32::Exe perl Makefile.PL gmake gmake test

The --look puts me into the download-and-build directory, so I can manually run the other steps. Otherwise, cpanm Win32::Exe would have just built and installed the module for me, without any difficulty, and without having to remember which make/dmake/gmake to use (there was some confusion briefly when Strawberry switched from dmake to gmake, but it's been highly consistent since then, and I doubt that will change again anytime soon), or any such thing.

That incantation builds and tests just fine for me, as seen in the spoiler below. Since you chose not to share the other information from your build, which may have given more clues as to your problem, I will just say "make sure your build environment is right and you are using the right executables; especially check to make sure that you are running the Strawberry Perl versions of various executables rather than something in your cygwin setup; where cpan and where cpanm and where gmake and the like are your friend."

Replies are listed 'Best First'.
Re^2: Funny-business with Win32 extension module build
by Intrepid (Curate) on Jun 05, 2025 at 00:57 UTC

    pryrt wrote:

    Given It's Tuesday, so it must be the day for Trouble With Cpan, I am not convinced you have your Strawberry Perl build environment setup correctly yet with the standard cpan client. When you say you ran the make step, to be clear, did you mean you used some other make like the cygwin make in the other conversation, or are you 100% certain you are using the gmake from Strawberry Perl? Instead of using the standard client, with Strawberry, I've always used cpanm , because it's always "just worked" for me -- the builds are reliable, and there are no extra steps needed.

    I can assure you all that I have the right 'make' now, after the debacle with "It's Tuesday, ..." ;-). When I said the make step I was speaking generically, what I actually typed was gmake. And I went through my Config.pm for CPAN to see that the options were set right for portable Strawberry v5.40.2 on my USB drive.

    But your instincts were working fine. I ignored the .bat file that comes with portable Strawberry after taking a brief glance at it, and what I hadn't fixed was $PATH. I was working in a cygwin bash shell in a terminal emulator instead of being dropped into a CMD shell, with appropriate shell variables set, by the bat file. Long story shortened: that was cygwin's gcc running into trouble, not Strawberry's.

    Your reply really helped me out and I successfully built Win32::Exe, 100% tests ok, and I think I am going to be having some clear sailing now (at least until the next time I do something foolish).

    Jun 05, 2025 at 00:56 UTC

    A just machine to make big decisions
    Programmed by fellows (and gals) with compassion and vision
    We'll be clean when their work is done
    We'll be eternally free yes, and eternally young
    Donald Fagen —> I.G.Y.
    (Slightly modified for inclusiveness)