Closed
Description
Issue Summary
Seeing a similar issue to #221, where I get an error of oclint: error: one compiler command contains multiple jobs:
when trying to run OCLint.
Environment
- Operation system name and version: macOS 10.12.6
- OCLint version: 0.12 & 0.13
- How OCLint is installed: local build? prebuilt binary downloaded from github? homebrew install? others? Tested with local build and prebuilt binary from github.
- I am also using Xcode 9
Reproduction Steps
Download attached zip file, run build.sh
Sample code
See sample project
Expected Behavior
Should be able to lint.
Actual Behavior
oclint: error: one compiler command contains multiple jobs:
Sample project
https://drive.google.com/file/d/0B7brsNYK8KqpS1BKR0djZE1hbE0/view?usp=sharing
Activity
MichaelKellyTD commentedon Sep 26, 2017
Also reported in #441
dynamicdispatch commentedon Sep 26, 2017
Appears this might be related to the new "Enable-Index while Building" setting. By disabling
COMPILER_INDEX_STORE_ENABLE
I was able to get further in the build process. I now see this:ryuichis commentedon Sep 26, 2017
This type of issues, based on its reporting history, always happen during the time from June (WWDC, and developer beta versions) to Sept (the GM is finally available), when many things are in a transition unstable state. I speculate this is the same case this year.
Usually a new OCLint that matches the macOS/Xcode version will fix the issue. The High Sierra was finally officially released yesterday, so I can cut an OCLint release this week.
Before that, you may pre-download from this link https://github.com/oclint/oclint/releases/download/untagged-91b3ee2c6975e6f3ed68/oclint-0.13-x86_64-darwin-17.0.0.tar.gz, and manually set up locally.
dynamicdispatch commentedon Sep 26, 2017
Thanks @ryuichis, I'll test that out. Your link doesn't work for me?
dynamicdispatch commentedon Sep 26, 2017
I can also confirm that the combination of disabling
COMPILER_INDEX_STORE_ENABLE
and 0.13 does indeed work for me. Thanks for all your work on OCLint @ryuichis, it's definitely appreciated :)cuixuejiao commentedon Sep 27, 2017
https://github.com/oclint/oclint/releases/download/untagged-91b3ee2c6975e6f3ed68/oclint-0.13-x86_64-darwin-17.0.0.tar.gz
@ryuichis Does this link correct? 404 not found....
---Update:
The link above does not correct. Disable COMPILER_INDEX_STORE_ENABLE with the latest 0.13 version does work for me. Thank you~
shorbenko commentedon Oct 2, 2017
If you are using Cocoa Pods don't forget to set COMPILER_INDEX_STORE_ENABLE for all pod targets.
kronenthaler commentedon Oct 3, 2017
Xcode9, macOS 10.12.6 and oclint 0.13 doesn't work with disabling COMPILER_INDEX_STORE_ENABLE (=NO).
I tried both version published on the Release page (16.7.0 and 17.0.0) without luck.
workhardupc commentedon Oct 11, 2017
same as @kronenthaler, not work
ryzn0518 commentedon Oct 16, 2017
same as @kronenthaler , not work again
lubbo commentedon Oct 16, 2017
Xcode9, macOS 10.12.6 and oclint 0.13
Using test project and setting COMPILER_INDEX_STORE_ENABLE = NO on project build setting all goes fine.
In my project:
Settings COMPILER_INDEX_STORE_ENABLE = NO on all projects (pods and not):
Exit status of command 'cd /___/platform-ios && oclint -report-type=pmd -o=/___/platform-ios/iOS/lib/___/Build/fastlane_workspace/oclint-reports/oclint.xml -list-enabled-rules -rc=LONG_LINE=200 -max-priority-1=10000 -max-priority-2=10000 -max-priority-3=10000 -p /___/platform-ios/iOS/lib/___/Build/fastlane_workspace/test-reports " [...] was 6 instead of 0.
As per http://oclint-docs.readthedocs.io/en/stable/manual/oclint.html means
But the source code compiles properly ...
a13906285175 commentedon Oct 31, 2017
same as @kronenthaler, not work.
Xcode9, macOS 10.12.6 and oclint 0.13 doesn't work with disabling COMPILER_INDEX_STORE_ENABLE (=NO).Set COMPILER_INDEX_STORE_ENABLE for all pod targets.
a13906285175 commentedon Oct 31, 2017
It works after settings COMPILER_INDEX_STORE_ENABLE = NO on all projects (pods and not).But So many "1 error generated" logs ...
WishQi commentedon Nov 16, 2017
I have the same problem. And the methods above did not work for me.
GipsySh commentedon Nov 17, 2017
macOS Sierra 10.12.6
Xcode: 9.1
I've dowloaded archive from https://github.com/oclint/oclint/releases/download/v0.13/oclint-0.13-x86_64-darwin-17.0.0.tar.gz and then replaced my installed oclint files and folders with the appropriate ones from the archive. But unfortunately the error still occurs.
14 remaining items
Allyess commentedon Jan 21, 2019
@shorbenko
thanks.
fixed, I set COMPILER_INDEX_STORE_ENABLE=NO, and update my podfile to set COMPILER_INDEX_STORE_ENABLE for all pod targets.
Mac OS:10.14.2 Xcode:10.1 OCLint: 0.13.1
tonight1988 commentedon Mar 6, 2019
Good morning
yousefhamza commentedon Apr 7, 2019
Setting
COMPILER_INDEX_STORE_ENABLE
toNO
to the project instead of target worked for me.How? Setting
COMPILER_INDEX_STORE_ENABLE
toNO
works but you have to make sure to apply it to the target your are building and all the targets depending on it too.kirinzer commentedon Nov 8, 2019
I have the same problem.
I have tried to set COMPILER_INDEX_STORE_ENABLE to NO, but it does not work for me.
My project have some pod dependencies. So I append -e Pods to oclint-json-compilation-database. And the error is still there. What is the real problem there?
Environment:
Mac os 10.13.6, Xcode:10.1, OCLint:0.13.
iStonesy commentedon Jun 7, 2020
Thanks @congpc, also works for me.
binzi56 commentedon Aug 14, 2020
Let me add that many people tried it and it was useless because the cache of the project in Xcode was not cleared. After modifying the settings, you must clear the cache!!! If you find it useful, put me up and let others see.
ryuichi-assistant commentedon Dec 20, 2020
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment.
kirinzer commentedon Dec 28, 2020
I solved it by update to the latest version.
ryuichi-assistant commentedon Mar 23, 2021
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment.
ryuichi-assistant commentedon Apr 23, 2021
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.