I apologize about that. I must have left that extra path in from before I started to package the example for external use. I've updated the tarball to remove it. The issue still occurs. I'm going to include new copies fo the compiler output for armel and x86_64 and selected objdumps grepped for simple_type below. The armel objects definitely include more symbol lines, but I just don't know enough about the target arch to actually determine what is normal/abnormal. I'm assuming the core problem is the following but I need help on if this is something that can be worked around or even expected behavior. 00000000 UNKNOWN .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 UNKNOWN typeinfo for xsd::cxx::tree::simple_type<char, xsd::cxx::tree::type> 00000020 UNKNOWN typeinfo name for xsd::cxx::tree::simple_type<char, xsd::cxx::tree::type> #armel arm-linux-gnueabihf-g++ --std=c++14 -I. -Ibiogears/schema -fPIC -o DoubleList.o -c DoubleList.cxx arm-linux-gnueabihf-g++ --std=c++14 -I. -Ibiogears/schema -fPIC -o IntegerList.o -c IntegerList.cxx Building libbiogears_cdm.so arm-linux-gnueabihf-g++ -shared -Wl,-soname,libbiogears_cdm_d.so -o libbiogears_cdm_d.so DoubleList.o IntegerList.o IntegerList.o:(.data.rel.ro+0x1c): multiple definition of `typeinfo for xsd::cxx::tree::simple_type<char, xsd::cxx::tree::type>' DoubleList.o:(.data.rel.ro+0x1c): first defined here IntegerList.o:(.rodata+0x40): multiple definition of `typeinfo name for xsd::cxx::tree::simple_type<char, xsd::cxx::tree::type>' DoubleList.o:(.rodata+0x40): first defined here collect2: error: ld returned 1 exit status Makefile:32: recipe for target 'libbiogears_cdm.so' failed make: *** [libbiogears_cdm.so] Error 1 #x86_64 g++ --std=c++14 -I. -Ibiogears/schema -fPIC -o DoubleList.o -c DoubleList.cxx g++ --std=c++14 -I. -Ibiogears/schema -fPIC -o IntegerList.o -c IntegerList.cxx Building libbiogears_cdm.so g++ -shared -Wl,-soname,libbiogears_cdm_d.so -o libbiogears_cdm_d.so DoubleList.o IntegerList.o #OBJDUMPS X86_64 objdump -x DoubleList.o | grep simple_type 14 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 0000001b 0000000000000000 0000000000000000 00000146 2**1 18 .data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 00000018 0000000000000000 0000000000000000 000001d0 2**3 19 .rodata._ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000002a 0000000000000000 0000000000000000 00000200 2**5 0000000000000000 l d .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 0000000000000000 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 0000000000000000 l d .data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 .data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 l d .rodata._ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 .rodata._ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 l .group 0000000000000000 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC5Ev 0000000000000000 w F .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 000000000000001b _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 0000000000000000 w F .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 000000000000001b _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC1Ev 0000000000000000 w O .data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000018 _ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 w O .rodata._ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 000000000000002a _ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000014 R_X86_64_PLT32 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev-0x0000000000000004 RELOCATION RECORDS FOR [.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev]: 0000000000000010 R_X86_64_64 _ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE RELOCATION RECORDS FOR [.data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE]: 0000000000000008 R_X86_64_64 _ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000040 R_X86_64_PC32 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev objdump -x IntegerList.o | grep simple_type 14 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 0000001b 0000000000000000 0000000000000000 00000146 2**1 18 .data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 00000018 0000000000000000 0000000000000000 000001d0 2**3 19 .rodata._ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000002a 0000000000000000 0000000000000000 00000200 2**5 0000000000000000 l d .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 0000000000000000 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 0000000000000000 l d .data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 .data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 l d .rodata._ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 .rodata._ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 l .group 0000000000000000 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC5Ev 0000000000000000 w F .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 000000000000001b _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 0000000000000000 w F .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 000000000000001b _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC1Ev 0000000000000000 w O .data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000018 _ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000000 w O .rodata._ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 000000000000002a _ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000014 R_X86_64_PLT32 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev-0x0000000000000004 RELOCATION RECORDS FOR [.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev]: 0000000000000010 R_X86_64_64 _ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE RELOCATION RECORDS FOR [.data.rel.ro._ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE]: 0000000000000008 R_X86_64_64 _ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000000000040 R_X86_64_PC32 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev OBJDUMP ARMEL objdump -x IntegerList.o | grep simple_type 11 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 00000000 00000000 00000190 2**2 12 .ARM.extab.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 00000000 00000000 000001a8 2**0 13 .ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000008 00000000 00000000 000001a8 2**2 00000000 l d .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 l .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 $t 00000000 l d .ARM.extab.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 .ARM.extab.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 l d .ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 .ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 l .ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 $d 00000000 l .group 00000000 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC5Ev 00000001 w F .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000001 w F .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC1Ev 0000001c g O .data.rel.ro 0000000c _ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 00000040 g O .rodata 0000002a _ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000e UNKNOWN _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev RELOCATION RECORDS FOR [.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev]: RELOCATION RECORDS FOR [.ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev]: 00000000 UNKNOWN .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 UNKNOWN _ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 00000020 UNKNOWN _ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE objdump -x DoubleList.o | grep simple_type 11 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 00000000 00000000 00000190 2**2 12 .ARM.extab.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 00000000 00000000 000001a8 2**0 13 .ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000008 00000000 00000000 000001a8 2**2 00000000 l d .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 l .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 $t 00000000 l d .ARM.extab.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 .ARM.extab.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 l d .ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 .ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 l .ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000000 $d 00000000 l .group 00000000 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC5Ev 00000001 w F .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000001 w F .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC1Ev 0000001c g O .data.rel.ro 0000000c _ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 00000040 g O .rodata 0000002a _ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 0000000e UNKNOWN _ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev RELOCATION RECORDS FOR [.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev]: RELOCATION RECORDS FOR [.ARM.exidx.text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev]: 00000000 UNKNOWN .text._ZN3xsd3cxx4tree11simple_typeIcNS1_4typeEEC2Ev 00000018 UNKNOWN _ZTIN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE 00000020 UNKNOWN _ZTSN3xsd3cxx4tree11simple_typeIcNS1_4typeEEE On Fri, Jul 13, 2018 at 3:24 AM, U.Mutlu <um@xxxxxxxxxxx> wrote: > I think it's caused by this: -I/opt/sed-stash/biogears/exte > rnal/linux-gcc5.4-armel/include > > > > Ignitus Boyone wrote on 07/13/2018 03:58 AM: > >> I've been able to reduce the original example down to 2 classes with a >> common header. It can likely be reduced further, but this kind of keeps >> the style of the original codebase. >> >> So, from what I can tell if you inherit from a template in two different >> classes on arm-linux-gnueabihf the template specification for the >> inheritance gets exported in the object format of both compilation units. >> However when compiling to aarch64-linux-gnu this doesn't happen and you >> can >> link the two objects together. The make file in the tar ball provided in >> the drive link allows you to easily switch between compilers and while the >> example is functional in anyway it at least simplifies the recreate. >> >> Does anyone have any idea's what difference in the output formats for >> armel >> and aarch64 would cause this issue or if some gcc flag might help avoid >> the >> issue. The original source files are generated by XSD CodeSynthesis from >> an XSD file. I have some ability to modify the XSD definitions if this is >> avoidable, but I'm hoping that a solution can be found with out needing >> code changes. I can explain further on request. >> >> https://drive.google.com/open?id=1xfzEyugXOGKYuj69JKD2RXqbMBQ4ro4r >> >> ---------- Forwarded message ---------- >> From: Ignitus Boyone <ignitusboyone@xxxxxxxxx> >> Date: Tue, Jul 10, 2018 at 12:24 PM >> Subject: Duplicate Symbols when compiling with arm-linux-gnueabihf >> To: gcc-help@xxxxxxxxxxx >> >> >> I'm working on a problem where I have a code sample from biogears >> https://github.com/BioGearsEngine/core >> >> Where my XSD CodeSynthesis generated code fails the one definition rule >> when compiled against an gcc5.4 armhf compiler. I regularly build the >> same >> files against gcc5.4 arm64 MacOS & Linux and Visual Studio 2017 Win64. I >> can also build against gcc5.4 aarch64. I'm including an example from my >> drive account that reduces this to two compilation units. Saddly, this >> requires a number of headers from XSD and Xerces-C to compile so they are >> included as well. >> >> >> https://drive.google.com/open?id=1xfzEyugXOGKYuj69JKD2RXqbMBQ4ro4r >> >> I'm hopping the mailing list can point me in to some build chain or output >> format difference between arm7 and arm8 that might be the cause. Or a >> difference in the ubuntu 16.04 cross-compiler default flags. I'm going to >> admit. I can't really decide where to start on this so any help is >> appreciated. >> >> >> Error armhf >> arm-linux-gnueabihf-g++ (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 >> 20160609 >> Copyright (C) 2015 Free Software Foundation, Inc. >> >> This is free software; see the source for copying conditions. There is NO >> >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> PURPOSE. >> >> >> >> arm-linux-gnueabihf-g++ -shared -Wl,-soname,libbiogears_cdm_d.so -o >> libbiogears_cdm_d.so ActionData.o ActionListData.o >> >> >> ActionListData.o:(.data.rel.ro+0x348): multiple definition of `typeinfo >> for >> xsd::cxx::tree::simple_type<char, xsd::cxx >> ::tree::_type>::text_content_type' >> >> ActionData.o:(.data.rel.ro+0x348): first defined here >> >> ActionListData.o:(.data.rel.ro+0x54): multiple definition of `typeinfo >> for >> xsd::cxx::tree::no_prefix_mapping<char>' >> ActionData.o:(.data.rel.ro+0x54): first defined here >> >> ActionListData.o:(.data.rel.ro+0xb4): multiple definition of `typeinfo >> for >> xsd::cxx::tree::bounds<char>' >> ActionData.o:(.data.rel.ro+0xb4): first defined here >> >> ActionListData.o:(.data.rel.ro+0x3c): multiple definition of `typeinfo >> for >> xsd::cxx::tree::not_derived<char>' >> ActionData.o:(.data.rel.ro+0x3c): first defined here >> >> ActionListData.o:(.data.rel.ro+0x48): multiple definition of `typeinfo >> for >> xsd::cxx::tree::no_type_info<char>' >> ActionData.o:(.data.rel.ro+0x48): first defined here >> >> ActionListData.o:(.data.rel.ro+0x60): multiple definition of `typeinfo >> for >> xsd::cxx::tree::expected_text_content<char> >> ' >> >> Success aarch64 >> aarch64-linux-gnu-g++ (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 >> 20160609 >> >> Copyright (C) 2015 Free Software Foundation, Inc. >> >> This is free software; see the source for copying conditions. There is NO >> >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> PURPOSE. >> >> >> >> aarch64-linux-gnu-g++ --std=c++14 -I. -Ibiogears/schema -fPIC -o >> ActionData.o -c ActionData.cxx >> aarch64-linux-gnu-g++ --std=c++14 -I. -Ibiogears/schema -fPIC -o >> ActionListData.o -c ActionListData.cxx >> Building libbiogears_cdm.so >> >> aarch64-linux-gnu-g++ -shared -Wl,-soname,libbiogears_cdm_d.so -o >> libbiogears_cdm_d.so ActionData.o ActionListData.o >> >> >> Success amd64 >> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 >> >> Copyright (C) 2015 Free Software Foundation, Inc. >> >> This is free software; see the source for copying conditions. There is NO >> >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> PURPOSE. >> >> >> >> g++ --std=c++14 -I. -Ibiogears/schema -fPIC -o ActionData.o -c >> ActionData.cxx >> g++ --std=c++14 -I. -Ibiogears/schema -fPIC -o ActionListData.o -c >> ActionListData.cxx >> Building libbiogears_cdm.so >> >> g++ -shared -Wl,-soname,libbiogears_cdm_d.so -o libbiogears_cdm_d.so >> ActionData.o ActionListData.o >> >> Linux biogears-dev01 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 >> UTC 2018 x86_64 x86_64 x86_64 GNU/Linux >> >> >> > -- Memento Mori