Thanks, Nicolas<br><br>Finally I got VMKit up and running. You were right -- there was a problem in the configuration of glibj.zip.<br><br>Best regards,<br>Sergii.<br><br><div class="gmail_quote">On Tue, Oct 25, 2011 at 10:57 PM, Nicolas Geoffray <span dir="ltr"><<a href="mailto:nicolas.geoffray@gmail.com">nicolas.geoffray@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Sergii,<div><br></div><div>I think there is a problem in your configure command for VMKit. If you look at what you provide for glibj: </div>
<div><br></div><div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">--with-gnu-classpath-glibj="/home/svozniuk/llvm/classpath-0.97.2</span></div>
<div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"><br></span></div><div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">I don't think it's right. You should change it to:</span></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><span style="font-family:arial"><div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">--with-gnu-classpath-glibj="/home/svozniuk/llvm/classpath-0.97.2/lib/glibj.zip</span></div>
<div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"><br></span></div><div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">Also please make sure that you have created the links for the shared libraries (step 2 of getting started)</span></div>
<div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"><br></span></div><div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">And, if you sync, you might have the configure script warning you about that mistake. The support for detecting correct configure options for GNU Classpath just came in yesterday :)</span></div>
<div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"><br></span></div><div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">Cheers,</span></div>
<div><span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">Nicolas</span></div></span></font><div><div></div><div class="h5"><br><div class="gmail_quote">On Tue, Oct 25, 2011 at 8:36 PM, Vozniuk, Sergii <span dir="ltr"><<a href="mailto:sergii.vozniuk@epfl.ch" target="_blank">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, Nicolas<br><br>Indeed, I did not have ant installed and installing it allowed me to overcome the previous error. However the next one appeared. I have ran make with ENABLE_OPTIMIZED=1 VERBOSE=1 and here is the output (the last part of it)<div>
<br>
<br>make[2]: Entering directory `/home/svozniuk/llvm/vmkit/mmtk/java'<br></div>/usr/bin/ant -buildfile /home/svozniuk/llvm/vmkit/mmtk/java/build.xml<br>Buildfile: /home/svozniuk/llvm/vmkit/mmtk/java/build.xml<br><br>
main:<br>
[mkdir] Created dir: /home/svozniuk/llvm/vmkit/mmtk/java/classes<br> [javac] /home/svozniuk/llvm/vmkit/mmtk/java/build.xml:4: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds<br>
[javac] Compiling 380 source files to /home/svozniuk/llvm/vmkit/mmtk/java/classes<br> [javac] Note: Some input files use or override a deprecated API.<br> [javac] Note: Recompile with -Xlint:deprecation for details.<br>
[jar] Building jar: /home/svozniuk/llvm/vmkit/mmtk/java/mmtk-vmkit.jar<br><br>BUILD SUCCESSFUL<br>Total time: 4 seconds<div><br>llvm[2]: Building Release+Asserts mmtk-vmkit.jar all<br></div>/home/svozniuk/llvm/llvm-build-clang/Release+Asserts/bin/opt -load=/home/svozniuk/llvm/vmkit/Release+Asserts/lib/JITGCPass.so -std-compile-opts -JITGCPass -f /home/svozniuk/llvm/vmkit/Release+Asserts/lib/MMTKAlloc.bc -o /home/svozniuk/llvm/vmkit/Release+Asserts/lib/MMTKAlloc.bc<br>
/home/svozniuk/llvm/vmkit/Release+Asserts/bin/vmjc -std-compile-opts -load=/home/svozniuk/llvm/vmkit/Release+Asserts/lib/MMTKRuntime.so -load=/home/svozniuk/llvm/vmkit/Release+Asserts/lib/MMTKMagic.so -LowerMagic /home/svozniuk/llvm/vmkit/mmtk/java/mmtk-vmkit.jar -disable-exceptions -disable-cooperativegc -with-clinit=org/mmtk/vm/VM,org/mmtk/utility/*,org/mmtk/policy/*,org/j3/config/* -Dmmtk.hostjvm=org.j3.mmtk.Factory -o mmtk-vmkit.bc -Dmmtk.properties=/home/svozniuk/llvm/vmkit/mmtk/java/vmkit.properties -disable-stubs -assume-compiled<br>
vmjc: JavaClass.cpp:443: j3::JavaObject *j3::Class::doNew(j3::Jnjvm *): Assertion `this && "No class when allocating."' failed.<br>0 vmjc 0x0000000000eea55f<br>1 vmjc 0x0000000000eeb09a<br>
2 libpthread.so.0 0x00002b11108bbc60<br>3 libc.so.6 0x00002b11116bcd05 gsignal + 53<br>4 libc.so.6 0x00002b11116c0ab6 abort + 390<br>5 libc.so.6 0x00002b11116b57c5 __assert_fail + 245<br>6 vmjc 0x0000000000565deb j3::Class::doNew(j3::Jnjvm*) + 107<br>
7 vmjc 0x00000000005726db j3::JavaString::stringDup(j3::ArrayUInt16 const* const&, j3::Jnjvm*) + 59<br>8 vmjc 0x000000000055a761 j3::StringMap::lookupOrCreate(j3::ArrayUInt16 const*, j3::Jnjvm*, j3::JavaString* (*)(j3::ArrayUInt16 const* const&, j3::Jnjvm*)) + 161<br>
9 vmjc 0x0000000000557162 CreateUnableToLoad(mvm::UTF8 const*, j3::Jnjvm*) + 786<br>10 vmjc 0x00000000005552e3 j3::Jnjvm::noClassDefFoundError(mvm::UTF8 const*) + 67<br>11 vmjc 0x000000000055de64 j3::JnjvmClassLoader::loadName(mvm::UTF8 const*, bool, bool, j3::JavaString*) + 276<br>
12 vmjc 0x00000000005667ea j3::Class::readParents(j3::Reader&) + 106<br>13 vmjc 0x000000000056791c j3::Class::readClass() + 364<br>14 vmjc 0x000000000055dacc j3::JnjvmClassLoader::constructClass(mvm::UTF8 const*, j3::ClassBytes*) + 364<br>
15 vmjc 0x000000000055d89f j3::JnjvmBootstrapLoader::internalLoad(mvm::UTF8 const*, bool, j3::JavaString*) + 127<br>16 vmjc 0x000000000055dd7f j3::JnjvmClassLoader::loadName(mvm::UTF8 const*, bool, bool, j3::JavaString*) + 47<br>
17 vmjc 0x00000000005a01fc extractFiles(j3::ClassBytes*, j3::JavaAOTCompiler*, j3::JnjvmBootstrapLoader*, std::vector<j3::Class*, std::allocator<j3::Class*> >&) + 444<br>18 vmjc 0x00000000005a0604 mainCompilerStart(j3::JavaThread*) + 548<br>
19 vmjc 0x00000000005e2d79 mvm::Thread::internalThreadStart(mvm::Thread*) + 73<br>20 libpthread.so.0 0x00002b11108b2d8c<br>21 libc.so.6 0x00002b111176f04d clone + 109<br>Aborted<br>make[2]: *** [all] Error 134<div>
<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><br><br></div><div><div>
</div><div><div class="gmail_quote">
On Tue, Oct 25, 2011 at 1:45 PM, Nicolas Geoffray <span dir="ltr"><<a href="mailto:nicolas.geoffray@gmail.com" target="_blank">nicolas.geoffray@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Sergii,<div><br><div class="gmail_quote"><div><div></div><div>On Tue, Oct 25, 2011 at 1:15 PM, Vozniuk, Sergii <span dir="ltr"><<a href="mailto:sergii.vozniuk@epfl.ch" target="_blank">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></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></div><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></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" target="_blank">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>
</blockquote></div><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br>