View Issue Details

IDProjectCategoryView StatusLast Update
0033091CommunityOCCT:Releasepublic2023-09-29 17:27
Reporterwaebbl Assigned To 
PrioritynormalSeverityminor 
Status newResolutionopen 
Platform64-bitOSGentoo Linux 
Product Version7.6.2 
Summary0033091: Build failure with LTO (-Werror=odr)
DescriptionThere's no category related to building the software. Feel free to move to a desired category, if I've chosen the wrong.

I received a bug report[1] where building v7.6.2 fails when LTO is used. The issue is about the One Definition Rule of modern C++ standards:

FAILED: lin64/gcc/libi/libTKXCAF.so.7.6.2
/var/tmp/portage/sci-libs/opencascade-7.6.2-r1/work/occt-V7_6_2/src/XCAFDoc/XCAFDoc_Datum.cxx:37:6: error: type ‘ChildLab’ violates the C++ One Definition Rule [-Werror=odr]

You can find a complete build log attached to the bug report on bugs.gentoo.org. If desired, I can upload the log file here as well.

Building with LTO is currently undergoing a systematic test review on Gentoo, so this issue is probably not new, but was just unrecognized as a warning, if people were already using LTO.

I can filter out such flags as a quick hack, but for the long term it would be more interesting what your plans are for LTO strictness of future releases.

TIA

[1] https://bugs.gentoo.org/862912
Steps To Reproduce* Add -flto and -Werror=odr to CFLAGS
* Configure the package with -DBUILD_DOC_Overview=no -DBUILD_Inspector=no -DBUILD_RELEASE_DISABLE_EXCEPTIONS=OFF -DINSTALL_DIR_BIN=lib64/opencascade/bin -DINSTALL_DIR_CMAKE=lib64/cmake/opencascade -DINSTALL_DIR_DATA=share/opencascade/data -DINSTALL_DIR_DOC=share/doc/opencascade-7.6.2-r1 -DINSTALL_DIR_INCLUDE=include/opencascade -DINSTALL_DIR_LIB=lib64/opencascade -DINSTALL_DIR_RESOURCE=share/opencascade/resources -DINSTALL_DIR_SAMPLES=share/opencascade/samples -DINSTALL_DIR_SCRIPT=lib64/opencascade/bin -DINSTALL_DIR_WITH_VERSION=OFF -DINSTALL_SAMPLES=no -DINSTALL_TEST_CASES=NO -DUSE_D3D=NO -DUSE_DRACO=OFF -DUSE_EIGEN=no -DUSE_FFMPEG=no -DUSE_FREEIMAGE=no -DUSE_FREETYPE=ON -DUSE_GLES2=no -DUSE_OPENVR=OFF -DUSE_RAPIDJSON=no -DUSE_TBB=no -DUSE_VTK=no -DUSE_XLIB=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
* Build the package
TagsNo tags attached.
Test case number

Activities

waebbl

2022-10-08 15:23

reporter   ~0111442

FYI, this is still present in 7.7.0_beta when building with gcc. Gonna attach the build log.

Issue History

Date Modified Username Field Change
2022-08-05 17:51 waebbl New Issue
2022-08-05 17:51 waebbl Assigned To => bugmaster
2022-10-08 15:23 waebbl Note Added: 0111442
2023-09-29 17:27 vglukhik Assigned To bugmaster =>