Skip to content

executing the test command dist/ExtUtils-CBuilder/t/03-cplusplusplus fails, #23355

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
lillianokok opened this issue Jun 5, 2025 · 5 comments

Comments

@lillianokok
Copy link

lillianokok commented Jun 5, 2025

[email protected] version, executing the test command dist/ExtUtils-CBuilder/t/03-cplusplusplus fails, error message:
dist/ExtUtils-CBuilder/t/03-cplusplus......................................# Failed test 'No search for C++ compiler in PATH when given absolute path to C compiler'
at t/03-cplusplus.t line 73.
get: '/home/spack/lib/spack/env/gcc/g++'
Expected: '/home/stage/root/spack-stage-perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/spack-src/dist/ExtUtils-CBuilder/some/directory/what/doesnt/exist/cc'
It looks like you failed 1 out of 7 tests.
Failed at test 7
The expected result is to find a non-existent path, but the test case reports an error Failed. Does this test case need optimization?

Module:

Description

[email protected] version, executing the test command dist/ExtUtils-CBuilder/t/03-cplusplusplus fails, error message:
dist/ExtUtils-CBuilder/t/03-cplusplus......................................# Failed test 'No search for C++ compiler in PATH when given absolute path to C compiler'
at t/03-cplusplus.t line 73.
get: '/home/spack/lib/spack/env/gcc/g++'
Expected: '/home/stage/root/spack-stage-perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/spack-src/dist/ExtUtils-CBuilder/some/directory/what/doesnt/exist/cc'
It looks like you failed 1 out of 7 tests.
Failed at test 7
The expected result is to find a non-existent path, but the test case reports an error Failed. Does this test case need optimization?
Steps to Reproduce

at t/03-cplusplus.t line 73.
Expected behavior

no errors
Perl configuration

# perl -V output goes here

5.41.13

@mauke
Copy link
Contributor

mauke commented Jun 5, 2025

Probably a duplicate of #23277.

@lillianokok
Copy link
Author

Probably a duplicate of #23277.

ok Thanks

@lillianokok
Copy link
Author

lillianokok commented Jun 5, 2025

Probably a duplicate of #23277.

But I fixed it according to the method of #23339, and the problem still exists. What should I do?
dist/ExtUtils-CBuilder/t/03-cplusplus ............................ # Failed test 'did not search PATH for C++ compiler when given absolute path to C compiler'
at t/03-cplusplus.t line 77.
got: 'c++'
expected: '/home/stage/root/spack-stage-perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/spack-src/dist/ExtUtils-CBuilder/some/directory/what/doesnt/exist/cc'
Looks like you failed 1 test of 7.
FAILED at test 7

{
local $ENV{CXX};
delete $ENV{CXX};
# GH #23146
my $fake_cc = File::Spec->rel2abs(File::Spec->catfile(qw(some directory what doesnt exist), 'cc'));
my $cb = ExtUtils::CBuilder->new(
quiet => $quiet,
config => {
cc => $fake_cc,
},
);

is $cb->{config}{cxx}, $fake_cc, "did not search PATH for C++ compiler when given absolute path to C compiler";

}

@jkeenan
Copy link
Contributor

jkeenan commented Jun 5, 2025

@lillianokok, can you please supply the output of perl -V for the perl build in which you are observing this problem?

(Without that it is difficult for someone to try to reproduce your problem.) Thanks.

@lillianokok
Copy link
Author

@lillianokok, can you please supply the output of perl -V for the perl build in which you are observing this problem?

(Without that it is difficult for someone to try to reproduce your problem.) Thanks.

./perl5.41.13 -V
Summary of my perl5 (revision 5 version 41 subversion 13) configuration:

Platform:
osname=linux
osvers=4.18.0-193.el8.aarch64
archname=aarch64-linux-thread-multi
uname='linux localhost.localdomain 4.18.0-193.el8.aarch64 #1 smp fri may 8 11:05:12 utc 2020 aarch64 aarch64 aarch64 gnulinux '
config_args='-des -Dprefix=/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm -Dlocincpth=/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/gdbm-1.18.1-ndulcsnnue4pjdtxj3bjiob42nlg6lyc/include -Dloclibpth=/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/gdbm-1.18.1-ndulcsnnue4pjdtxj3bjiob42nlg6lyc/lib -Accflags=-DAPPLLIB_EXP="/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/perl5" -Duseshrplib -Dusethreads -Dusedevel'
hint=recommended
useposix=true
d_sigaction=define
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='/usr/bin/gcc'
ccflags =' -D_REENTRANT -D_GNU_SOURCE -DAPPLLIB_EXP="/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/perl5" -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/gdbm-1.18.1-ndulcsnnue4pjdtxj3bjiob42nlg6lyc/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2'
cppflags='-D_REENTRANT -D_GNU_SOURCE -DAPPLLIB_EXP="/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/perl5" -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/gdbm-1.18.1-ndulcsnnue4pjdtxj3bjiob42nlg6lyc/include'
ccversion=''
gccversion='8.5.0 20210514 (Red Hat 8.5.0-12)'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=1
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='/usr/bin/gcc'
ldflags =' -fstack-protector-strong -L/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/gdbm-1.18.1-ndulcsnnue4pjdtxj3bjiob42nlg6lyc/lib'
libpth=/usr/local/lib /usr/lib /home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/gdbm-1.18.1-ndulcsnnue4pjdtxj3bjiob42nlg6lyc/lib /usr/lib64 /usr/local/lib64
libs=-lpthread -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
libc=libc-2.28.so
so=so
useshrplib=true
libperl=libperl.so
gnulibc_version='2.28'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E -Wl,-rpath,/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/5.41.13/aarch64-linux-thread-multi/CORE'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/gdbm-1.18.1-ndulcsnnue4pjdtxj3bjiob42nlg6lyc/lib -fstack-protector-strong'

Characteristics of this binary (from libperl):
Compile-time options:
HAS_LONG_DOUBLE
HAS_STRTOLD
HAS_TIMES
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_SIPHASH13
PERL_HASH_USE_SBOX32
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_DEVEL
PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
USE_REENTRANT_API
USE_THREAD_SAFE_LOCALE
Built under linux
Compiled at May 30 2025 09:00:22
@inc:
/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/perl5
/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/site_perl/5.41.13/aarch64-linux-thread-multi
/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/site_perl/5.41.13
/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/5.41.13/aarch64-linux-thread-multi
/home/spack/opt/spack/linux-centos8-aarch64/gcc-8.5.0/perl-5.41.13-v424hwyrgfidyplaekvbekn7lv24toxm/lib/5.41.13

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

No branches or pull requests

3 participants