This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Duplicate Symbols when compiling with arm-linux-gnueabihf


Ok, So I think I’ve tracked this down and I have the example further reduced to simply template specialization. 

Using that a starting point. I was able to find these bug discussions on the issue and It looks like this is a very old issue, and the problem might be the eabi specification doesn’t allow features introduced in c++11.  

https://sourceware.org/bugzilla/show_bug.cgi?id=23304
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608029

I’ve updated the example to a second example with an example_2 folder. Its simplified down to three files.  In the Make file you can toggle passing the compiler -DEXCLUDE_TEMPLATE_EXPORTS.  This will remove the explicit specialization from common-header.h and allow you to link the pgrogram on arm using eabi.

https://drive.google.com/open?id=1xfzEyugXOGKYuj69JKD2RXqbMBQ4ro4r

The good news is the generated code already has a preprocessor wrapper over this section of the code.  XSD_NO_EXPORT so I believe I can now work around the issue.  

Hopefully, this helps anyone searching for a similar problem in the future. 

From: Jeffrey Walton
Sent: Sunday, July 15, 2018 5:52 AM
To: Andrew Haley
Cc: Ignitus Boyone; gcc-help
Subject: Re: Duplicate Symbols when compiling with arm-linux-gnueabihf

On Sun, Jul 15, 2018 at 5:36 AM, Andrew Haley <aph@redhat.com> wrote:
> On 07/14/2018 10:48 AM, Jeffrey Walton wrote:
>> We just cleared a similar problem with GCC 5.4. We experienced
>> "multiply defined symbols" on i686 for some code using inline assembly
>> and a label.
>
> Inline assembly should use local labels.

Thanks. We tried that too by adding '%=' to the label for GCC. Then
the program failed to link.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]