Skip to content

ExtUtils-CBuilder/t/03-cplusplus.t failed when ENV{CXX} is defined #23277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jplesnik opened this issue May 13, 2025 · 3 comments
Open

ExtUtils-CBuilder/t/03-cplusplus.t failed when ENV{CXX} is defined #23277

jplesnik opened this issue May 13, 2025 · 3 comments

Comments

@jplesnik
Copy link

Module: ExtUtils-CBuilder

Description

I tried to build Perl based on blead for Fedora and got following error:

#   Failed test 'did not search PATH for C++ compiler when given absolute path to C compiler'
#   at t/03-cplusplus.t line 73.
#          got: 'g++'
#     expected: '/builddir/build/BUILD/perl-5.41.12-build/perl-5.41.12/dist/ExtUtils-CBuilder/some/directory/what/doesnt/exist/cc'
# Looks like you failed 1 test of 7.
../dist/ExtUtils-CBuilder/t/03-cplusplus.t ........................... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/7 subtests 

The failure is caused by the $ENV{CXX} variable being defined.

Using local $ENV{CXX}; in the test fixes the failure.

Complete log is on
https://jplesnik.fedorapeople.org/5.42/build.log

Steps to Reproduce
Set CXX
CXX=g++; export CXX
and run the test

Expected behavior
Test should pass.

Perl configuration
Used perl blead

@Leont
Copy link
Contributor

Leont commented May 13, 2025

This must be a regression caused by #23146. Sounds like a bug in the test (for not taking $CXX into account), not in the code itself.

@jkeenan
Copy link
Contributor

jkeenan commented May 13, 2025

This must be a regression caused by #23146. Sounds like a bug in the test (for not taking $CXX into account), not in the code itself.

Perhaps this change in blead code:

commit ea0856c6750e984cdc3f73e06ba82601bb5f1a87
Author:     Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
AuthorDate: Sat Apr 26 16:16:34 2025 +0100
Commit:     Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
CommitDate: Sat Apr 26 16:16:34 2025 +0100

    Fix finding the correct cplusplus compiler

@bingos, can you take a look? Thanks.

@Leont
Copy link
Contributor

Leont commented May 13, 2025

No it's 02915d0. Probably either the test should be skipped entirely if $CXX is set, or $CXX needs to be (temporarily) unset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants