in reply to New release of Text::CSV_XS won't build on Windows, prob a gcc input error (CygwinPerl)

Given your setup, where you have both Strawberry Perl and Cygwin intermixed, and given that we know you've had problems in the past (It's Tuesday, so it must be the day for Trouble With Cpan and Funny-business with Win32 extension module build, as two examples) where Cygwin interferes with your Strawberry setup, I am highly suspicious that now you've got your Strawberry interfering with your Cygwin.

When you're trying to do something in Cygwin -- whether it's installing the module in the Cygwin system perl or trying to run perlbrew to install another perl in Cygwin -- you need to make sure that your paths are all pointing where you think they are, and that they aren't pointing to a conglomeration of Strawberry and Cygwin locations.

echo $PATH which perl which cpan which cpanm which perlbrew which gcc perl -V gcc -v

At this point, your intial post when asking for help with installing anything should include all that information (or the equivalent with cmd.exe's where or powershell's Get-Command, depending on which environment you are trying to use; I listed the linux-style which this time, since you're currently in the Cygwin environment), because otherwise the monks will waste their time assuming you have a sane setup, and only after half a dozen posts or more will it come out that there's interference between the two yet again.

I am curious why you have both Cygwin and Strawberry. It seems to me that you'd have a lot better luck in your perl module endeavors if you'd just pick one and become fluent in it. If there's a good reason, there's a good reason... but then you should consider figuring out how to keep the two completely separate from each other (make sure that your path in cmd.exe only shows Strawberry and nothing Cygwin, and that your path in Cygwin only shows its options and nothing from Strawberry).

  • Comment on Re: New release of Text::CSV_XS won't build on Windows, prob a gcc input error (CygwinPerl)
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: New release of Text::CSV_XS won't build on Windows, prob a gcc input error (CygwinPerl)
by kcott (Archbishop) on Aug 02, 2025 at 20:14 UTC

    G'day pryrt,

    "I am curious why you have both Cygwin and Strawberry."

    I don't know what Intrepid's reasons are but I don't think that situation is particularly unusual. I have a diverse collection of Perls for home and $work use:

    • Cygwin System Perl — only used for demonstation purposes as in this thread.
    • Perlbrew Perls (currently nine versions) sitting on Cygwin — used directly for home/personal use.
    • Strawberry Perls (several versions; couldn't be bothered to count them) — used for some specific $work projects.
    • ActivePerl (no longer used but it's still floating around somewhere) — was used for a specific $work project.
    • And I ssh from Perlbrew Perls Cygwin (typically via bash scripts)[Updated: 14/8/25] to a variety of $work Linux systems with their own Perl versions.

    You're quite correct in that these need to be managed. I recall that I used to have some issues. I sorted all of this out many years ago and I now have no problems with this many Perl versions.

    — Ken

Re^2: New release of Text::CSV_XS won't build on Windows, prob a gcc input error (CygwinPerl)
by Intrepid (Curate) on Aug 09, 2025 at 17:38 UTC

    Hi, all. I just installed the CPAN module XS::Parse::Sublike using my system CygwinPerl and the build and test and install worked just as it ought to, and as it has before, many times, with XS (C-extension) modules being added on my system. The only difference I see with Text::CSV_XS is that it requires a call to g++ because C++ code is being used.

    I understand the point you are making, pryrt, and I appreciate the advice. I will try to provide full information about my system in the future. I don't want to waste the monks' time or frustrate anyone.

    Aug 09, 2025 at 17:37 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)

      You don't need to manually install Text::CSV_XS version 1.61 — just update Cygwin.

      As I said last week, I typically update Cygwin weekly (usually on a Friday). Here's a reminder of the code I posted then:

      $ /usr/bin/perl -Mstrict -Mwarnings -E ' use Text::CSV_XS; say "Perl version: $^V"; say "Perl location: $^X"; say "Text::CSV_XS version: $Text::CSV_XS::VERSION"; say "Text::CSV_XS location: $INC{q{Text/CSV_XS.pm}}"; ' Perl version: v5.40.2 Perl location: /usr/bin/perl Text::CSV_XS version: 1.60 Text::CSV_XS location: /usr/lib/perl5/vendor_perl/5.40/x86_64-cygwin-t +hreads/Text/CSV_XS.pm

      When I updated Cygwin last Friday (i.e. 3 days ago) I noticed (amongst other changes) that Text::CSV_XS was updated to version 1.61 — here's what I get when I run the same code today:

      $ /usr/bin/perl -Mstrict -Mwarnings -E ' use Text::CSV_XS; say "Perl version: $^V"; say "Perl location: $^X"; say "Text::CSV_XS version: $Text::CSV_XS::VERSION"; say "Text::CSV_XS location: $INC{q{Text/CSV_XS.pm}}"; ' Perl version: v5.40.3 Perl location: /usr/bin/perl Text::CSV_XS version: 1.61 Text::CSV_XS location: /usr/lib/perl5/vendor_perl/5.40/x86_64-cygwin-t +hreads/Text/CSV_XS.pm

      I still recommend Perlbrew. ☺️

      Update: The second block of code had the start of the command twice; probably a copy-paste error; fixed.

      — Ken