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

G'day Soren,

I believe that I've warned you in the past about working directly with Cygwin's System Perl (/usr/bin/perl). If you update to the latest Cygwin Perl (v5.40.2), you'll get Text::CSV_XS version 1.60. I do Cygwin updates regularly; most recently was Friday evening (~24hrs ago).

$ /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

I'm also reasonably certain that I recommended using Perlbrew. I updated to the lastest Perl (v5.42.0) this morning (~12hrs ago); I also installed the latest Text::CSV_XS from CPAN (version 1.61) along with many other modules.

Using Perlbrew to switch between Perl versions, and using the above code but starting with perl -Mstrict -Mwarnings -E (i.e. no /usr/bin/), here's the output using recent Perl versions:

Perl version: v5.38.0 Perl location: /home/ken/perl5/perlbrew/perls/perl-5.38.0/bin/perl Text::CSV_XS version: 1.50 Text::CSV_XS location: /home/ken/perl5/perlbrew/perls/perl-5.38.0/lib/ +site_perl/5.38.0/cygwin-thread-multi/Text/CSV_XS.pm Perl version: v5.40.0 Perl location: /home/ken/perl5/perlbrew/perls/perl-5.40.0/bin/perl Text::CSV_XS version: 1.54 Text::CSV_XS location: /home/ken/perl5/perlbrew/perls/perl-5.40.0/lib/ +site_perl/5.40.0/cygwin-thread-multi/Text/CSV_XS.pm Perl version: v5.42.0 Perl location: /home/ken/perl5/perlbrew/perls/perl-5.42.0/bin/perl Text::CSV_XS version: 1.61 Text::CSV_XS location: /home/ken/perl5/perlbrew/perls/perl-5.42.0/lib/ +site_perl/5.42.0/cygwin-thread-multi/Text/CSV_XS.pm

Consider leaving Cygwin's System Perl for Cygwin's use and start using Perlbrew for your own use and experimentation.

I'm fairly sure that solutions other than Perlbrew exist. I'm not familiar with these; perhaps another monk can advise you.

— Ken

  • 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 Intrepid (Curate) on Aug 02, 2025 at 18:26 UTC

    Ken, you are the person advocating for me to use perlbrew ;-) so I am going to toss this your way and ask if you have any suggestions. I had perlbrew installed for months but there was some initial trouble getting it to work and so I never built any perl using it. Today I tried again and unfortunately some tests failed:

      Failed tests:  269-270, 275-276, 281-282, 287-288, 293-294
                    299-300, 305-306, 311-312, 317-318, 323-324
                    329-330, 335-336, 341-342, 347-348, 353-354
                    359-360, 365-366, 371-372, 377-378, 383-384
                    389-390, 395-396, 401-402, 407-408
      Non-zero exit status: 48
    Files=2930, Tests=1351653, 907 wallclock secs (146.98 usr 139.20 sys + 1447.43 cusr 1224.94 csys = 2958.56 CPU)
    Result: FAIL
    Finished test run at Sat Aug  2 14:05:14 2025.
    make: *** (GNUmakefile:853: test_harness) Error 1
    perl-5.42.0 is successfully installed.  <-- ha ha
    perl-5.42.0 is not installed  <-- ha ha
    

    I naturally went for the newest perl release, 5.42.0.:

    perlbrew install -v -j 5 --switch --thread --multi --64all perl-5.42.0

    Any ideas? Try with an older release maybe?

        — Soren

    Aug 02, 2025 at 18:22 UTC


      FWIW, I have no experience with Perlbrew. I don't see the point of it. I actually hate it - which is quite irrational (isn't all hatred ?) given that I've never tried it.
      For mine, I just build perl in the normal way by running 'Configure', 'make test', 'make install' and finally 'make distclean' (in prepraration for the next build, of a different configuraton).

      So, for my stock standard build of perl-5.42.0, I started with:
      sh Configure -des -Dusethreads -Dusemultiplicity -Dprefix=/cygdrive/c/cygperl-5.42.0-d -Dlibpth=/lib/gcc/x86_64-pc-cygwin/11

      For my -Duselongdouble build:
      sh Configure -des -Dusethreads -Dusemultiplicity -Dprefix=/cygdrive/c/cygperl-5.42.0-ld -Dlibpth=/lib/gcc/x86_64-pc-cygwin/11 -Duselongdouble

      And for my -Dusequadmath build:
      sh Configure -des -Dusethreads -Dusemultiplicity -Dprefix=/cygdrive/c/cygperl-5.42.0-q -Dlibpth=/lib/gcc/x86_64-pc-cygwin/11 -Dusequadmath

      I think I need that '-Dlibpth' switch only because I want the quadmath library to be automatically found for all 3 builds.
      For you, I think that directive would end with "13" instead of "11", but I'm only guessing ... and it might even be the case that, with your gcc-13, there's no need for that directive any more.

      I regularly hit a failing test in t/porting/exec-bit.t, and in one other file (I forget which).
      My Cygwin installation is a few years old - your Cygwin might fare better.
      Those couple of failures don't bother me at all, and I've not reported them.

      I select which perl I want to use by running (eg):
      export PATH=/cygdrive/c/cygperl-5.42.0-d/bin:$PATH

      If I want to switch to a different perl I just run (eg):
      export PATH=/cygdrive/c/cygperl-5.42.0-q/bin:$PATH

      On cygwin I have (double, longdouble and quadmath builds) of perls 5.36.0, 5.38.0, 5.40.0, and 5.42.0.
      It's easy to handle, and I'm not about to bother with perlbrew.
      Of course, those who do want to use perlbrew for whatever purpose, are entitled to do so.

      Cheers,
      Rob

      It's been quite a few years since I set up Cygwin & Perlbrew. I'll provide what information I can: some current and some quite old.

      My current Win10 — what I see when I start cmd.exe:

      Microsoft Windows [Version 10.0.19045.6159] (c) Microsoft Corporation. All rights reserved. C:\Users\ken>

      My current system (Cygwin) information:

      $ uname -a CYGWIN_NT-10.0-19045 titan 3.6.4-1.x86_64 2025-07-15 07:55 UTC x86_64 +Cygwin

      I originally set up Cygwin using the installer on the Cygwin site; I have updated that many times over the years (currently at 3.6.4).

      As far as I remember, I originally set up Perlbrew from the instructions on that page:

      For a quick installation, do this:

      \curl -L https://install.perlbrew.pl | bash

      It would appear that I did this about six years ago and haven't changed it since:

      $ which perlbrew /home/ken/perl5/perlbrew/bin/perlbrew $ ls -l /home/ken/perl5/perlbrew/bin/perlbrew -rwxr-xr-x 1 ken None 1316905 Jul 26 2019 /home/ken/perl5/perlbrew/bi +n/perlbrew

      I've been installing Perl versions using instructions a little further down on that page. This is what I used yesterday.

      To install the latest stable release ...

      perlbrew install perl-5.42.0 perlbrew switch perl-5.42.0

      This installed Perl v5.42.0 cleanly on the first run; no test or other errors.

      I've also installed other Perl versions, stable & development, over the years:

      $ perlbrew list * perl-5.42.0 perl-5.40.0 perl-5.39.3 perl-5.38.0 perl-5.36.0 perl-5.34.0 perl-5.33.5 perl-5.32.0 perl-5.30.0

      I really can't help with the error information that you've posted. You may want to start (almost) from scratch:

      1. Get Cygwin up-to-date. I do this by downloading the Cygwin Installer (setup-x86_64.exe) then running that from Win10: File Explorer.
      2. Reinstall perlbrew using the instructions shown above.
      3. Reinstall Perl v5.42.0 using the instructions shown above.

      I'll also advise you to run the latest setup-x86_64.exe regularly — I generally aim to do this weekly so that it only takes some tens of minutes — otherwise you may find it takes hours if left for an extended period of time.

      Good luck!

      — Ken