[LLVMdev] VMKit Boehm MMTk Compilation

Kyle T. Klein kyleklein at umail.ucsb.edu
Thu Aug 19 12:04:09 PDT 2010


For anyone who encounters this issue in the future, my issue was the  
configuration of llvm-gcc.

Configure with --with-llvmgccdir=YOUR/PATH doesn't work, instead you  
are supposed to use --with-llvmgcc=PATH/TO/llvm-gcc and  
--with-llvmgxx=/PATH/TO/llvm-g++

That will at least get you past my error.

Best,
Kyle

Quoting nicolas geoffray <nicolas.geoffray at gmail.com>:

> I am running revision 107246 of llvm-gcc.
>
> You can still debug LLVM Makefile framework. I use it to compile my c++
> files to llvm bitcode and then to native.
>
> Nicolas
>
> On Fri, Aug 13, 2010 at 10:47 PM, Kyle T. Klein  
> <kyleklein at umail.ucsb.edu>wrote:
>
>> Hi Nicolas,
>>
>> I suppose the only thing I have yet to try is to match the revision of
>> llvmgcc as well as llvm. So what is the revision of llvmgcc you are using? I
>> shall try that and see if it helps.
>>
>> Best,
>>
>> Kyle
>>
>> Quoting nicolas geoffray <nicolas.geoffray at gmail.com>:
>>
>>  Hi Kyle,
>>>
>>> Yeah, this error does not make sense to me too. I am using lucid, vmkit
>>> latest svn revision and llvm version 110248.
>>>
>>> Nicolas
>>>
>>> On Fri, Aug 13, 2010 at 10:22 PM, Kyle T. Klein <kyleklein at umail.ucsb.edu
>>> >wrote:
>>>
>>>  Hi Nicolas,
>>>>
>>>> I think my problem is with vmkit release 2.7. The llvm and llvm-gcc 2.7
>>>> and
>>>> 2.6 releases both have the same issue when compiling with -with-llvmgcc
>>>> and
>>>> vmkit release 2.7. However, if I use release 2.6 of vmkit I do not see
>>>> this
>>>> strange error in either releases of llvm (though llvm 2.7 won't compile
>>>> with
>>>> vmkit 2.6 for other reasons of course). Vmkit 2.7 does work fine though
>>>> if
>>>> not compiled with -with-llvmgcc, but as soon is that is added, all
>>>> releases
>>>> of llvm hit that same error before any sort of compilation can even
>>>> begin.
>>>>
>>>> Which revision of vmkit are you using? With the most recent one I can't
>>>> have any success with any revisions of llvm and llvm-gcc (when using
>>>> -with-llvmgcc).
>>>>
>>>> I am not sure if I said so before, but I do have all gc but Boehm working
>>>> with vmkit release 2.6.
>>>>
>>>>
>>>> Thanks for the help,
>>>> Kyle
>>>>
>>>> Quoting nicolas geoffray <nicolas.geoffray at gmail.com>:
>>>>
>>>>  Do you have a gcalloc.cpp file in lib/Mvm/Allocator? I guess you have
>>>>
>>>>> since
>>>>> the makefile is outputting it. Try removing the PARALLEL_DIRS to the
>>>>> Makefiles to see if that helps.
>>>>>
>>>>> Otherwise I can't see anything but debugging the LLVM Makefiles: they
>>>>> are
>>>>> the one at fault here. Could you try with version 110248 of llvm? That's
>>>>> the
>>>>> version I'm working with. I hope LLVm did not change their Makefiles in
>>>>> a
>>>>> way that makes vmkit impossible to compile :(
>>>>>
>>>>> Nicolas
>>>>>
>>>>> On Thu, Aug 12, 2010 at 6:27 AM, Kyle T. Klein <
>>>>> kyleklein at umail.ucsb.edu
>>>>> >wrote:
>>>>>
>>>>>  Hi Nicolas,
>>>>>
>>>>>>
>>>>>> I used svn to get the most recent revision, I  also tried release_27
>>>>>> today
>>>>>> and had the same results. However I did try release_26 and had success
>>>>>> in
>>>>>> getting everything running except for boehm (which isn't too surprising
>>>>>> from
>>>>>> what you've said).
>>>>>>
>>>>>> The only difference between the 26 and 27 are the version of ubuntu, 27
>>>>>> is
>>>>>> running on lucid where 26 I had running on hardy. Do you think this
>>>>>> might
>>>>>> have something to do with it?
>>>>>>
>>>>>> Thanks again for your help,
>>>>>>
>>>>>> Kyle Klein
>>>>>>
>>>>>> Quoting nicolas geoffray <nicolas.geoffray at gmail.com>:
>>>>>>
>>>>>>  Hi Kyle,
>>>>>>
>>>>>>
>>>>>>> This error stil does not make sense to me :(. Did you get the sources
>>>>>>> through svn or with a tarball?
>>>>>>>
>>>>>>> Nicolas
>>>>>>>
>>>>>>> On Tue, Aug 10, 2010 at 11:07 PM, Kyle T. Klein <
>>>>>>> kyleklein at umail.ucsb.edu
>>>>>>> >wrote:
>>>>>>>
>>>>>>>  Hi Nicolas,
>>>>>>>
>>>>>>>
>>>>>>>> With make VERBOSE=1 I get the following:
>>>>>>>> :~/vmkit$ make VERBOSE=1
>>>>>>>> for dir in lib tools/vmjc mmtk tools; do \
>>>>>>>>   (make -C $dir all ) || exit 1; \
>>>>>>>>  done
>>>>>>>>
>>>>>>>> make[1]: Entering directory `/cs/student/kyleklein/vmkit/lib'
>>>>>>>> if ([ ! -f Mvm/Makefile ] || \
>>>>>>>>             command test Mvm/Makefile -ot \
>>>>>>>>                   /cs/student/kyleklein/vmkit/lib/Mvm/Makefile );
>>>>>>>> then
>>>>>>>> \
>>>>>>>>   /cs/student/kyleklein/llvm-source/autoconf/mkinstalldirs Mvm; \
>>>>>>>>   /bin/cp /cs/student/kyleklein/vmkit/lib/Mvm/Makefile Mvm/Makefile;
>>>>>>>> \
>>>>>>>>  fi; \
>>>>>>>>  make -C Mvm all
>>>>>>>>
>>>>>>>> make[2]: Entering directory `/cs/student/kyleklein/vmkit/lib/Mvm'
>>>>>>>> for dir in Allocator CommonThread MMTk Runtime Compiler StaticGCPass
>>>>>>>> JITGCPass; do \
>>>>>>>>   (make -C $dir all ) || exit 1; \
>>>>>>>>  done
>>>>>>>>
>>>>>>>> make[3]: Entering directory
>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator'
>>>>>>>> make[3]: *** No rule to make target
>>>>>>>>
>>>>>>>>
>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator/Debug+Asserts/gcalloc.ll',
>>>>>>>> needed by
>>>>>>>>
>>>>>>>>
>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator/Debug+Asserts/gcalloc.bc'.
>>>>>>>>  Stop.
>>>>>>>> make[3]: Leaving directory
>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator'
>>>>>>>> make[2]: *** [all] Error 1
>>>>>>>> make[2]: Leaving directory `/cs/student/kyleklein/vmkit/lib/Mvm'
>>>>>>>> make[1]: *** [Mvm/.makeall] Error 2
>>>>>>>> make[1]: Leaving directory `/cs/student/kyleklein/vmkit/lib'
>>>>>>>> make: *** [all] Error 1
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks for the help,
>>>>>>>> Kyle
>>>>>>>>
>>>>>>>> Quoting nicolas geoffray <nicolas.geoffray at gmail.com>:
>>>>>>>>
>>>>>>>>  Hi Kyle,
>>>>>>>>
>>>>>>>>
>>>>>>>>  Your compile error looks weird, I am not sure what is going wrong.
>>>>>>>>> What
>>>>>>>>> is
>>>>>>>>> the output if you add make VERBOSE=1?
>>>>>>>>>
>>>>>>>>> You can try to download vmkit and llvm versions 2.6 or 2.5 and see
>>>>>>>>> if
>>>>>>>>> the
>>>>>>>>> Boehm GC works there. However, note that many bugfixes have been
>>>>>>>>> added
>>>>>>>>> to
>>>>>>>>> vmkit since, and having a conservative GC is no good for an
>>>>>>>>> efficient
>>>>>>>>> VM.
>>>>>>>>>
>>>>>>>>> Good luck!
>>>>>>>>> Nicolas
>>>>>>>>>
>>>>>>>>> On Tue, Aug 10, 2010 at 1:20 AM, Kyle T. Klein <
>>>>>>>>> kyleklein at umail.ucsb.edu
>>>>>>>>> >wrote:
>>>>>>>>>
>>>>>>>>>  Hi Nicolas,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  I rebuilt my llvm linked with llvm-gcc this time, so those errors
>>>>>>>>>> went
>>>>>>>>>> away. However, whenever I build with --with-llvmgc flag things fail
>>>>>>>>>> early
>>>>>>>>>> on
>>>>>>>>>> all garbage collectors. I'm not quite sure what is causing this.
>>>>>>>>>> Note
>>>>>>>>>> that
>>>>>>>>>> things are fine without the llvmgcc (on single/multi map) and
>>>>>>>>>> llvmgcc
>>>>>>>>>> works
>>>>>>>>>> outside vmkit.
>>>>>>>>>>
>>>>>>>>>> ~/vmkit$ ./configure
>>>>>>>>>> --with-llvmsrc=/cs/student/kyleklein/llvm-source
>>>>>>>>>> --with-llvmobj=/cs/student/kyleklein/llvm-source
>>>>>>>>>> --with-gnu-classpath-glibj=$CLASSPATH
>>>>>>>>>> --with-gnu-classpath-libs=$CLASSPATHLIB --with-gc=mmtk
>>>>>>>>>> -with-llvmgcc
>>>>>>>>>>
>>>>>>>>>> ~/vmkit$ make
>>>>>>>>>>
>>>>>>>>>> make[1]: Entering directory `/cs/student/kyleklein/vmkit/lib'
>>>>>>>>>> make[2]: Entering directory `/cs/student/kyleklein/vmkit/lib/Mvm'
>>>>>>>>>> make[3]: Entering directory
>>>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator'
>>>>>>>>>> make[3]: *** No rule to make target
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator/Debug+Asserts/gcalloc.ll',
>>>>>>>>>> needed by
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator/Debug+Asserts/gcalloc.bc'.
>>>>>>>>>>  Stop.
>>>>>>>>>> make[3]: Leaving directory
>>>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator'
>>>>>>>>>>
>>>>>>>>>> make[2]: *** [all] Error 1
>>>>>>>>>> make[2]: Leaving directory `/cs/student/kyleklein/vmkit/lib/Mvm'
>>>>>>>>>> make[1]: *** [Mvm/.makeall] Error 2
>>>>>>>>>> make[1]: Leaving directory `/cs/student/kyleklein/vmkit/lib'
>>>>>>>>>> make: *** [all] Error 1
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Also on a side note (even though you are removing Boehm), I did get
>>>>>>>>>> farther
>>>>>>>>>> in the build until I am unable to resolve a symbol to gc_header. I
>>>>>>>>>> believe
>>>>>>>>>> it was in a file that was removed. Do you know of any revisions
>>>>>>>>>> where
>>>>>>>>>> I
>>>>>>>>>> could get Boehm working?  Would like to get it working very badly.
>>>>>>>>>>
>>>>>>>>>> Thanks for your help!
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Kyle Klein
>>>>>>>>>>
>>>>>>>>>> Quoting nicolas geoffray <nicolas.geoffray at gmail.com>:
>>>>>>>>>>
>>>>>>>>>>  Hi Kyle,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  The Boehm GC configuration of VMKit hasn't been tested/run for a
>>>>>>>>>>
>>>>>>>>>>> while,
>>>>>>>>>>> and
>>>>>>>>>>> I plan to remove it in the next release. So either choose MMTk or
>>>>>>>>>>> GCMmap2
>>>>>>>>>>> for the GC.
>>>>>>>>>>>
>>>>>>>>>>> For MTMk, maybe the build system is not clever enough to fail when
>>>>>>>>>>> MMTk
>>>>>>>>>>> is
>>>>>>>>>>> specified but not llvm-gcc. And at runtime, MMTk won't work
>>>>>>>>>>> wihtout
>>>>>>>>>>> llvm-gcc. VMkit gets llvm-gcc from LLVM, so you need to configure
>>>>>>>>>>> llvm
>>>>>>>>>>> with
>>>>>>>>>>> a link to llvm-gcc.
>>>>>>>>>>>
>>>>>>>>>>> Let me know if you run into more trouble.
>>>>>>>>>>>
>>>>>>>>>>> Nicolas
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Aug 6, 2010 at 1:42 AM, Kyle T. Klein <
>>>>>>>>>>> kyleklein at umail.ucsb.edu
>>>>>>>>>>> >wrote:
>>>>>>>>>>>
>>>>>>>>>>>  Hello,
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>  I've been able to get J3 working with the single and multimap
>>>>>>>>>>>
>>>>>>>>>>>> garbage
>>>>>>>>>>>> collectors but have hit several snags with Boehm and MMTk.
>>>>>>>>>>>>
>>>>>>>>>>>> For MMTk I get here:
>>>>>>>>>>>> Buildfile: /cs/student/kyleklein/vmkit/mmtk/java/build.xml
>>>>>>>>>>>>
>>>>>>>>>>>> main:
>>>>>>>>>>>>  [mkdir] Created dir:
>>>>>>>>>>>> /cs/student/kyleklein/vmkit/mmtk/java/classes
>>>>>>>>>>>>  [javac] Compiling 373 source files to
>>>>>>>>>>>> /cs/student/kyleklein/vmkit/mmtk/java/classes
>>>>>>>>>>>>  [javac] Note: Some input files use or override a deprecated API.
>>>>>>>>>>>>  [javac] Note: Recompile with -Xlint:deprecation for details.
>>>>>>>>>>>>  [jar] Building jar:
>>>>>>>>>>>> /cs/student/kyleklein/vmkit/mmtk/java/mmtk-vmkit.jar
>>>>>>>>>>>>
>>>>>>>>>>>> BUILD SUCCESSFUL
>>>>>>>>>>>> Total time: 6 seconds
>>>>>>>>>>>> llvm[2]: Building Debug+Asserts mmtk-vmkit.jar all
>>>>>>>>>>>> /cs/student/kyleklein/llvm-source/Debug+Asserts/bin/opt:
>>>>>>>>>>>> /cs/student/kyleklein/vmkit/Debug+Asserts/lib/MMTKAlloc.bc: Could
>>>>>>>>>>>> not
>>>>>>>>>>>> open input file: No such file or directory
>>>>>>>>>>>> make[2]: *** [all] Error 1
>>>>>>>>>>>> make[2]: Leaving directory
>>>>>>>>>>>> `/cs/student/kyleklein/vmkit/mmtk/java'
>>>>>>>>>>>> make[1]: *** [all] Error 1
>>>>>>>>>>>> make[1]: Leaving directory `/cs/student/kyleklein/vmkit/mmtk'
>>>>>>>>>>>> make: *** [all] Error 1
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> For Boehm the following error causes a large stream of errors and
>>>>>>>>>>>> a
>>>>>>>>>>>> fail:
>>>>>>>>>>>>
>>>>>>>>>>>> make[1]: Entering directory `/cs/student/kyleklein/vmkit/lib'
>>>>>>>>>>>> make[2]: Entering directory `/cs/student/kyleklein/vmkit/lib/Mvm'
>>>>>>>>>>>> make[3]: Entering directory
>>>>>>>>>>>> `/cs/student/kyleklein/vmkit/lib/Mvm/Allocator'
>>>>>>>>>>>> llvm[3]: Compiling gcalloc.cpp for Debug+Asserts build
>>>>>>>>>>>> In file included from
>>>>>>>>>>>> /cs/student/kyleklein/vmkit/include/mvm/Allocator.h:19,
>>>>>>>>>>>>             from
>>>>>>>>>>>> /cs/student/kyleklein/vmkit/include/mvm/VirtualMachine.h:18,
>>>>>>>>>>>>             from gcchunk.h:13,
>>>>>>>>>>>>             from gcalloc.h:15,
>>>>>>>>>>>>             from gcalloc.cpp:10:
>>>>>>>>>>>> /cs/student/kyleklein/vmkit/include/mvm/Threads/Locks.h:17:26:
>>>>>>>>>>>> error:
>>>>>>>>>>>> ObjectHeader.h: No such file or directory
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Lastly whenever I configure with the --with-llvmgcc option,
>>>>>>>>>>>> regardless
>>>>>>>>>>>> of which of the four collectors I use I see this:
>>>>>>>>>>>>
>>>>>>>>>>>> /cs/student/kyleklein/llvm-source/Makefile.rules:1042: Modules
>>>>>>>>>>>> require
>>>>>>>>>>>> LLVM capable compiler but none is available ****
>>>>>>>>>>>>
>>>>>>>>>>>> I believe this has something to do with having installed llvm
>>>>>>>>>>>> before
>>>>>>>>>>>> llvm-gcc. I'm not sure if this is causing my MMTk issues since it
>>>>>>>>>>>> says
>>>>>>>>>>>> in the configure file that llvm-gcc is required.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks for the help,
>>>>>>>>>>>> Kyle
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> LLVM Developers mailing list
>>>>>>>>>>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>>>>>>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>   --
>>>>>>>>>>>
>>>>>>>>>> Kyle T. Klein
>>>>>>>>>> kyleklein at umail.ucsb.edu
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>  --
>>>>>>>> Kyle T. Klein
>>>>>>>> kyleklein at umail.ucsb.edu
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Kyle T. Klein
>>>>>> kyleklein at umail.ucsb.edu
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> --
>>>> Kyle T. Klein
>>>> kyleklein at umail.ucsb.edu
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Kyle T. Klein
>> kyleklein at umail.ucsb.edu
>>
>>
>



-- 
Kyle T. Klein
kyleklein at umail.ucsb.edu




More information about the llvm-dev mailing list