Bug 1819154

Summary: multiple definition of `typeinfo name for cbKeyBinder' between .rodata+0x14 and .data.rel.ro+0xc
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: codeblocksAssignee: Dan Horák <dan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, dan, dmalcolm, fedora, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc, orion, pbrobinson
Target Milestone: ---   
Target Release: ---   
Hardware: armv7hl   
OS: Unspecified   
Whiteboard:
Fixed In Version: codeblocks-20.03-1.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-09 14:43:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 245418    
Attachments:
Description Flags
preprocessed source
none
assembler source
none
preprocessed source - cbkeyConfigPanel
none
assembler source - cbkeyConfigPanel none

Description Dan Horák 2020-03-31 10:33:49 UTC
When building latest codeblocks I get a "multiple definition" error on armv7

...
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/10/../../../crti.o /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/10/crtbeginS.o  .libs/cbkeybinder.o .libs/cbkeyConfigPanel.o .libs/cJSON.o .libs/clKeyboardBindingConfig.o .libs/clKeyboardManager.o .libs/configurationpanel.o .libs/json_node.o .libs/keybinder.o .libs/menuutils.o   ../../../sdk/.libs/libcodeblocks.so -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgobject-2.0 -lglib-2.0 -ltinyxml -lsquirrel -lsqstdlib -lwx_gtk3u_aui-3.0 -lwx_gtk3u_propgrid-3.0 -lwx_gtk3u_richtext-3.0 -lwx_gtk3u_xrc-3.0 -lwx_gtk3u_webview-3.0 -lwx_gtk3u_html-3.0 -lwx_gtk3u_qa-3.0 -lwx_gtk3u_adv-3.0 -lwx_gtk3u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -lpthread -ldl -L/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/10 -L/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/10/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/10/crtendS.o /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/10/../../../crtn.o -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -pthread   -pthread -Wl,-soname -Wl,libkeybinder.so -o .libs/libkeybinder.so
/usr/bin/ld: .libs/cbkeyConfigPanel.o:(.rodata+0x14): multiple definition of `typeinfo name for cbKeyBinder'; .libs/cbkeybinder.o:(.rodata+0x0): first defined here
/usr/bin/ld: .libs/cbkeyConfigPanel.o:(.data.rel.ro+0xc): multiple definition of `typeinfo for cbKeyBinder'; .libs/cbkeybinder.o:(.data.rel.ro+0x0): first defined here
collect2: error: ld returned 1 exit status

- first happened in rawhide and F-32, only on armv7
- also reported by Orion in gdl - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/4APKB4AMWJZPQXJBEXGBQULP4VPCEEXL/
- reproduced in F-31 with gcc9 too
- doesn't happen with codeblocks-17.12, so it might be actually exposed by a code change

Preprocessed source and possibly additional info will be added later (local build in progress).


Version-Release number of selected component (if applicable):
gcc-10.0.1-0.11.fc33.armv7hl
gcc-9.2.1-1.fc31.armv7hl

Comment 1 Dan Horák 2020-03-31 11:31:20 UTC
Created attachment 1675053 [details]
preprocessed source

Comment 2 Dan Horák 2020-03-31 11:32:15 UTC
Created attachment 1675054 [details]
assembler source

Comment 3 Dan Horák 2020-03-31 11:33:04 UTC
The attached files were produced with

armv7hl-redhat-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib/wx/include/gtk3-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -DCB_AUTOCONF -DCB_PRECOMP -DPIC -DTIXML_USE_STL=YES -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -Winvalid-pch -fPIC -fexceptions -c cbkeybinder.cpp -save-temps  -fPIC -DPIC -o cbkeybinder.o

Comment 4 Jakub Jelinek 2020-03-31 13:45:38 UTC
I don't see such a problem, neither if I compile it myself using a cross-compiler nor looking at the assembler file you've provided.
In the latter I see
        .global _ZTS11cbKeyBinder
...
        .section        .rodata
        .align  2
        .type   _ZTS11cbKeyBinder, %object
        .size   _ZTS11cbKeyBinder, 14
_ZTS11cbKeyBinder:
        .ascii  "11cbKeyBinder\000"
and no other definition of _ZTS11cbKeyBinder

Comment 5 Jakub Jelinek 2020-03-31 13:47:06 UTC
Ah, sorry, the other definition is in cbkeyConfigPanel.o, can you please also attach cbkeyConfigPanel.ii and g++ command line used to compile that one?
Thanks.

Comment 6 Dan Horák 2020-03-31 14:02:11 UTC
Sure, the command line is

armv7hl-redhat-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib/wx/include/gtk3-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -DCB_AUTOCONF -DCB_PRECOMP -DPIC -DTIXML_USE_STL=YES -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -Winvalid-pch -fPIC -fexceptions -c cbkeyConfigPanel.cpp -save-temps  -fPIC -DPIC -o cbkeyConfigPanel.o

Comment 7 Dan Horák 2020-03-31 14:03:06 UTC
Created attachment 1675075 [details]
preprocessed source - cbkeyConfigPanel

Comment 8 Dan Horák 2020-03-31 14:03:52 UTC
Created attachment 1675076 [details]
assembler source - cbkeyConfigPanel

Comment 9 Jakub Jelinek 2020-03-31 14:14:34 UTC
#pragma implementation "cbkeybinder.h"
is in both cbkeyConfigPanel.cpp and cbkeybinder.cpp
I think that is incorrect, for one header with #pragma interface there must be exactly one TU that has the #pragma implementation for it, which is where the virtual tables etc. will be emitted for it.

Comment 10 Dan Horák 2020-03-31 15:57:13 UTC
switching to codeblocks, resolved via https://sourceforge.net/p/codeblocks/tickets/936/ and it will be fixes in a next build

Comment 11 Fedora Update System 2020-03-31 18:03:55 UTC
FEDORA-2020-87ee19359f has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-87ee19359f

Comment 12 Fedora Update System 2020-04-01 02:15:21 UTC
FEDORA-2020-87ee19359f has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-87ee19359f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-87ee19359f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2020-04-09 14:43:14 UTC
FEDORA-2020-87ee19359f has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.