https://bugs.kde.org/show_bug.cgi?id=480520

            Bug ID: 480520
           Summary: Krita does not compile with LTO enabled
    Classification: Applications
           Product: krita
           Version: 5.1.5
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: krita-bugs-n...@kde.org
          Reporter: bugs.kde....@e3q.eu
  Target Milestone: ---

SUMMARY
Krita does not compile with LTO enabled:

---
/var/tmp/portage/media-gfx/krita-5.1.5/work/krita-5.1.5/plugins/tools/tool_transform2/kis_free_transform_strategy.cpp:26:6:
error: type ‘StrokeFunction’ violates the C++ One Definition Rule [-Werror=odr] 
   26 | enum StrokeFunction {                                                   
      |      ^                                                                  
/var/tmp/portage/media-gfx/krita-5.1.5/work/krita-5.1.5/plugins/tools/tool_transform2/kis_perspective_transform_strategy.cpp:27:6:
note: an enum with different value name is defined in another translation unit  
   27 | enum StrokeFunction {                                                   
      |      ^                                                                  
/var/tmp/portage/media-gfx/krita-5.1.5/work/krita-5.1.5/plugins/tools/tool_transform2/kis_free_transform_strategy.cpp:27:5:
note: name ‘ROTATE’ differs from name ‘DRAG_HANDLE’ defined in another
translation unit      
   27 |     ROTATE = 0,                                                         
      |     ^                                                                   
/var/tmp/portage/media-gfx/krita-5.1.5/work/krita-5.1.5/plugins/tools/tool_transform2/kis_perspective_transform_strategy.cpp:28:5:
note: mismatching definition
   28 |     DRAG_HANDLE = 0,                                                    
      |     ^                                                                   
lto1: some warnings being treated as errors                                     
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit
status                                     
compilation terminated.                                          
---

STEPS TO REPRODUCE
1. compile with LTO enabled

OBSERVED RESULT
Compile fails

EXPECTED RESULT
Compile succeeds

SOFTWARE/OS VERSIONS
GCC: 13.2.1_p20240113
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.12

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to