<div dir="ltr">On Wed, Oct 30, 2013 at 4:54 AM, rayjcwu <span dir="ltr"><<a href="mailto:rayjcwu@gmail.com" target="_blank">rayjcwu@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Edwin Vane replied me says compilation database should be self contained.<br>
First I need to make sure the compile_commands.json is generated with using<br>
clang and I could use clang to build opencv.<br>
<br>
I set these environment variables<br>
<br>
export CC=/home/jcwu/repos/llvm-release/Release/bin/clang<br>
export CXX=/home/jcwu/repos/llvm-release/Release/bin/clang++<br>
export<br>
C_INCLUDE_PATH=/usr/local/include:/home/jcwu/repos/llvm-release/Release/lib/clang/3.4/include:/usr/include/x86_64-linux-gnu:/usr/include<br>
# these are from clang -v -c files.cpp<br>
export<br>
CPLUS_INCLUDE_PATH=/usr/local/include:/home/jcwu/repos/llvm-release/Release/lib/clang/3.4/include:/usr/include/x86_64-linux-gnu:/usr/include<br>
<br>
then regenerate compile_commands.json, it could find stddef.h but new issue<br>
comes up<br>
<br>
[ 31%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/ts.cpp.o<br>
In file included from /home/jcwu/repos/opencv/modules/ts/src/ts.cpp:116:<br>
/usr/include/setjmp.h:60:12: error: conflicting types for '__sigsetjmp'<br>
extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask)<br>
__THROWNL;<br>
           ^<br>
/usr/include/pthread.h:727:12: note: previous declaration is here<br>
extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask)<br>
__THROW;<br>
           ^<br>
1 error generated.<br>
make[2]: *** [modules/ts/CMakeFiles/opencv_ts.dir/src/ts.cpp.o] Error 1<br>
make[1]: *** [modules/ts/CMakeFiles/opencv_ts.dir/all] Error 2<br>
make: *** [all] Error 2<br>
<br>
I can't use clang to build opencv due to a type conflict or two system<br>
header files.<br>
Havne't figured out how to solve this.<br></blockquote><div><br></div><div>Well, if you cannot use clang to build your code, you cannot use libtooling to parse it (or am I misunderstanding something?)</div><div><br></div>
<div>Cheers,</div><div>/Manuel</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>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/How-to-use-libtooling-to-parse-multiple-files-at-once-and-succesfully-find-stddef-h-tp4035389p4035422.html" target="_blank">http://clang-developers.42468.n3.nabble.com/How-to-use-libtooling-to-parse-multiple-files-at-once-and-succesfully-find-stddef-h-tp4035389p4035422.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Clang Developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>