Skip to content

tests fail when cc is not in the path #30

@shawnlaffan

Description

@shawnlaffan

(Edit) This is on Windows but seems to affect other systems. The matrix in cpan testers gives an overview.

http://matrix.cpantesters.org/?dist=ExtUtils-CppGuess+0.27

Commit 5e47504 added some mocked results and an override for ExtUtils::CppGuess::_capture but it seems not to trap all the variations.

The final test config at

[
{ cc => "cc", config => { ccflags => '' } },
{
is_sunstudio => 0,
is_msvc => undef, is_gcc => 1, is_clang => 0,
compiler_command => 'g++ -xc++',
linker_flags => '-lstdc++',
},
{ "cc --version" => "cc (Debian 12.2.0-14) 12.2.0" },
],
is causing an untrapped error at
my %got = map {$_ => $guess->$_} @METHODS;

I've not been able to track down the root cause but it seems related to the checks at

if (!%guess) {
my $v1 = `$c_compiler -v`;
my $v2 = `$c_compiler -V`;
my $v3 = `$c_compiler --version`;
my $os = $self->_os;
die <<EOF;
Unable to determine a C++ compiler for '$c_compiler' on $os
Version attempts:
-v: '$v1'
-V: '$v2'
--version: '$v3'
EOF
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions