Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895180 - media-libs/lib3mf-2.2.0 fails to compile (HARDENED-SYSTEM): gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported
Summary: media-libs/lib3mf-2.2.0 fails to compile (HARDENED-SYSTEM): gtest-port.h:270:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL: https://github.com/3MFConsortium/lib3...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 893432
  Show dependency tree
 
Reported: 2023-02-18 06:50 UTC by Agostino Sarubbo
Modified: 2023-02-22 16:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,343.63 KB, text/plain)
2023-02-18 06:50 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-18 06:50:12 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-libs/lib3mf-2.2.0 fails to compile (HARDENED-SYSTEM).
Discovered on: amd64 (internal ref: hardened_tinderbox)

NOTE:
(HARDENED-SYSTEM) in the summary means that the bug was found on a machine that runs an hardened profile with -D_FORTIFY_SOURCE=3 and -D_GLIBCXX_ASSERTIONS (https://www.gentoo.org/support/news-items/2023-01-01-hardening-fortify-assertions.html) but this bug MAY or MAY NOT BE related to the changes related to hardened.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-18 06:50:15 UTC
Created attachment 852352 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-02-18 06:50:16 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/AllTests.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/Attachments.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/BaseMaterialGroup.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/BeamLattice.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/BeamSets.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/BuildItems.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/ColorGroup.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/CompositeMaterials.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/EncryptionMethods.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/MeshObject.cpp.o 
FAILED: Tests/CPP_Bindings/CMakeFiles/Test_CPP_Bindings.dir/Source/MetaData.cpp.o 
/usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported.
Comment 3 Peter Levine 2023-02-18 10:08:40 UTC
-std=c++11 is being added to CXXFLAGS.  Forcing a C++ dialect lower than the compiler default via CXXFLAGS isn't really something that should be guarded against.  Most modern C++ code would likely fail to compile if -std=c++98 were added globally to CXXFLAGS.  GCC defaults to C++17 and Clang to C++14 (soon to be C++17). Given that, I would consider this bug invalid.
Comment 4 Peter Levine 2023-02-18 10:15:59 UTC
Never mind.  I was building with clang and for some reason the Makefile emits -std=c++11 with GCC.
Comment 5 Bernd 2023-02-18 10:27:29 UTC
The CMakeLists.txt file sets C++11 for GNU compilers and on Darwin. I can test, whether filtering this flag builds with gcc.
Comment 6 Bernd 2023-02-18 10:49:31 UTC
This issue isn't even hardened dependent. It triggers on a non-hardened system as well, if current gtest-1.13.0 is used.
Comment 7 Peter Levine 2023-02-18 22:15:20 UTC
Thanks for reporting the issue upstream.  I tend not to bother given the expected push-back to unbundling, but they do include a USE_INCLUDED_GTEST cmake flag so it looks like it's supported.
Comment 8 Bernd 2023-02-18 22:22:20 UTC
Yes they have this cmake option, but don't ship the submodule with their tarballs. This option is only meaningful if you build from the git repo, aka a live ebuild.
Comment 9 Larry the Git Cow gentoo-dev 2023-02-22 16:16:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cc37b8d342de65e1dec5744d9b600c101e14078

commit 5cc37b8d342de65e1dec5744d9b600c101e14078
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2023-02-18 10:36:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-22 16:14:13 +0000

    media-libs/lib3mf: fix bug #895180
    
    Remove the lines in CMakeLists.txt that emit -std=c++11 (as wall as
    emitting -O2) to enable the compiler default, which builds against
    the latest GTest with both clang-16.0.0_pre20230107 and
    gcc-12.2.1_p20230121-r1.
    
    Closes: https://bugs.gentoo.org/895180
    Closes: https://github.com/gentoo/gentoo/pull/29644
    Signed-off-by: Peter Levine <plevine457@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 ...ib3mf-2.2.0-0001-remove-std-and-opt-flags.patch | 30 ++++++++++++++++++++++
 media-libs/lib3mf/lib3mf-2.2.0.ebuild              |  3 ++-
 2 files changed, 32 insertions(+), 1 deletion(-)