Empty compile_commands.json file

1,024 views
Skip to first unread message

Harikrishna Pai

unread,
Jul 5, 2013, 12:06:58 PM7/5/13
to oclint...@googlegroups.com
Hi,

I followed the steps mentioned in your site to install OCLint 0.7.
"$ xcodebuild -target MyProject -configuration Debug -scheme MyProject | tee xcodebuild.log" command shows that the project has been build successfully and I can see the xcodebuild.log in the project folder.
After that when I use "oclint-xcodebuild" command, an empty compile_commands.json file is created (content only has []).
Please help me to fix this issue.

Xcode version: 4.6
OCLint version: 0.7
Mac OS X: 10.7.4

Thanks in advance.

--
Hari

Longyi Qi

unread,
Jul 6, 2013, 11:33:17 AM7/6/13
to Harikrishna Pai, oclint...@googlegroups.com
Hi Hari,

Would you like to try replace oclint-xcodebuild with https://raw.github.com/oclint/oclint-xcodebuild/master/oclint-xcodebuild? And see if it works?

I understand projects are intellectual property, but If we could by any chance have your xcodebuild.log, that would be very helpful.

Thanks,
Longyi




--
You received this message because you are subscribed to the Google Groups "OCLint Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to oclint-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Harikrishna Pai

unread,
Jul 8, 2013, 2:26:49 AM7/8/13
to oclint...@googlegroups.com, Harikrishna Pai
Hi Longyi,

Thanks for your reply. 
I've tried again using the new oclint-xcodebuild that you've provided but I'm getting the same result.
I can't figure out where I went wrong.
I've send the xcodebuild.log file to your email address lqi+contact at longyiqi dot com.
Please check when you get time.

--
Thanks,
Hari

Longyi Qi

unread,
Jul 8, 2013, 9:20:36 AM7/8/13
to Harikrishna Pai, oclint...@googlegroups.com
Hi Hari,
Thanks for your trust.

I have noticed the empty spaces in the path, namely "Xcode 4.6" and "Supporting Files". Even though OCLint itself supports empty spaces in the path, however, oclint-xcodebuild and oclint-json-compilation-database sometimes cannot recognize those empty spaces properly. 


Sorry about this, but you need to either remove the empty spaces from your path or manually create your compile_comamnds.json from xcodebuild.log.

Regards,
Longyi


On Jul 8, 2013, at 1:26 AM, Harikrishna Pai <harikri...@gmail.com> wrote:

Hi Longyi,

Thanks for your reply. 
I've tried again using the new oclint-xcodebuild that you've provided but I'm getting the same result.
I can't figure out where I went wrong.
I've send the xcodebuild.log file to your email addresslqi+contact at longyiqi dot com.

Harikrishna Pai

unread,
Jul 11, 2013, 10:14:27 AM7/11/13
to oclint...@googlegroups.com, Harikrishna Pai
Hi Longyi,

Sorry for the delay in response. You are absolutely correct. The empty spaces caused the issues.
I removed the spaces from the path and the compile_commands.json file was created successfully (Hurray!!).
Now I'm facing another issue. When I'm using the command "oclint-json-compilation-database" I'm getting an error as follows:

$ oclint-json-compilation-database
Assertion failed: (SourceMgr && "SourceManager not set!"), function getSourceManager, file /Users/lqi/.jenkins/workspace/oclint-ci/oclint/build/llvm-install/include/clang/Basic/Diagnostic.h, line 370.

Have you ever came across such an error?

Thanks,
Hari

Longyi Qi

unread,
Jul 11, 2013, 10:28:44 AM7/11/13
to Harikrishna Pai, oclint...@googlegroups.com
Glad to hear this is making progress. 

Another thread is also discussing this issue. But it might be other empty spaces still exist in the compile_commands.json file. May I have the latest compile_command.json? I am happy to give it another shot.

Regards,
Longyi

Harikrishna Pai

unread,
Jul 11, 2013, 11:01:22 AM7/11/13
to oclint...@googlegroups.com, Harikrishna Pai
Hi Longyi,

I've mailed you the compile_commands.json file. Please have a look at it. I really appreciate your support.

Thanks,
Hari

Longyi Qi

unread,
Jul 11, 2013, 1:26:32 PM7/11/13
to Harikrishna Pai, oclint...@googlegroups.com
Thank you for your trust. 

Could you help run "oclint-json-compilation-database -- -debug" for me and send the output? I am particularly interested in counting some dots to understand which file cause the problem.

Thanks,
Longyi

Harikrishna Pai

unread,
Jul 15, 2013, 6:18:37 AM7/15/13
to oclint...@googlegroups.com, Harikrishna Pai
Hi,

I've send the output of "oclint-json-compilation-database -- -debug" to your mail. Please check once you are free.

Thanks,
Hari

Harikrishna Pai

unread,
Jul 23, 2013, 8:19:52 AM7/23/13
to oclint...@googlegroups.com, Harikrishna Pai
Hi Longyi,

Any update on the issue? I am eagerly waiting to get an answer from you.

Thanks,
Hari

Longyi Qi

unread,
Jul 23, 2013, 8:29:29 AM7/23/13
to Harikrishna Pai, oclint...@googlegroups.com, Harikrishna Pai
Sorry for the lack of responsiveness. I am waiting for Apple developer portal to be back on line, and upgrade the build machine. We have three pull requests that I would like to merge, and one of them contains the feature would very quickly locate the problematic source file for us. I will let you know once I have the build for you. Thanks for baring with me.

Longyi

Harikrishna Pai

unread,
Jul 25, 2013, 5:42:36 AM7/25/13
to oclint...@googlegroups.com, Harikrishna Pai
Thank you very much for your continued interest. I appreciate your support. I'll be happy to wait until everything is set up correctly.

Regards,
Hari

Harikrishna Pai

unread,
Aug 5, 2013, 3:04:07 AM8/5/13
to oclint...@googlegroups.com, Harikrishna Pai
Hi Longyi,

Is there any progress on the issue? BTW, I tried to run oclint on another new project and it ran without any errors. I was able to generate report.html successfully. It seems like a specific error related to the particular project.

Regards,
Hari

Longyi Qi

unread,
Aug 6, 2013, 1:17:39 PM8/6/13
to Harikrishna Pai, oclint...@googlegroups.com
Hi Harikrishna,

This might not fix the issue, but it would help me identify the problematic file. Please use the oclint dev version below


Use most recent oclint-xcodebuild included in this archive for generating the compile_commands.json file, and afterwards, run oclint-json-compilation-database again with -debug flag on. 

I would appreciate it if you could send me the generated compile_commands.json file and the capture of debug outputs.

Many thanks,
Longyi


Stephen Yao

unread,
Feb 10, 2014, 12:26:50 AM2/10/14
to oclint...@googlegroups.com, Harikrishna Pai
Hello

I am wondering if you had any luck resolving this issue? I'm getting the same output too.

Regards,
Stephen

Bandhavi Vinay

unread,
Jul 21, 2014, 8:25:00 AM7/21/14
to oclint...@googlegroups.com
Hi I have the same issue

Assertion failed: (SourceMgr && "SourceManager not set!"), function getSourceManager, file /Users/lqi/.jenkins/workspace/oclint-ci/oclint-build-nodes/master/oclint/llvm/tools/clang/include/clang/Basic/Diagnostic.h, line 384.

Any updates on this ?

Michenux

unread,
Oct 10, 2014, 11:08:20 AM10/10/14
to oclint...@googlegroups.com
Same problem.

I use xcodebuild 5.1.1, xctool 2.1 and oclint 0.9.dev.2f6dcda 

Ryuichi Saito

unread,
Oct 18, 2014, 10:47:02 AM10/18/14
to oclint...@googlegroups.com
Maybe upgrade to Xcode 6 would help.
Reply all
Reply to author
Forward
0 new messages