I'm trying to install a module (Package::Stash::XS) via cpanm, but the installation is failing due to a gcc error. The command
gcc -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -O3 -DVERSION=\"0.28\" -DXS_VERSION=\"0.28\" "-I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE" XS.c
fails with the error:
XS.xs:1:20: fatal error: EXTERN.h: No such file or directory compilation terminated.
at the line
#line 1 "XS.xs" #include "EXTERN.h"
However, the file EXTERN.h does exist in the -I included /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE :
$ ls /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/E* /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/EXTERN.h
What could the issue be, and how can I make the compilation successful? I've tried changing the -I to -iquote (though gcc manual does say double quoted includes also eventually use -I), but that doesn't help. My first thought was it was a permission issue, but this is Cygwin and cpanm is running as me and I do have read access to EXTERN.h and exec access on the CORE directory.