Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 909446

Summary: kde-plasma/plasma-vault-5.27.6 fails to compile (lto): kded/engine/backends/cryfs/cryfsbackend.cpp:33:12: error: type ‘PlasmaVault::ExitCode’ violates the C++ One Definition Rule [-Werror=odr]
Product: Gentoo Linux Reporter: Kostadin Shishmanov <kocelfc>
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: UNCONFIRMED ---    
Severity: normal CC: lg3dx6fd, paolo.pedroni
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: build log

Description Kostadin Shishmanov 2023-07-01 15:31:24 UTC
Created attachment 864975 [details]
build log

kde-plasma/plasma-vault-5.27.6 fails to compile with -flto -Werror=odr added to CFLAGS and CXXFLAGS

/var/tmp/portage/kde-plasma/plasma-vault-5.27.6/work/plasma-vault-5.27.6/kded/engine/backends/cryfs/cryfsbackend.cpp:33:12: error: type ‘PlasmaVault::ExitCode’ violates the C++ One Definition Rule [-Werror=odr]
   33 | enum class ExitCode : int {
      |            ^
/var/tmp/portage/kde-plasma/plasma-vault-5.27.6/work/plasma-vault-5.27.6/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp:32:12: note: an enum with different value name is defined in another translation unit
   32 | enum class ExitCode : int {
      |            ^
/var/tmp/portage/kde-plasma/plasma-vault-5.27.6/work/plasma-vault-5.27.6/kded/engine/backends/cryfs/cryfsbackend.cpp:37:5: note: name ‘UnspecifiedError’ differs from name ‘NonEmptyCipherDir’ defined in another translation unit
   37 |     UnspecifiedError = 1,
      |     ^
/var/tmp/portage/kde-plasma/plasma-vault-5.27.6/work/plasma-vault-5.27.6/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp:36:5: note: mismatching definition
   36 |     NonEmptyCipherDir = 6,
      |     ^
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.
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-01 15:32:13 UTC
We really need to see if we can remove cryfs entirely really, as the new versions are hard to package (conan..).
Comment 2 Arniii 2024-01-19 13:27:58 UTC
reproducible with plasma-vault-5.27.10
Comment 3 Paolo Pedroni 2024-02-12 16:40:54 UTC
Same thing in 5.27.10