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

Bug 706196

Summary: net-misc/memcached-1.5.21: -fno-common: /ld: testapp-util.o:(.bss+0x0): multiple definition of `hash'; testapp-testapp.o:(.bss+0x10): first defined here
Product: Gentoo Linux Reporter: Brian Evans (RETIRED) <grknight>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: prometheanfire
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    
Attachments: build.log
0001-hash-fix-build-failure-against-gcc-10.patch

Description Brian Evans (RETIRED) gentoo-dev 2020-01-23 20:56:47 UTC
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....
Comment 1 Brian Evans (RETIRED) gentoo-dev 2020-01-23 20:57:54 UTC
Created attachment 604112 [details]
build.log

Build.log of failure
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-23 22:19:09 UTC
Proposed upstream fix as https://github.com/memcached/memcached/pull/601
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-23 22:21:19 UTC
Created attachment 604116 [details, diff]
0001-hash-fix-build-failure-against-gcc-10.patch
Comment 4 Larry the Git Cow gentoo-dev 2020-01-24 21:17:57 UTC
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(+)