[vmkit-commits] vmkit doesn't support debug build?

Wei Tang tangwei.ict at gmail.com
Wed Jun 13 23:01:26 PDT 2012


see attachment!

On Wed, Jun 13, 2012 at 11:31 PM, Koutheir Attouchi <koutheir at gmail.com>wrote:

> Please send me the file vmkit/lib/j3/VMCore/JavaClass.h
>
>
> Koutheir ATTOUCHI.
> LinkedIn profile: http://www.linkedin.com/in/koutheirattouchi
> Blog: http://koutheir.blogspot.com
>
>
>
>
> On Wed, Jun 13, 2012 at 5:21 PM, Wei Tang <tangwei.ict at gmail.com> wrote:
>
>> new errors coming when building vmkit after recompiling llvm.
>>
>> /wsp/cmplr/vmkit/vmkit/lib/j3/VMCore/JavaClass.h:1062:48: error:
>> non-const lvalue reference to type 'va_list'
>>       (aka '__builtin_va_list') cannot bind to a value of unrelated type
>> '__va_list_tag *'
>>                 jvalue* buffer = marshalArguments(allocator, ap);
>>                                                              ^~
>> /wsp/cmplr/vmkit/vmkit/lib/j3/VMCore/JavaClass.h:996:71: note: passing
>> argument to parameter 'ap' here
>>         jvalue* marshalArguments(vmkit::ThreadAllocator& allocator,
>> va_list& ap);
>>
>> ^
>> /wsp/cmplr/vmkit/vmkit/lib/j3/VMCore/JavaClass.h:1072:48: error:
>> non-const lvalue reference to type 'va_list'
>>       (aka '__builtin_va_list') cannot bind to a value of unrelated type
>> '__va_list_tag *'
>>                 jvalue* buffer = marshalArguments(allocator, ap);
>>                                                              ^~
>> /wsp/cmplr/vmkit/vmkit/lib/j3/VMCore/JavaClass.h:996:71: note: passing
>> argument to parameter 'ap' here
>>         jvalue* marshalArguments(vmkit::ThreadAllocator& allocator,
>> va_list& ap);
>>
>> ^
>> /wsp/cmplr/vmkit/vmkit/lib/j3/VMCore/JavaClass.h:1079:48: error:
>> non-const lvalue reference to type 'va_list'
>>       (aka '__builtin_va_list') cannot bind to a value of unrelated type
>> '__va_list_tag *'
>>                 jvalue* buffer = marshalArguments(allocator, ap);
>>                                                              ^~
>> /wsp/cmplr/vmkit/vmkit/lib/j3/VMCore/JavaClass.h:996:71: note: passing
>> argument to parameter 'ap' here
>>         jvalue* marshalArguments(vmkit::ThreadAllocator& allocator,
>> va_list& ap);
>>
>>
>> Regards!
>> wei
>>
>>
>> On Wed, Jun 13, 2012 at 9:50 PM, Koutheir Attouchi <koutheir at gmail.com>wrote:
>>
>>> Oh I forgot, you should also patch some LLVM source files. Here is a
>>> patch file to do so. Remember to recompile LLVM once you patch the files.
>>> You don't have to reconfigure LLVM.
>>>
>>>
>>> Koutheir ATTOUCHI.
>>> LinkedIn profile: http://www.linkedin.com/in/koutheirattouchi
>>> Blog: http://koutheir.blogspot.com
>>>
>>>
>>>
>>>
>>> On Wed, Jun 13, 2012 at 3:42 PM, Wei Tang <tangwei.ict at gmail.com> wrote:
>>>
>>>> Got new compilation error when building vmkit.
>>>>
>>>> /wsp/cmplr/vmkit/vmkit/obj/lib/vmkit/CommonThread/Debug+Asserts/Sigsegv_gc.s:
>>>> Assembler messages:
>>>> /wsp/cmplr/vmkit/vmkit/obj/lib/vmkit/CommonThread/Debug+Asserts/Sigsegv_gc.s:18:
>>>> Error: file number 1 already allocated
>>>>
>>>> Regards!
>>>> wei
>>>>
>>>>
>>>> On Wed, Jun 13, 2012 at 4:56 PM, Koutheir Attouchi <koutheir at gmail.com>wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> First, VMKit is compiled using LLVM tools. You probably need to
>>>>> compile LLVM in debug mode before compiling VMKit in debug mode. I do this
>>>>> using the commands:
>>>>>
>>>>> svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
>>>>> cd llvm/tools
>>>>> svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
>>>>> cd ../projects
>>>>> svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
>>>>> cd ..
>>>>> ./configure --disable-optimized --enable-assertions
>>>>> --enable-debug-runtime --enable-debug-symbols --enable-jit --enable-threads
>>>>> --enable-pthreads --enable-pic --enable-targets=x86,cpp
>>>>> make -j12 ENABLE_OPTIMIZED=0 BUILD_EXAMPLES=0 ENABLE_DOCS=0
>>>>>
>>>>> This might take a long time to compile.
>>>>> Next, you get vmkit, patch it, configure it for debug mode then
>>>>> compile it:
>>>>>
>>>>> svn co http://llvm.org/svn/llvm-project/vmkit/trunk vmkit
>>>>> cd vmkit
>>>>> patch -p0 < /path/to/vmkit-debug.patch
>>>>> ./configure --with-llvmsrc=/path/to/llvm --with-llvmobj=/path/to/llvm
>>>>> --with-gnu-classpath-libs=/path/to/classpath/lib
>>>>> --with-gnu-classpath-glibj=/usr/local/classpath/share/classpath/glibj.zip
>>>>> make -j12
>>>>>
>>>>> The patch modifies configure files and makefiles and source files. So
>>>>> patch a verbatim copy of VMKit and do run configure *after* patching.
>>>>> If you have issues feel free to ask.
>>>>>
>>>>> Cordially.
>>>>>
>>>>>
>>>>> Koutheir ATTOUCHI.
>>>>> LinkedIn profile: http://www.linkedin.com/in/koutheirattouchi
>>>>> Blog: http://koutheir.blogspot.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Jun 13, 2012 at 9:13 AM, Wei Tang <tangwei.ict at gmail.com>wrote:
>>>>>
>>>>>> Thanks a lot for help!
>>>>>>
>>>>>> Regards!
>>>>>> wei
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 13, 2012 at 3:01 PM, Koutheir Attouchi <
>>>>>> koutheir at gmail.com> wrote:
>>>>>>
>>>>>>> I'll send you the patch soon. If you have specific questions then
>>>>>>> post them on the mailing list. I advise you to read the code (at least the
>>>>>>> headers) before debugging.
>>>>>>>
>>>>>>> Koutheir Attouchi.
>>>>>>> On Jun 13, 2012 4:32 AM, "Wei Tang" <tangwei.ict at gmail.com> wrote:
>>>>>>>
>>>>>>>> Would you send me the patch? I hope to understand more details by
>>>>>>>> debugging instead of  just reading source code.
>>>>>>>> Thanks in advance!
>>>>>>>>
>>>>>>>> Regards!
>>>>>>>> tangwei
>>>>>>>>
>>>>>>>> On Wed, Jun 13, 2012 at 9:52 AM, Koutheir Attouchi <
>>>>>>>> koutheir at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Officially, VMKit does not support debug builds. But I can make a
>>>>>>>>> patch that makes it work in debug build. However, my modifications are not
>>>>>>>>> yet committed and I qualify them to be in beta stage. If you don't need
>>>>>>>>> debugging, stick with the trunk version. If you really need it, I can send
>>>>>>>>> you a patch that enables debugging.
>>>>>>>>>
>>>>>>>>> Koutheir ATTOUCHI.
>>>>>>>>> LinkedIn profile: http://www.linkedin.com/in/koutheirattouchi
>>>>>>>>> Blog: http://koutheir.blogspot.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Jun 13, 2012 at 3:29 AM, Wei Tang <tangwei.ict at gmail.com>wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>   Does vmkit support debug build now?  I can build successfully
>>>>>>>>>> with "make ENABLE_OPTIMIZED=1", but failed with "make".
>>>>>>>>>> Following is error message for your reference.
>>>>>>>>>>
>>>>>>>>>> llvm[0]: Constructing LLVMBuild project information.
>>>>>>>>>> make[1]: Entering directory
>>>>>>>>>> `/wsp/cmplr/vmkit/vmkit/obj-debug/lib/vmkit/StaticGCPass'
>>>>>>>>>> llvm[1]: Compiling StaticGCPass.cpp for Debug+Asserts build (PIC)
>>>>>>>>>> llvm[1]: Linking Debug+Asserts Loadable Module StaticGCPass.so
>>>>>>>>>> make[1]: *** No rule to make target
>>>>>>>>>> `/wsp/cmplr/vmkit/vmkit/obj-debug/lib/vmkit/StaticGCPass/Debug+Asserts/StaticGCPass.ll',
>>>>>>>>>> needed by
>>>>>>>>>> `/wsp/cmplr/vmkit/vmkit/obj-debug/lib/vmkit/StaticGCPass/Debug+Asserts/StaticGCPass.bc'.
>>>>>>>>>>  Stop.
>>>>>>>>>> make[1]: Leaving directory
>>>>>>>>>> `/wsp/cmplr/vmkit/vmkit/obj-debug/lib/vmkit/StaticGCPass'
>>>>>>>>>> make: *** [all] Error 1
>>>>>>>>>>
>>>>>>>>>> my configure line:
>>>>>>>>>> ../configure --with-llvmsrc=/wsp/cmplr/vmkit/llvm
>>>>>>>>>> --with-llvmobj=/wsp/cmplr/vmkit/llvm/obj
>>>>>>>>>> --with-gnu-classpath-glibj=/wsp/cmplr/vmkit/classpath-0.97.2/lib/glibj.zip
>>>>>>>>>>  --with-gnu-classpath-libs=/wsp/cmplr/vmkit/classpath-0.97.2/lib
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards
>>>>>>>>>> wei
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> vmkit-commits mailing list
>>>>>>>>>> vmkit-commits at cs.uiuc.edu
>>>>>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> vmkit-commits mailing list
>>>>>>>>> vmkit-commits at cs.uiuc.edu
>>>>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards
>>>>>>>> tangwei
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> vmkit-commits mailing list
>>>>>>>> vmkit-commits at cs.uiuc.edu
>>>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>>>>>>>
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> vmkit-commits mailing list
>>>>>>> vmkit-commits at cs.uiuc.edu
>>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards
>>>>>> tangwei
>>>>>>
>>>>>> _______________________________________________
>>>>>> vmkit-commits mailing list
>>>>>> vmkit-commits at cs.uiuc.edu
>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> vmkit-commits mailing list
>>>>> vmkit-commits at cs.uiuc.edu
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards
>>>> tangwei
>>>>
>>>> _______________________________________________
>>>> vmkit-commits mailing list
>>>> vmkit-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>>>
>>>>
>>>
>>> _______________________________________________
>>> vmkit-commits mailing list
>>> vmkit-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>>
>>>
>>
>>
>> --
>> Best Regards
>> tangwei
>>
>> _______________________________________________
>> vmkit-commits mailing list
>> vmkit-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>>
>>
>
> _______________________________________________
> vmkit-commits mailing list
> vmkit-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>
>


-- 
Best Regards
tangwei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20120614/732f86b8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JavaClass.h
Type: text/x-chdr
Size: 38397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20120614/732f86b8/attachment.h>


More information about the vmkit-commits mailing list