Hi Sergii,<div><br><div class="gmail_quote">On Tue, Oct 25, 2011 at 1:15 PM, Vozniuk, Sergii <span dir="ltr"><<a href="mailto:sergii.vozniuk@epfl.ch">sergii.vozniuk@epfl.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi everyone<br><br>I wasn't successful in running VMKit on my machine and I'm still struggling with doing it.<br>Maybe someone had at least one of my problems and knows how to solve it
(because it seems to me that I ran into every problem that could occur :) ).
<br><br>Thanks in advance,<br>Sergii.<br><br>So here is the story: <br>I have a fresh installation of Ubuntu 11.04 64bit with all important updates.<br>I'll tell in advance that I was careful in trying to compile LLVM and VMKit<br>
(i.e. I had only one version of llvm-gcc and/or clang installed at a <br>time, I always ran "make clean" before "make" etc.)<br> <br>To build VMKit we have first to checkout and build LLVM. The VMKit "Getting started"<br>
guide states: Make sure you have llvm-gcc or clang available when you configure LLVM.<br>Alternatively, you can also checkout clang in llvm-scr/tools.<br><br>The following steps are not done in sequence, they are alternatives
<br> <br> 1. Install llvm-gcc from Ubuntu repository. In this case the LLVM configuration
<br> script doesn't see the gcc compiler although it's installed
<br> ~/llvm/llvm-build$ sudo apt-get install llvm-gcc-4.5
<br> ~/llvm/llvm-build$ ../llvm-src/configure --enable-optimized
<br> checking for clang... no
<br> checking for llvm-gcc... llvm-gcc
<br> checking for C compiler default output file name... configure:
<br> error: C compiler cannot create executables
<br> <br> 2. Install older version of llvm-gcc from Ubuntu repository. This installation
<br> doesn't create llvm-gcc executable but instead creates llvm-gcc-4.2 so I
<br> created a symlink to llvm-gcc-4.2. named llvm-gcc. The LLVM configuration goes fine
<br> but building LLVM produces an error
<br> <br> ~/llvm/llvm-build$ sudo apt-get install llvm-gcc-4.2
<br> ~/llvm/llvm-build$ sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/llvm-gcc
<br> ~/llvm/llvm-build$ ../llvm-src/configure --enable-optimized
<br> ~/llvm/llvm-build$ make
<br> <br> llvm[1]: Compiling Host.cpp for Release+Asserts build
<br> In file included from /usr/include/c++/4.5/cerrno:43:0,
<br> from /home/svozniuk/llvm/llvm-src/lib/Support/Unix/Unix.h:27,
<br> from /home/svozniuk/llvm/llvm-src/lib/Support/Unix/Host.inc:21,
<br> from /home/svozniuk/llvm/llvm-src/lib/Support/Host.cpp:20:
<br> /usr/include/errno.h:69:13: error: multiple types in one declaration
<br> /usr/include/errno.h:69:13: error: declaration does not declare anything
<br> /bin/rm: cannot remove `/home/svozniuk/llvm/llvm-build/lib/Support/Release+Asserts/Host.d.tmp': No such file or directory
<br> make[1]: *** [/home/svozniuk/llvm/llvm-build/lib/Support/Release+Asserts/Host.o] Error 1
<br> make[1]: Leaving directory `/home/svozniuk/llvm/llvm-build/lib/Support'
<br> make: *** [all] Error 1
<br> <br> 3. Download llvm-gcc4.2-2.9-x86_64-linux archive from <a href="http://llvm.org" target="_blank">llvm.org</a>, extract<br> it and manually add to the PATH. The configuration script finishes successfully<br>
but building LLVM produces an error<br>
<br> ~/llvm/llvm-build$ export PATH=$PATH:/home/svozniuk/llvm/llvm-gcc4.2-2.9-x86_64-linux/bin/
<br> ~/llvm/llvm-build$ ../llvm-src/configure --enable-optimized
<br> ~/llvm/llvm-build$ make
<br> llvm[1]: Compiling CommandLine.cpp for Release+Asserts build
<br> In file included from /home/svozniuk/llvm/llvm-src/lib/Support/CommandLine.cpp:25:
<br> /home/svozniuk/llvm/llvm-src/include/llvm/Support/system_error.h:499: error: ‘EAFNOSUPPORT’ was not declared in this scope
<br> /home/svozniuk/llvm/llvm-src/include/llvm/Support/system_error.h:500: error: ‘EADDRINUSE’ was not declared in this scope
<br> .........And another 50 errors of the same type follow.........
<br> <br> 4. Install clang from Ubuntu repository (All ways (which I know of) to build LLVM with
<br> llvm-gcc available have failed so now I switch to building LLVM with clang available).
<br> The configuration finishes successfully but again I get an error trying to build LLVM<br> <br> ~/llvm/llvm-build$ sudo apt-get install clang
<br> ~/llvm/llvm-build$ ../llvm-src/configure --enable-optimized
<br> ~/llvm/llvm-build$ make <br> <br> llvm[1]: Compiling APFloat.cpp for Release+Asserts build
<br> In file included from /home/svozniuk/llvm/llvm-src/lib/Support/APFloat.cpp:15:
<br> In file included from /home/svozniuk/llvm/llvm-src/include/llvm/ADT/APFloat.h:104:
<br> In file included from /home/svozniuk/llvm/llvm-src/include/llvm/ADT/APInt.h:18:
<br> In file included from /home/svozniuk/llvm/llvm-src/include/llvm/ADT/ArrayRef.h:13:
<br> In file included from /home/svozniuk/llvm/llvm-src/include/llvm/ADT/SmallVector.h:17:
<br> /home/svozniuk/llvm/llvm-src/include/llvm/Support/type_traits.h:20:10: fatal error: 'utility' file not found
<br> #include <utility>
<br> ^
<br> 1 error generated.
<br> make[1]: *** [/home/svozniuk/llvm/llvm-build/lib/Support/Release+Asserts/APFloat.o] Error 1
<br> <br> <br> <br> 5. Checkout clang to llvm-src-clang/tools and build LLVM this way. LLVM Configuration script finishes
<br> with no errors. LLVM builds successfully. VMKit configuration script finishes with no errors.
<br></blockquote><div><br></div><div>I believe option 5 is the only solution that works right now :( You're not the first one that had problems with pre-installed llvm-gcc or clang. I'll update the web page to say that one *must* checkout clang in tools/clang</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> Building VMKit produces an error (segmentation fault)
<br> ~/llvm/llvm-build-clang$ ../llvm-src-clang/configure --enable-optimized
<br> ~/llvm/llvm-build-clang$ make <br> ~/llvm/vmkit$ ./configure --with-llvmsrc="/home/svozniuk/llvm/llvm-src-clang" --with-llvmobj="/home/svozniuk/llvm/llvm-build-clang" --with-gnu-classpath-glibj="/home/svozniuk/llvm/classpath-0.97.2" --with-gnu-classpath-libs="/home/svozniuk/llvm/classpath-0.97.2/lib" --with-mmtk-plan=org.mmtk.plan.copyms.CopyMS
<br> ~/llvm/vmkit$ make
<br> <br> <br> llvm[2]: Building Release+Asserts Bytecode Module MMTKAlloc.bc
<br> make[2]: Leaving directory `/home/svozniuk/llvm/vmkit/mmtk/mmtk-alloc'
<br> make[2]: Entering directory `/home/svozniuk/llvm/vmkit/mmtk/java'
<br> make[2]: buildfile: Command not found
<br> make[2]: [all] Error 127 (ignored)
<br> llvm[2]: Building Release+Asserts mmtk-vmkit.jar all
<br> Can't find zip file.
<br> 0 opt 0x000000000093449f
<br> 1 opt 0x0000000000934fda
<br> 2 libpthread.so.0 0x00002b867fa26c60
<br> 3 MMTKMagic.so 0x00002b8680977769
<br> 4 opt 0x00000000008d0177 llvm::MPPassManager::runOnModule(llvm::Module&) + 535
<br> 5 opt 0x00000000008d02db llvm::PassManagerImpl::run(llvm::Module&) + 187
<br> 6 opt 0x00000000004c4c9f main + 5791
<br> 7 libc.so.6 0x00002b86805faeff __libc_start_main + 255
<br> 8 opt 0x00000000004b4569
<br> Stack dump:
<br> 0. Program arguments: /home/svozniuk/llvm/llvm-build-clang/Release+Asserts/bin/opt -load=/home/svozniuk/llvm/vmkit/Release+Asserts/lib/MMTKMagic.so -std-compile-opts -LowerJavaRT -f mmtk-vmkit.bc -o mmtk-vmkit-optimized.bc
<br> 1. Running pass 'Remove references to RT' on module 'mmtk-vmkit.bc'.
<br> make[2]: *** [all] Segmentation fault
<br> make[2]: Leaving directory `/home/svozniuk/llvm/vmkit/mmtk/java'
<br> make[1]: *** [all] Error 1
<br> make[1]: Leaving directory `/home/svozniuk/llvm/vmkit/mmtk'
<br> make: *** [all] Error 1
<br></blockquote><div><br></div><div>Do you have 'ant'? I think we forget to check if ant is installed on your machine :( If not, please install it. If yes, could you also attach the output of make ENABLE_OPTIMIZED=1 VERBOSE=1?</div>
<div><br></div><div>Thanks!</div><div>Nicolas</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <br><br>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>