I'm at it again: reveling in debugging the build of Someone Else's Code ;-). In this case, Someone is H. Merijn Brand with his recent release of Text::CSV_XS on CPAN.


EDIT

I don't want to give a false impression of my motivations, and where I wrote above that I "revel in debugging ..." I could be misunderstood. I don't take pleasure in calling anyone out for lack of skill, lack of knowledge, or carelessness. Rather, I revel in having a problem I can apply my own efforts to solving while seeing contributions from my fellow nuns and monks who spot things that I have missed. The collaboration is what I revel in. Thanks, now back to the matter at hand.


Looking closely at the compiler-related messages below, two things stand out as strange (see below in the "On Cygwin Perl..."):

-ffile-prefix-map=/mnt/share/cygpkgs/perl/perl.x86_64/build=/usr/src/debug/perl-5.40.2-1

-and-

-ffile-prefix-map=/mnt/share/cygpkgs/perl/perl.x86_64/src/perl-5.40.2=/usr/src/debug/perl-5.40.2-1

I don't have those paths, and self-evidently anything that starts with /mnt/ is not going to be portable, anyhow.

What happens on Gnu/Linux:

cp CSV_XS.pm blib/lib/Text/CSV_XS.pm Running Mkbootstrap for CSV_XS () chmod 644 "CSV_XS.bs" "/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_ +XS.bs blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644 "/usr/local/bin/perl" "/usr/local/lib/perl5/site_perl/ExtUtils/xsubpp" + -typemap '/usr/local/lib/perl5/5.40.1/ExtUtils/typemap' CSV_XS.xs +> CSV_XS.xsc mv CSV_XS.xsc CSV_XS.c cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe +-fsORTIFY_SOURCE=2 -O2 -DVERSION=\"1.61\" -DXS_VERSION=\"1.61\" -fP +IC "-I/usr/local/lib/perl5/5.40.1/i686-linux-gnu-thread-multi/CORE" + CSV_XS.c rm -f blib/arch/auto/Text/CSV_XS/CSV_XS.so cc -shared -O2 -L/usr/local/lib -fstack-protector-strong CSV_XS.o - +o blib/arch/auto/Text/CSV_XS/CSV_XS.so \ \ chmod 755 blib/arch/auto/Text/CSV_XS/CSV_XS.so Manifying 1 pod document

On Cygwin Perl 5.40.2 with gcc 13.4.0 what happens:

[MSG] [Thu Jul 31 18:03:07 2025] Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Text::CSV_XS Writing MYMETA.yml and MYMETA.json [MSG] [Thu Jul 31 18:03:07 2025] DEFAULT 'filter_prereqs' HANDLER RETU +RNING 'sub return value' [ERROR] [Thu Jul 31 18:03:23 2025] MAKE failed: No such file or direct +ory cp CSV_XS.pm blib/lib/Text/CSV_XS.pm Running Mkbootstrap for CSV_XS () chmod 644 "CSV_XS.bs" "/usr/bin/perl.exe" -MExtUtils::Command::MM -e 'cp_nonempty' -- CSV_XS +.bs blib/arch/auto/Text/CSV_XS/CSV_XS.bs 644 "/usr/bin/perl.exe" "/usr/local/share/perl5/site_perl/5.40/ExtUtils/xs +ubpp" -typemap '/usr/share/perl5/5.40/ExtUtils/typemap' CSV_XS.xs > + CSV_XS.xsc mv CSV_XS.xsc CSV_XS.c gcc -c -U__STRICT_ANSI__ -D_GNU_SOURCE -ggdb -O2 -pipe -Wall -Werror +=format-security -D_FORTIFY_SOURCE=3 -fstack-protector-strong --param +=ssp-buffer-size=4 -ffile-prefix-map=/mnt/share/cygpkgs/perl/perl.x86 +_64/build=/usr/src/debug/perl-5.40.2-1 -ffile-prefix-map=/mnt/share/c +ygpkgs/perl/perl.x86_64/src/perl-5.40.2=/usr/src/debug/perl-5.40.2-1 +-fwrapv -fno-strict-aliasing -DUSEIMPORTLIB -O3 -DVERSION=\"1.61\" +-DXS_VERSION=\"1.61\" "-I/usr/lib/perl5/5.40/x86_64-cygwin-threads/C +ORE" CSV_XS.c rm -f blib/arch/auto/Text/CSV_XS/CSV_XS.dll g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,- +-enable-auto-image-base -fstack-protector-strong CSV_XS.o -o blib/a +rch/auto/Text/CSV_XS/CSV_XS.dll \ /usr/lib/perl5/5.40/x86_64-cygwin-threads/CORE/cygperl5_40.dll -lpth +read -ldl -lcrypt \ make: *** [Makefile:484: blib/arch/auto/Text/CSV_XS/CSV_XS.dll] Aborte +d make: *** Deleting file 'blib/arch/auto/Text/CSV_XS/CSV_XS.dll' [ERROR] [Thu Jul 31 18:03:23 2025] Unable to create a new distribution + object for 'Text::CSV_XS' -- cannot continue

If anyone running CygPerl on Windows gets a different result trying to build Text::CSV_XS, please let me know in the thread, thanks.

    - Soren

Aug 01, 2025 at 21:39 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)


In reply to New release of Text::CSV_XS won't build on Windows, prob a gcc input error (CygwinPerl) 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.