Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl CSV_XS module installation failed using Cygwin

Tags:

cygwin

perl

I am having problems installed a CPAN module Text::CSV_XS using Cygwin.

I did a

$ cpan Text::CSV_XS
CPAN: Storable loaded ok (v2.20)
.... Every was good till:.....

Writing Makefile for Text::CSV_XS
cp CSV_XS.pm blib/lib/Text/CSV_XS.pm
/usr/bin/perl.exe /usr/lib/perl5/5.10/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5 .10/ExtUtils/typemap  CSV_XS.xs > CSV_XS.xsc && mv CSV_XS.xsc CSV_XS.c
gcc-4 -c    -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -p ipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3    -DVERSION=\"0.8 8\"  -DXS_VERSION=\"0.88\"  "-I/usr/lib/perl5/5.10/i686-cygwin/CORE"   CSV_XS.c
/bin/sh: gcc-4: command not found
Makefile:330: recipe for target `CSV_XS.o' failed
make: *** [CSV_XS.o] Error 127
  HMBRAND/Text-CSV_XS-0.88.tgz
  make -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

I installed another module earlier, without problem.

Make is installed
gcc is installed

/bin/sh returns a new shell.

$ /bin/sh

$
like image 466
B 1 Avatar asked Dec 13 '22 01:12

B 1


2 Answers

Important note: as of this writing, gcc4 is now in the obsolete packages section which is hidden by default in the Cygwin installer.

like image 65
John Francis Avatar answered Jan 07 '23 04:01

John Francis


Fire up the Cygwin packagre manager (setup.exe) and install gcc4. Use the search facility to locate the package in the manager. While you're at it, also install make, autoconf and automake. You'll find all these packages in the devel section.

Then retry, it will succeed, I just tested it:

MiLu@Dago: ~ > cpan Text::CSV_XS
...
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Text/CSV_XS/CSV_XS.bs
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Text/CSV_XS/CSV_XS.dll
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/Text/CSV_XS.pm
Installing /usr/share/man/man3/Text.CSV_XS.3pm
Appending installation info to /usr/lib/perl5/5.10/i686-cygwin/perllocal.pod
  HMBRAND/Text-CSV_XS-0.88.tgz
  /usr/bin/make install  -- OK
like image 38
Lumi Avatar answered Jan 07 '23 05:01

Lumi