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

Koutheir Attouchi koutheir at gmail.com
Wed Jun 13 01:56:44 PDT 2012


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20120613/f16c0516/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vmkit-debug.patch
Type: application/octet-stream
Size: 45947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20120613/f16c0516/attachment.obj>


More information about the vmkit-commits mailing list