Closed hroncok closed 2 years ago
Thanks for the report! It seems my good idea caused chaos. Sorry about that.
Released as 0.25.
Unfortunately, this still doesn't pass the tests in Fedora:
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CFLAGS
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CXXFLAGS
+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/ExtUtils-CppGuess-0.25/.package_note-perl-ExtUtils-CppGuess-0.25-1.fc37.x86_64.ld'
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
...
+ /usr/bin/make -O -j8 V=1 VERBOSE=1 test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-report-prereqs.t .. ok
t/001_load.t ........... ok
t/002_icpp.t ...........
Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/9 subtests
t/003_standard_flag.t .. ok
t/004_env.t ............ ok
t/010_module_build.t ... ok
t/011_makemaker.t ...... ok
Test Summary Report
-------------------
t/002_icpp.t (Wstat: 1024 (exited 4) Tests: 9 Failed: 4)
Failed tests: 1, 5, 7, 9
Non-zero exit status: 4
Files=7, Tests=20, 4 wallclock secs ( 0.02 usr 0.01 sys + 3.23 cusr 0.60 csys = 3.86 CPU)
Result: FAIL
RPM build errors:
#
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
# Module Want Have Where Howbig
# ------------------- ---- ---- ---------------------------- ------
# ExtUtils::MakeMaker any 7.64 /usr/share/perl5/vendor_perl 111821
#
# === Build Requires ===
#
# Module Want Have Where Howbig
# ------------------- ---- ---- ---------------------------- ------
# ExtUtils::MakeMaker any 7.64 /usr/share/perl5/vendor_perl 111821
#
# === Test Requires ===
#
# Module Want Have Where Howbig
# ------------------- -------- -------- ---------------------------- ------
# Capture::Tiny any 0.48 /usr/share/perl5 29656
# Cwd any 3.80 /usr/lib64/perl5/vendor_perl 21942
# ExtUtils::CBuilder 0.280231 0.280236 /usr/share/perl5/vendor_perl 8884
# ExtUtils::MakeMaker any 7.64 /usr/share/perl5/vendor_perl 111821
# ExtUtils::Manifest any 1.73 /usr/share/perl5/vendor_perl 23491
# Fatal any 2.34 /usr/share/perl5/vendor_perl 59085
# Module::Build any 0.4231 /usr/share/perl5/vendor_perl 35409
# Test::More 0.88 1.302190 /usr/share/perl5/vendor_perl 52979
#
# === Runtime Requires ===
#
# Module Want Have Where Howbig
# ----------------- ---- ------ ---------------------------- ------
# Capture::Tiny any 0.48 /usr/share/perl5 29656
# ExtUtils::ParseXS 3.35 3.44 /usr/share/perl5/vendor_perl 67178
# File::Basename any 2.85 /usr/share/perl5 11194
# File::Spec any 3.80 /usr/lib64/perl5/vendor_perl 10571
# File::Temp any 0.2311 /usr/share/perl5/vendor_perl 118877
#
# EUMM:{
# 'CC' => 'g++',
# 'CCFLAGS' => ' -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xc++',
# 'dynamic_lib' => {
# 'OTHERLDFLAGS' => ' -lstdc++'
# }
# }
# ---
# MB:{
# 'config' => {
# 'cc' => 'g++'
# },
# 'extra_compiler_flags' => ' -xc++',
# 'extra_linker_flags' => ' -lstdc++'
# }
# ---
# Config:{
# 'byacc' => 'byacc',
# 'cc' => 'gcc',
# 'cccdlflags' => '-fPIC',
# 'ccdlflags' => '-Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ',
# 'ccflags' => '-D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
# 'ccflags_nolargefiles' => '-D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include ',
# 'ccflags_uselargefiles' => '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
# 'ccname' => 'gcc',
# 'ccstdflags' => ' -std=c89',
# 'ccsymbols' => '',
# 'ccversion' => '',
# 'ccwarnflags' => ' -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -Werror=declaration-after-statement',
# 'cppccsymbols' => '',
# 'd_PRIEUldbl' => 'define',
# 'd_PRIFUldbl' => 'define',
# 'd_PRIGUldbl' => 'define',
# 'd_PRIeldbl' => 'define',
# 'd_PRIfldbl' => 'define',
# 'd_PRIgldbl' => 'define',
# 'd_SCNfldbl' => 'define',
# 'd_accept4' => 'define',
# 'd_access' => 'define',
# 'd_accessx' => undef,
# 'd_eaccess' => 'define',
# 'd_ldbl_dig' => 'define',
# 'd_ldexpl' => 'define',
# 'd_locconv' => 'define',
# 'd_old_pthread_create_joinable' => undef,
# 'd_oldpthreads' => undef,
# 'd_oldsock' => undef,
# 'd_pthread_yield' => 'define',
# 'd_sched_yield' => 'define',
# 'd_setlocale_accepts_any_locale_name' => undef,
# 'd_strtold' => 'define',
# 'd_strtold_l' => 'define',
# 'd_telldir' => 'define',
# 'd_telldirproto' => 'define',
# 'gccansipedantic' => '',
# 'gccosandvers' => '',
# 'gccversion' => '12.0.1 20220308 (Red Hat 12.0.1-0)',
# 'i_sysaccess' => undef,
# 'ld' => 'gcc',
# 'ld_can_script' => 'define',
# 'lddlflags' => '-lpthread -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/local/lib -fstack-protector-strong',
# 'ldflags' => '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -fstack-protector-strong -L/usr/local/lib',
# 'ldflags_nolargefiles' => '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -fstack-protector-strong -L/usr/local/lib',
# 'ldflags_uselargefiles' => '',
# 'ldlibpthname' => 'LD_LIBRARY_PATH',
# 'old_pthread_create_joinable' => '',
# 'sPRIEUldbl' => '"LE"',
# 'sPRIFUldbl' => '"LF"',
# 'sPRIGUldbl' => '"LG"',
# 'sPRIeldbl' => '"Le"',
# 'sPRIfldbl' => '"Lf"',
# 'sPRIgldbl' => '"Lg"',
# 'sSCNfldbl' => '"Lf"',
# 'sched_yield' => 'sched_yield()',
# 'yacc' => 'yacc',
# 'yaccflags' => ''
# }
# Method: is_sunstudio = 0
# Method: is_msvc = undef
# Method: is_gcc = 1
# Method: is_clang = 0
# Method: compiler_command = g++ -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xc++
# Method: linker_flags = -lstdc++
# Method: iostream_fname = iostream
# Method: cpp_flavor_defs =
# #define __INLINE_CPP_STANDARD_HEADERS 1
# #define __INLINE_CPP_NAMESPACE_STD 1
#
# Failed test at t/002_icpp.t line 102.
# Structures begin differing at:
# $got->{compiler_command} = 'g++ -TP -EHsc'
# $expected->{compiler_command} = 'cl -TP -EHsc'
# [
# {
# 'cc' => 'cl',
# 'config' => {
# 'ccflags' => ''
# },
# 'os' => 'MSWin32'
# },
# {
# 'compiler_command' => 'g++ -TP -EHsc',
# 'is_clang' => 0,
# 'is_gcc' => 0,
# 'is_msvc' => 1,
# 'is_sunstudio' => 0,
# 'linker_flags' => 'msvcprt.lib'
# },
# {
# 'compiler_command' => 'cl -TP -EHsc',
# 'is_clang' => 0,
# 'is_gcc' => 0,
# 'is_msvc' => 1,
# 'is_sunstudio' => 0,
# 'linker_flags' => 'msvcprt.lib'
# }
# ]
# Failed test at t/002_icpp.t line 102.
# Structures begin differing at:
# $got->{compiler_command} = 'g++ -Wno-reserved-user-defined-literal'
# $expected->{compiler_command} = 'clang++ -Wno-reserved-user-defined-literal'
# [
# {
# 'cc' => 'gcc',
# 'config' => {
# 'ccflags' => '',
# 'gccversion' => 'Clang'
# },
# 'os' => 'freebsd',
# 'osvers' => 10
# },
# {
# 'compiler_command' => 'g++ -Wno-reserved-user-defined-literal',
# 'is_clang' => 1,
# 'is_gcc' => undef,
# 'is_msvc' => undef,
# 'is_sunstudio' => undef,
# 'linker_flags' => '-lc++'
# },
# {
# 'compiler_command' => 'clang++ -Wno-reserved-user-defined-literal',
# 'is_clang' => 1,
# 'is_gcc' => undef,
# 'is_msvc' => undef,
# 'is_sunstudio' => undef,
# 'linker_flags' => '-lc++'
# }
# ]
# Failed test at t/002_icpp.t line 102.
# Structures begin differing at:
# $got->{compiler_command} = 'g++ -xc++ -Wno-reserved-user-defined-literal'
# $expected->{compiler_command} = 'clang++ -xc++ -Wno-reserved-user-defined-literal'
# [
# {
# 'cc' => 'clang',
# 'config' => {
# 'ccflags' => '',
# 'gccversion' => 'Clang'
# },
# 'os' => 'linux'
# },
# {
# 'compiler_command' => 'g++ -xc++ -Wno-reserved-user-defined-literal',
# 'is_clang' => 1,
# 'is_gcc' => undef,
# 'is_msvc' => undef,
# 'is_sunstudio' => 0,
# 'linker_flags' => '-lstdc++'
# },
# {
# 'compiler_command' => 'clang++ -xc++ -Wno-reserved-user-defined-literal',
# 'is_clang' => 1,
# 'is_gcc' => undef,
# 'is_msvc' => undef,
# 'is_sunstudio' => 0,
# 'linker_flags' => '-lstdc++'
# }
# ]
# Failed test at t/002_icpp.t line 102.
# Structures begin differing at:
# $got->{compiler_command} = 'g++'
# $expected->{compiler_command} = 'CC'
# [
# {
# 'cc' => '/opt/SUNWspro/bin/cc',
# 'config' => {
# 'ccflags' => ''
# },
# 'os' => 'linux'
# },
# {
# 'compiler_command' => 'g++',
# 'is_clang' => undef,
# 'is_gcc' => undef,
# 'is_msvc' => undef,
# 'is_sunstudio' => 1,
# 'linker_flags' => ''
# },
# {
# 'compiler_command' => 'CC',
# 'is_clang' => undef,
# 'is_gcc' => undef,
# 'is_msvc' => undef,
# 'is_sunstudio' => 1,
# 'linker_flags' => ''
# }
# ]
# Looks like you failed 4 tests of 9.
cc1plus: error: unrecognized command-line option '-std=c++unreal'
# EUMM env:{
# 'CC' => 'czz',
# 'CCFLAGS' => ' -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xc++',
# 'dynamic_lib' => {
# 'OTHERLDFLAGS' => ' -lstdc++'
# }
# }
# Module::Build version: 0.4231
# ExtUtils::CBuilder version: 0.280236
Failed 1/7 test programs. 4/20 subtests failed.
make: *** [Makefile:856: test_dynamic] Error 255
BTW no need to release a new version immediately I can test a pull request before it is merged.
@hroncok Can you try editing t/002_icpp.t
and putting BEGIN { delete $ENV{CXX} }
at the top and re-running it?
That makes the actual tests pass, I will now try to build Boost::Geometry::Utils and slic3r
Great! Looking forward to seeing if it actually works ;-)
Yes! 0.25 actually works now, it was only the test that was not isolated enough. Thanks!
Thank you for the help! Released as 0.26.
Hello,
with the update to 0.24, we see a regression in at least 2 dependent packages of this and in the tests of this library itself.
The environment
Our build system sets:
The test failure
And we get:
At first, I assumed the tests simply cannot run in an environment, where the environment variables are set, so I've done:
Before running the tests, but that was not a good idea, this affected dependent packages.
The dependent packages problem
E.g. when we build perl-Boost-Geometry-Utils we set the flags similarly. With the previous version (0.23), the build happened as:
Now it builds as:
The error in compilation is:
Diff of the individual flags:
sic3r has a similar problem.
I think the missing
-xc++
is a problem. But I am not sure, I don't do much Perl unfortunately, I maintain this in Fedora only because of slic3r.