xosview icon indicating copy to clipboard operation
xosview copied to clipboard

Xrm.cc: error: defaultXResourceString violates the C++ One Definition Rule [-Werror=odr]

Open akhuettel opened this issue 3 months ago • 0 comments

This is a clone of https://bugs.gentoo.org/941118 and more information can be found in the original report

During LTO compatibility testing this build issue was found:

x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fno-diagnostics-color -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto  -I. -MMD -Ilinux/  -c -o linux/serialmeter.o linux/serialmeter.cc
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fno-diagnostics-color -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto  -I. -MMD -Ilinux/  -c -o defaultstring.o defaultstring.cc
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fno-diagnostics-color -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto  -I. -MMD -Ilinux/  -c -o linux/wirelessmeter.o linux/wirelessmeter.cc
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fno-diagnostics-color -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto  -I. -MMD -Ilinux/  -c -o linux/acpitemp.o linux/acpitemp.cc
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fno-diagnostics-color -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto  -I. -MMD -Ilinux/  -c -o linux/coretemp.o linux/coretemp.cc
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto -o xosview Host.o Xrm.o bitfieldmeter.o bitmeter.o defaultstring.o fieldmeter.o fieldmeterdecay.o fieldmetergraph.o 
Xrm.cc:16:14: error: defaultXResourceString violates the C++ One Definition Rule [-Werror=odr]
   16 | extern char *defaultXResourceString;
      |              ^

akhuettel avatar Oct 15 '25 20:10 akhuettel