[cfe-dev] Asserts in Clang crashes my Kdevelop

Richard Smith richard at metafoo.co.uk
Mon Jan 26 19:35:21 PST 2015


On Mon, Jan 26, 2015 at 8:50 AM, Lucas Tanure <ltanure at gmail.com> wrote:

> Hi,
>
> Newbie here.
> I'm trying to understand a few issues in kdevelop clang plugin, and for
> that I would like to use clang in debug mode.
> But when I compile 3.5.1 for Debug, asserts come too, and this give a
> crash in kdevelop:
>
> Program received signal SIGABRT, Aborted.
> [Switching to Thread 0x7fffd73ea700 (LWP 7083)]
> 0x00007fffef77ba97 in raise () from /usr/lib/libc.so.6
> #0  0x00007fffef77ba97 in raise () from /usr/lib/libc.so.6
> #1  0x00007fffef77ce6a in abort () from /usr/lib/libc.so.6
> #2  0x00007fffef7748bd in *__assert_fail_base* () from /usr/lib/libc.so.6
> #3  0x00007fffef774972 in *__assert_fail* () from /usr/lib/libc.so.6
> #4  0x00007fffaab15bd7 in
> clang::comments::Lexer::lexVerbatimBlockFirstLine (this=0x7fffd73e85f0,
> T=...) at
> /home/tanure/workspace/llvm/tools/clang/lib/AST/CommentLexer.cpp:468
> #5  0x00007fffaab15e56 in clang::comments::Lexer::lexVerbatimBlockBody
> (this=0x7fffd73e85f0, T=...) at
> /home/tanure/workspace/llvm/tools/clang/lib/AST/CommentLexer.cpp:517
> #6  0x00007fffaab1521c in clang::comments::Lexer::lexCommentText
> (this=0x7fffd73e85f0, T=...) at
> /home/tanure/workspace/llvm/tools/clang/lib/AST/CommentLexer.cpp:295
> #7  0x00007fffaab16cc8 in clang::comments::Lexer::lex
> (this=0x7fffd73e85f0, T=...) at
> /home/tanure/workspace/llvm/tools/clang/lib/AST/CommentLexer.cpp:802
>
> I just want to compile clang in debug mode without asserts.
>
> How I compile:
>
> svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_351/*F*inal/
> *llvm*
> cd llvm/tools
> svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_351/final/
> *clang*
> cd llvm/tools/clang/tools
> svn co
> http://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_351/final/
> *extra*
> cd llvm/projects
> svn co
> http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_351/final/
> *compiler-rt*
>
> and in other folder , like clang_build
> cd clang_build
> cmake -DCMAKE_INSTALL_PREFIX=/opt/llvm -DCMAKE_BUILD_TYPE=Debug
> -DPYTHON_EXECUTABLE=/usr/bin/python2.7  llvm (path to llvm)
> make
> make install
>
> So, there is any way to compile in debug without asserts ?
>

Yes. Add -DLLVM_ENABLE_ASSERTIONS=OFF to your cmake invocation.


> Thanks
>
> --
> Lucas A. Tanure Alves
> +55 (19) 988176559
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150126/786be456/attachment.html>


More information about the cfe-dev mailing list