View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033091 | Community | OCCT:Release | public | 2022-08-05 17:51 | 2023-09-29 17:27 |
Reporter | waebbl | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | new | Resolution | open | ||
Platform | 64-bit | OS | Gentoo Linux | ||
Product Version | 7.6.2 | ||||
Summary | 0033091: Build failure with LTO (-Werror=odr) | ||||
Description | There'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 | ||||
Tags | No tags attached. | ||||
Test case number | |||||