undefined reference to `vtable for clang::AnalysisAction'

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

undefined reference to `vtable for clang::AnalysisAction'

eric_niebler
Hi all!

I really can't wait to try clang. I gave up waiting for clang to work
under cygwin (http://llvm.org/bugs/show_bug.cgi?id=7276), so I installed
Linux. I still can't build clang :-P and figure I must be doing
something wrong. This is a clean-install of the latest Ubuntu. I
followed the steps here: http://clang.llvm.org/get_started.html.
Everything goes great right up to the very end, when it fails linking
clang. It's not just a temporary hick-up. It did the same thing when I
first tried this a few days ago.

Does anybody here have an idea what the problem might be?

llvm[4]: Linking Debug executable clang
/home/eric/llvm/tools/clang/tools/driver/Debug/cc1_main.o: In function
`AnalysisAction':
/home/eric/llvm/tools/clang/tools/driver/../../include/clang/Checker/FrontendActions.h:21: undefined reference to `vtable for clang::AnalysisAction'
collect2: ld returned 1 exit status
make[4]: *** [/home/eric/llvm/Debug/bin/clang] Error 1
make[4]: Leaving directory `/home/eric/llvm/tools/clang/tools/driver'
make[3]: *** [all] Error 1
make[3]: Leaving directory `/home/eric/llvm/tools/clang/tools'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/home/eric/llvm/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/home/eric/llvm/tools'
make: *** [all] Error 1

eric@ubuntu:~/llvm$ g++ --version
g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 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.

eric@ubuntu:~/llvm$ uname -a
Linux ubuntu 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC
2010 i686 GNU/Linux

--
Eric Niebler
BoostPro Computing
www.boostpro.com


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to `vtable for clang::AnalysisAction'

Douglas Gregor
On Jun 24, 2010, at 5:36 PM, Eric Niebler wrote:

> I really can't wait to try clang. I gave up waiting for clang to work
> under cygwin (http://llvm.org/bugs/show_bug.cgi?id=7276), so I installed
> Linux. I still can't build clang :-P and figure I must be doing
> something wrong. This is a clean-install of the latest Ubuntu. I
> followed the steps here: http://clang.llvm.org/get_started.html.
> Everything goes great right up to the very end, when it fails linking
> clang. It's not just a temporary hick-up. It did the same thing when I
> first tried this a few days ago.
>
> Does anybody here have an idea what the problem might be?

Are you doing anything different from checking out llvm+clang then running ./configure && make ?

> llvm[4]: Linking Debug executable clang
> /home/eric/llvm/tools/clang/tools/driver/Debug/cc1_main.o: In function
> `AnalysisAction':
> /home/eric/llvm/tools/clang/tools/driver/../../include/clang/Checker/FrontendActions.h:21: undefined reference to `vtable for clang::AnalysisAction'
> collect2: ld returned 1 exit status
> make[4]: *** [/home/eric/llvm/Debug/bin/clang] Error 1
> make[4]: Leaving directory `/home/eric/llvm/tools/clang/tools/driver'
> make[3]: *** [all] Error 1
> make[3]: Leaving directory `/home/eric/llvm/tools/clang/tools'
> make[2]: *** [all] Error 1
> make[2]: Leaving directory `/home/eric/llvm/tools/clang'
> make[1]: *** [clang/.makeall] Error 2
> make[1]: Leaving directory `/home/eric/llvm/tools'
> make: *** [all] Error 1

If you run nm on llvm/Debug/lib/libclangChecker.a, do the following symbols show up?

0000000000022870 S __ZTIN5clang14AnalysisActionE
0000000000022890 S __ZTSN5clang14AnalysisActionE
0000000000022800 S __ZTVN5clang14AnalysisActionE

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to `vtable for clang::AnalysisAction'

eric_niebler
On Tue, 2010-06-29 at 07:39 -0700, Douglas Gregor wrote:

> On Jun 24, 2010, at 5:36 PM, Eric Niebler wrote:
> > I really can't wait to try clang. I gave up waiting for clang to work
> > under cygwin (http://llvm.org/bugs/show_bug.cgi?id=7276), so I installed
> > Linux. I still can't build clang :-P and figure I must be doing
> > something wrong. This is a clean-install of the latest Ubuntu. I
> > followed the steps here: http://clang.llvm.org/get_started.html.
> > Everything goes great right up to the very end, when it fails linking
> > clang. It's not just a temporary hick-up. It did the same thing when I
> > first tried this a few days ago.
> >
> > Does anybody here have an idea what the problem might be?
>
> Are you doing anything different from checking out llvm+clang then running ./configure && make ?
Thanks for getting back to me, Doug. I tried again last night with an
update, a make clean, and then make succeeded. Not sure what the problem
could have been.

--
Eric Niebler
BoostPro Computing
www.boostpro.com

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

signature.asc (501 bytes) Download Attachment