J
Jens Thoms Toerring
Hello,
a CPAN module of mine that needs a C compiler for installation
fails in some of the tests since the C compiler isn't found. The
offending lines are
if ( system $Config{cc}, qw( -o cc_test cc_test.c ) ) {
unlink 'cc_test.c';
die "Can't run C compiler '$Config{cc}'\n";
}
where 'cc_test.c' is a simple program that gets created
automatically just for this test.
The problem is that on one of the testers machines $Config{cc}
is set to 'ccache cc' and system() obviously does not like the
space in the name of the program it's supposed to execute.
Now I probably can get around that by using a line like
if ( system split /\s+/, $Config{cc}, qw( -o cc_test cc_test.c ) ) {
or something similar but it looks ugly and I suspect that there
is a better method to invoke the correct C compiler. Does anybody
have an idea?
Thanks and regards, Jens
a CPAN module of mine that needs a C compiler for installation
fails in some of the tests since the C compiler isn't found. The
offending lines are
if ( system $Config{cc}, qw( -o cc_test cc_test.c ) ) {
unlink 'cc_test.c';
die "Can't run C compiler '$Config{cc}'\n";
}
where 'cc_test.c' is a simple program that gets created
automatically just for this test.
The problem is that on one of the testers machines $Config{cc}
is set to 'ccache cc' and system() obviously does not like the
space in the name of the program it's supposed to execute.
Now I probably can get around that by using a line like
if ( system split /\s+/, $Config{cc}, qw( -o cc_test cc_test.c ) ) {
or something similar but it looks ugly and I suspect that there
is a better method to invoke the correct C compiler. Does anybody
have an idea?
Thanks and regards, Jens