Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

i absolutely cannot install Text::CSV_XS. when i try to make it from source:
~/Text-CSV_XS-0.23# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Text::CSV_XS ~/Text-CSV_XS-0.23# make cp CSV_XS.pm blib/lib/Text/CSV_XS.pm /usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share +/perl/5.8/ExtUtils/typemap CSV_XS.xs > CSV_XS.xsc && mv CSV_XS.xsc C +SV_XS.c cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-s +trict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/inclu +de -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.23\ +" -DXS_VERSION=\"0.23\" -fPIC "-I/usr/lib/perl/5.8/CORE" CSV_XS.c cc1: error: unrecognized option `-Wdeclaration-after-statement' make: *** [CSV_XS.o] Error 1 ~/Text-CSV_XS-0.23#
and to be honest, I dont know what any of that means...and when I try to install it with the CPAN module, it spits up the same crap...please help me!

Replies are listed 'Best First'.
Re: Can't install Text::CSV_XS...
by jZed (Prior) on Aug 02, 2006 at 22:41 UTC
    Alternately, if you are using linux and want to skip monkeying with gcc, a pre-packaged version may be available. For example on Debian Sarge you can just do this:
    apt-get install libtext-csv-perl
      Note that this isn't Text::CSV_XS... it's the similar, but not identical Text::CSV. Text::CSV_XS doesn't appear to be in Debian.

      Nevermind... this is the correct module. For some reason the package just doesn't follow Debian's usual perl module naming convention and has a misleading summary.

Re: Can't install Text::CSV_XS...
by Fletch (Bishop) on Aug 02, 2006 at 20:03 UTC

    You're trying to compile the module with a different C compiler than your perl binary was made with (or at least the one it thinks it's configured to use). Check that you haven't upgraded to a newer C compiler (or upgraded to a newer binary perl and not a suitable similar vintage cc), or that someone's changed your PATH and you're picking it up from somewhere else. Also wouldn't hurt to give a bit more information like what OS this is on (I'm guessing Linux by the -DDEBIAN, but more specifics might be useful).

    Addendum: And if none of that makes sense, it's time to go prostrate yourself before your local sysadmin or C guru and see if they can't get things straightened out.

Re: Can't install Text::CSV_XS...
by Joost (Canon) on Aug 02, 2006 at 20:32 UTC