[cfe-dev] Building LLVM and Clang with EKOPath 4

Richard Smith richard at metafoo.co.uk
Wed May 30 17:46:41 PDT 2012


On Wed, May 30, 2012 at 12:55 PM, Konstantin Tokarev <annulen at yandex.ru>wrote:

>
> 30.05.2012, 22:29, "David Blaikie" <dblaikie at gmail.com>:
> > On Wed, May 30, 2012 at 11:20 AM, Matthieu Monrocq <
> matthieu.monrocq at gmail.com> wrote:
> >> On Wed, May 30, 2012 at 9:56 AM, Konstantin Tokarev <annulen at yandex.ru>
> wrote:
> >>
> >>> Hi all,
> >>>
> >>> I've managed to build LLVM and Clang with EKOPath 4.0.12.1 compiler.
> Here are patches I had to introcduce
> >>> to make it compiling.
> >>>
> >>> Patch for clang moves some classes from anonymous namespaces which
> otherwise caused linker
> >>> errors. Probably it's a bug in compiler producing symbols with
> incorrect visibility.
> >>>
> >>> --
> >>> Regards,
> >>> Konstantin
> >>>
> >>> _______________________________________________
> >>> cfe-dev mailing list
> >>> cfe-dev at cs.uiuc.edu
> >>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >>
> >> I must admit it seems weird to be tweaking the code just to get it to
> compile with an exotic compiler.
> >>
> >> Adding includes occurs regularly because the standard does not define
> which standard includes include which others, so you often miss one or two.
> >>
> >> On the other hand, it seems strange that you had to add the "std::"
> qualifiers,
> > This one's not actually that surprising - if a std::vector's iterators
> are implemented as raw pointers, rather than as a type in the std
> namespace, then unqualified find(vec.begin(), vec.end(), ...) won't
> compile, since 'find' won't be found via ADL.
>
> EKOPath uses Apache stdcxx library as its STL implementation so it's
> probably the case.
>
> >> remove the anonymous namespace in some places (all ?)
> > This I can't explain - what errors are given that motivate this change?
>
> There were several unresolved symbols coming from classes declared in
> these namespaces. Probably it's a bug in compiler which erroneously uses
> internal linking for symbols declared in anonymous namespace. For the
> record, this bug affects only derivatives of RecursiveASTVisitor template.
>

Does the link succeed if you move the out-of-line definitions of the class
members into the anonymous namespace?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120530/96f70d45/attachment.html>


More information about the cfe-dev mailing list