Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation contains multiple jobs #611

Open
qinyeios opened this issue Jul 30, 2021 · 11 comments
Open

Compilation contains multiple jobs #611

qinyeios opened this issue Jul 30, 2021 · 11 comments

Comments

@qinyeios
Copy link

Issue Summary

Compilation contains multiple jobs , all methods online not work.

Environment

  • Operation system name and version:macOS12
  • OCLint version:21.3
  • How OCLint is installed: local build? prebuilt binary downloaded from github? homebrew install? others?
    all build method not work

Reproduction Steps

Detailed steps to reproduce the issue.

Sample code

export LC_CTYPE=en_US.UTF-8
cd ${SRCROOT}
xcodebuild -scheme CPSPlannerD -workspace CPSPlanner.xcworkspace clean && xcodebuild -scheme CPSPlannerD -workspace CPSPlanner.xcworkspace -configuration Debug | xcpretty -r json-compilation-database -o compile_commands.json && oclint-json-compilation-database -e Pods -- -report-type xcode

Command to run OCLint with the code above.

Expected Behavior

What do you expect to happen as a result of the reproduction steps?
oclint-json-compilation-database cannot make out a oclint.html as a output file

Actual Behavior

What currently happens as a result of the reproduction steps?
oclint-json-compilation-database

Even Better

Is your project open sourced? If yes, can you point us to your repository?
If not, is it possible to make a small project to illustrate the problem?
If not, can you create a gist with your sample code for us?

i have tried to set COMPILER_INDEX_STORE_ENABLE for NO , and added code
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['COMPILER_INDEX_STORE_ENABLE'] = "NO"
end
end
end
but all not work for me

@pancho-romero-dexcom
Copy link

some update?

@SunshineTeemo
Copy link

I add COMPILER_INDEX_STORE_ENABLE=NO in xcodebuild command line help me. Like this
$xcodebuild -scheme "**" -workspace .xcworkspace -configuration "" -destination 'platform=iOS Simulator,name=iPhone 11,OS=15.0' COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -r json-compilation-database --output compile_commands.json`

@trinitronx
Copy link

Ran into same issue using CMake + VSCode with CMAKE_OSX_ARCHITECTURES:STRING=arm64;x86_64

The error seems to have something to do with building Mach-O Universal binaries, which probably shows up to oclint as multiple build jobs.

@ryuichis
Copy link
Contributor

ryuichis commented Feb 5, 2022

I can see this is an issue now with Intel and Apple Silicon. I will mark it as keep-open, need to think about how to achieve this without running the same checking multiple times.

@trinitronx
Copy link

I managed to work around my issue with a manually created compile_commands.json. The other alternative option appeared to be moving the project to use the more heavyweight CMake for generating this file. Not sure about how to get xcodebuild to generate this file, given that the project was not originally created in XCode, and setting up the project with build "Scheme" was non-trivial in comparison.

@ZachL1
Copy link

ZachL1 commented Jul 15, 2022

I add COMPILER_INDEX_STORE_ENABLE=NO in xcodebuild command line help me. Like this $xcodebuild -scheme "_" -workspace _.xcworkspace -configuration "**__" -destination 'platform=iOS Simulator,name=iPhone 11,OS=15.0' COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -r json-compilation-database --output compile_commands.json`

it works for me!!

@wangxuewen
Copy link

I add COMPILER_INDEX_STORE_ENABLE=NO in xcodebuild command line

xcodebuild -scheme xxx -workspace xxx.xcworkspace clean && xcodebuild -scheme xxx -workspace xxx.xcworkspace -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -r json-compilation-database -o compile_commands.json

it works for me!
then, I want to export the html file,execute ‘oclint-json-compilation-database -e Pods -- -report-type html -o oclintReport.html‘

Report another error 👉🏻 oclint: error: compilation contains multiple jobs:

What should I do?

@FirstDKS521
Copy link

I add COMPILER_INDEX_STORE_ENABLE=NO in xcodebuild command line

xcodebuild -scheme xxx -workspace xxx.xcworkspace clean && xcodebuild -scheme xxx -workspace xxx.xcworkspace -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -r json-compilation-database -o compile_commands.json

it works for me! then, I want to export the html file,execute ‘oclint-json-compilation-database -e Pods -- -report-type html -o oclintReport.html‘

Report another error 👉🏻 oclint: error: compilation contains multiple jobs:

What should I do?

I encountered the same problem as you. Did you solve it? How did you solve it?

@sty721521
Copy link

I add COMPILER_INDEX_STORE_ENABLE=NO in xcodebuild command line

xcodebuild -scheme xxx -workspace xxx.xcworkspace clean && xcodebuild -scheme xxx -workspace xxx.xcworkspace -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -r json-compilation-database -o compile_commands.json

it works for me! then, I want to export the html file,execute ‘oclint-json-compilation-database -e Pods -- -report-type html -o oclintReport.html‘

Report another error 👉🏻 oclint: error: compilation contains multiple jobs:

What should I do?

请问你最后解决了吗?求

@sty721521
Copy link

I add COMPILER_INDEX_STORE_ENABLE=NO in xcodebuild command line
xcodebuild -scheme xxx -workspace xxx.xcworkspace clean && xcodebuild -scheme xxx -workspace xxx.xcworkspace -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -r json-compilation-database -o compile_commands.json
it works for me! then, I want to export the html file,execute ‘oclint-json-compilation-database -e Pods -- -report-type html -o oclintReport.html‘
Report another error 👉🏻 oclint: error: compilation contains multiple jobs:
What should I do?

I encountered the same problem as you. Did you solve it? How did you solve it?

请问你 解决了吗

@FirstDKS521
Copy link

I add COMPILER_INDEX_STORE_ENABLE=NO in xcodebuild command line
xcodebuild -scheme xxx -workspace xxx.xcworkspace clean && xcodebuild -scheme xxx -workspace xxx.xcworkspace -configuration Debug COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -r json-compilation-database -o compile_commands.json
it works for me! then, I want to export the html file,execute ‘oclint-json-compilation-database -e Pods -- -report-type html -o oclintReport.html‘
Report another error 👉🏻 oclint: error: compilation contains multiple jobs:
What should I do?

I encountered the same problem as you. Did you solve it? How did you solve it?

请问你 解决了吗

没有解决,暂时放弃了OCLint,等他官方修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants