• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: bug in gcc 4.0.1? ld: duplicate symbol typeinfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in gcc 4.0.1? ld: duplicate symbol typeinfo


  • Subject: Re: bug in gcc 4.0.1? ld: duplicate symbol typeinfo
  • From: Xochitl Lunde <email@hidden>
  • Date: Thu, 12 Feb 2009 16:51:06 -0600



> I cannot give a complete solution, just some hints:

>
> The compiler may be forced to generate symbol definitions in several
> modules for typeinfo. For instance if you throw exceptions across
> DSO boundaries or if you do a dynamic cast. The potentially many
> definitions may be normal and should be coalesced by the linker
> eventually. However, in practice there are some pitfalls the tools
> may run into. There seems to be a problem with vague linkage and
> double symbol resolution. There were known bugs in previous versions
> of GCC related to this issue.


> You may provide the header files for the classes and all its sub
> classes in those modules where they may get catched in exception
> handling and where a dynamic_cast is applied - but this would rather
> remove undefined symbol errors. Proper declaration of symbol-
> visibility may also be important.

>
> Sorry, cannot say more. A more concrete answer would require a much
> deeper investigation.

>
> Regards

> Andreas
>

More updates on this problem from my end. I can get the error message to change depending on whether I build AGENT++ with _NO_THREADS enabled.  Unfortunately the error doesn't go away.

_NO_THREADS defined: ld: duplicate symbol Agentpp::OidList<Agentpp::MibGroup>size() constin threads_sh.o and mib_sh.o
_NO_THREADS undefined: ld: duplicate symbol Agentpp::Array<Agentpp::Thread>::size() constin threads_sh.o and mib_sh.o

An Agent++ mailing list user had this comment:

> It seems that lines like the following trigger this error:
> #if !defined (AGENTPP_DECL_TEMPL_OIDLIST_MIBGROUP)
> #define AGENTPP_DECL_TEMPL_OIDLIST_MIBGROUP
>    AGENTPP_DECL_TEMPL template class AGENTPP_DECL OidList<MibGroup>;
> #endif

As far as I can tell, the definitions AGENTPP_DECL_TEMPL and AGENTPP_DECL are blank in my build.  I added #warning and #error to the files temporarily, to tell me which switches were being enabled.

                #define AGENTPP_DECL
                #define AGENTPP_DECL_TEMPL


Does anyone have thoughts on whether or not these lines could be causing the issue?  I don't understand why a blank Macro would be a problem, so maybe it's related to the way that the macros are used later.  I haven't noticed any exceptions (try / catch) in the code so far, but I will reinvestigate that as well.  The blank macros are later also used like this in header files:

class AGENTPP_DECL fooTableRow;
class AGENTPP_DECL fooTable;

class AGENTPP_DECL bar: public barParent {
friend class fooTable;
friend class fooTableRow;

So far I haven't seen any dynamic casting, but what I do see are very plentiful macro definitions.

I have had what I believe to be a small measure of success building the libdes and snmp++ libraries on Mac OSX, including libsnmp++.dylib, for which I have posted patch files and notes to the Agent++ mailing list.  Our existing software previously used Net-SNMP, so the current development team here is not interested in switching libraries until a diligent amount of effort shows that Agent++ is not going to be a possibility on Mac OS.  I am really hoping to narrow down the cause of the problem if I can.

Thanks for reading,
Xochitl
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: bug in gcc 4.0.1? ld: duplicate symbol typeinfo (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Re: not breaking on breakpoints
  • Next by Date: Re: installation of xcode 3.1.2 appears to have removed command linetools
  • Previous by thread: Re: bug in gcc 4.0.1? ld: duplicate symbol typeinfo
  • Next by thread: Re: bug in gcc 4.0.1? ld: duplicate symbol typeinfo
  • Index(es):
    • Date
    • Thread