owfs-3.2p3-3.fc31 fails to build in F32: /usr/bin/ld: from_client.o:/builddir/build/BUILD/owfs-3.2p3/module/owserver/src/c/../include/owserver.h:21: multiple definition of `persistence_mutex'; owserver.o:/builddir/build/BUILD/owfs-3.2p3/module/owserver/src/c/../include/owserver.h:21: first defined here /usr/bin/ld: to_client.o:/builddir/build/BUILD/owfs-3.2p3/module/owserver/src/c/../include/owserver.h:21: multiple definition of `persistence_mutex'; owserver.o:/builddir/build/BUILD/owfs-3.2p3/module/owserver/src/c/../include/owserver.h:21: first defined here /usr/bin/ld: /usr/bin/ld: read.o:from_client.o:/builddir/build/BUILD/owfs-3.2p3/module/owserver/src/c/../include/owserver.h:21: multiple definition of `persistence_mutex'; /builddir/build/BUILD/owfs-3.2p3/module/owserver/src/c/../include/owserver.h:21: multiple definition of `persistence_mutex'; owserver.o:/builddir/build/BUILD/owfs-3.2p3/module/owserver/src/c/../include/owserver.h:21: first defined here A difference between passing and failing build root is at https://koschei.fedoraproject.org/build/7745907 This is probably triggered with an upgrade of gcc from 9.2.1-1.fc32.3 to 10.0.1-0.3.fc32. Additional info: This package is tracked by Koschei. See: https://koschei.fedoraproject.org/package/owfs
What exactly is going on here? All "locations" points to exactly the same place: owserver.h:21
When a header file is included into a source file, it becomes part of a compilation unit and the variable definition is put into BSS section of the object file. When a program is linked all definitions are collected from all object files. If there are multiple definitions of the the same-named variable, an error is raised because the linker does not know which definition is the right one. Linker does not have any information that would explain it that the two definitions are actually identical. In other words, you cannot include the same header file (owserver.h) into more source files (from_client.c, owserver.c) and then link them into one program (owexternal) if the header file contains a variable definition (persistence_mutex). A fix is changing the definition into a declaration in the header file and add the definition into one of the source files it fits better.
I've fixed it with https://github.com/owfs/owfs/pull/52 Fix committed to owfs.spec, should be picked up by mass rebuild