Ben, It seems that, with solaris's cc, if a file test.c has a directive like
#line 10 "tmpl/current.c" the physical file name currently being processed becomes "tmpl/current.c" instead of remaining "test.c", thus affecting the "current directory" in the include search path. Tested like that: > cat test.c #line 1 "current.c" /* Here current directory is really where is test.c */ /* test1.h is in the same directory where is test.c */ #include "test1.h" #line 10 "tmpl/current.c" /* Here current directory seems to have become "tmpl", which does not exist */ /* test2.h is also in the same directory where is test.c, not found anymore */ #include "test2.h" > cat test1.h #ifndef TEST1_H #define TEST1_H #endif > cat test2.h #ifndef TEST2_H #define TEST2_H #endif > ls -l tmpl tmpl: No such file or directory > cc -c test.c "tmpl/current.c", line 10: cannot find include file: "test2.h" "tmpl/current.c", line 11: warning: empty translation unit cc: acomp failed for test.c A bug or not in solaris's cc, I might say that this is implementation dependent and it is the way it works with solaris's cc -; Conclusion: the culprit seems to be the first #line directive in Libpng.xs, c.f. https://metacpan.org/source/BKB/Image-PNG-Libpng-0.31/Libpng.xs#L1, I do not know if this is to be considered coherent with the other #line directive at line 543, c.f. https://metacpan.org/source/BKB/Image-PNG-Libpng-0.31/Libpng.xs#L543. Proposal: make sure first #line directive does not contain "tmpl/", or hardcode a -I File::Spec->curdir() in the Makefile.PL's INC (?). Regards, Jean-Damien. ----- Mail original ----- De: "Ben Bullock" <benkasminbull...@gmail.com> À: jddpa...@cpan.org Cc: cpan-testers-discuss@perl.org Envoyé: Mercredi 12 Février 2014 05:14:15 Objet: I don't understand how to resolve this error in Solaris/OS test report (perl 5.10.0) Dear Jean-Damien Durand (CC cpan-testers-discuss@perl.org) I don't understand how to resolve this error in testing the distribution Image::PNG::Libpng version 0.31: http://www.cpantesters.org/cpan/report/bb9621c6-9366-11e3-90d8-f10b44f7ffa7 When compiling Libpng.xs starting from the following line https://metacpan.org/source/BKB/Image-PNG-Libpng-0.31/Libpng.xs#L15 it says "tmpl/Libpng.xs.tmpl", line 15: cannot find include file: "my-xs.h" "tmpl/Libpng.xs.tmpl", line 16: cannot find include file: "perl-libpng.c" "tmpl/Libpng.xs.tmpl", line 17: cannot find include file: "const-c.inc" However the files are present in the distribution: https://metacpan.org/source/BKB/Image-PNG-Libpng-0.31 Is there something I can do to resolve this? It seems to find the file included here OK: https://metacpan.org/source/BKB/Image-PNG-Libpng-0.31/Libpng.xs#L23 Thanks for any help.