0

I'm trying to build LLVM and clang on my machine (Ubuntu 12.04). I followed the instructions on http://clang.llvm.org/get_started.html up to step 6 (build LLVM and clang). When I make, I get a whole load of warnings about potentially incompatibly plugin versions (to do with dragonegg?). But the whole thing fails with these messages:

llvm[2]: Linking Debug+Asserts executable llvm-tblgen
/usr/bin/ld: /home/peter/llvm/build/Debug+Asserts/bin/llvm-tblgen: hidden symbol `llvm::Type::~Type()' isn't defined
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [/home/peter/llvm/build/Debug+Asserts/bin/llvm-tblgen] Error 1
make[2]: Leaving directory `/home/peter/llvm/build/utils/TableGen'
make[1]: *** [TableGen/.makeall] Error 2
make[1]: Leaving directory `/home/peter/llvm/build/utils'
make: *** [all] Error 1

So any help you could give me would be really helpful.

Thanks

Peter
  • 1,381
  • 2
  • 13
  • 24
  • Be careful if you are trying to install vmkit as well for Java support. You need JDK from Oracle, not OpenJDK. If you uninstall OpenJDK, ant is removed, so reisntall it. – Alex Dec 18 '12 at 10:14

2 Answers2

3

I ended up deleting the llvm folder and checking everything out again, and it worked, so I'm just putting it down to bad timing.

Peter
  • 1,381
  • 2
  • 13
  • 24
  • Next time, try waiting an hour or two, and then doing a 'make update'. The version of llvm you check out is the bleeding edge, and sometimes it doesn't build correctly. (I have also had this issue.) – Talia Jan 31 '13 at 18:29
1

You may want to use the existing LLVM packages, as provided by your distributions.

This askubuntu question about LLVM 3.1 could be relevant.

And you should at least do apt-get build-dep llvm-3.1-dev to ensure all dependencies are available.

You could also ask help on some LLVM related mailing list.

Community
  • 1
  • 1
Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547