undefined reference to `vtable for clang::AnalysisAction'

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 :stuck_out_tongue: 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

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 :stuck_out_tongue: 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

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.