Building fails with -fno-common: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -mtune=sandybridge -fno-common -UNDEBUG -pthread -Wl,-O1 -Wl,--as-needed -o testapp testapp-testapp.o testapp-util.o testapp-stats_prefix.o testapp-jenkins_hash.o testapp-murmur3_hash.o testapp-hash.o testapp-cache.o -levent /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: testapp-util.o:(.bss+0x0): multiple definition of `hash'; testapp-testapp.o:(.bss+0x10): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: testapp-stats_prefix.o:(.bss+0x0): multiple definition of `hash'; testapp-testapp.o:(.bss+0x10): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: testapp-jenkins_hash.o:(.bss+0x0): multiple definition of `hash'; testapp-testapp.o:(.bss+0x10): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: testapp-hash.o:(.bss+0x0): multiple definition of `hash'; testapp-testapp.o:(.bss+0x10): first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:702: testapp] Error 1 make: *** Waiting for unfinished jobs....
Created attachment 604112 [details] build.log Build.log of failure
Proposed upstream fix as https://github.com/memcached/memcached/pull/601
Created attachment 604116 [details, diff] 0001-hash-fix-build-failure-against-gcc-10.patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ddb2458cf63fa9191d815cfae1fe697e24d4c08 commit 4ddb2458cf63fa9191d815cfae1fe697e24d4c08 Author: Matthew Thode <prometheanfire@gentoo.org> AuthorDate: 2020-01-24 21:11:05 +0000 Commit: Matthew Thode <prometheanfire@gentoo.org> CommitDate: 2020-01-24 21:17:51 +0000 net-misc/memcached: fix building with gcc 10 Closes: https://bugs.gentoo.org/706196 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org> ....21-hash-fix-build-failure-against-gcc-10.patch | 56 ++++++++++++++++++++++ ...ed-1.5.21.ebuild => memcached-1.5.21-r1.ebuild} | 1 + 2 files changed, 57 insertions(+)