infer icon indicating copy to clipboard operation
infer copied to clipboard

Uncaught error: ("InferModules__Driver.Infer_error(\"exited with code 65\")")

Open danyating opened this issue 9 years ago • 17 comments

when I try infer -- xcodebuild clean build -scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphoneos, I get error like "Nothing to compile. Try running xcodebuild clean build scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphoneos clean first."

Then I try infer --keep-going --no-xcpretty -- xcodebuild clean build -scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphoneos,The error above is gone, but I get a new error

like BUILD FAILED Error backtrace: Raised at file "integration/Driver.ml", line 297, characters 16-78 Called from file "integration/Driver.ml", line 176, characters 2-16 Called from file "backend/infer.ml", line 23, characters 2-36 Called from file "backend/infer.ml", line 106, characters 6-52 Uncaught error: ("InferModules__Driver.Infer_error("exited with code 65")")

However, the build command xcodebuild clean build -scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphoneos can run sucessfully.

Is there something I can do to solve this problem?

danyating avatar Nov 15 '17 02:11 danyating

Try running xcodebuild clean -scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphoneos first,

then

infer --keep-going --no-xcpretty -- xcodebuild build -scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphoneos

dulmarod avatar Nov 15 '17 10:11 dulmarod

I'm getting a very similar error when running infer run -- ./gradlew assembleDebug

Error backtrace:
Raised at file "integration/Driver.ml", line 297, characters 16-78
Called from file "integration/Driver.ml", line 176, characters 2-16
Called from file "backend/infer.ml", line 23, characters 2-36
Called from file "backend/infer.ml", line 106, characters 6-52
Uncaught error: ("InferModules__Driver.Infer_error(\"exited with code 1\")")

runningcode avatar Nov 15 '17 18:11 runningcode

I got the same problem, and the @dulmarod methods did not work for me. First run: xcodebuild clean -workspace Aweme.xcworkspace -configuration AwemeInhouseDebug -scheme Aweme Then: infer --keep-going --no-xcpretty -- xcodebuild -workspace Name.xcworkspace -configuration Debug -scheme Name And I got the following errors:

`** BUILD FAILED ** The following build commands failed: Ld /Users/limaoqi/Library/Developer/Xcode/DerivedData/Aweme-bkezrnqnlfrskocmuntegwvejtzf/Build/Intermediates.noindex/Aweme.build/AwemeInhouseDebug-iphoneos/AwemeVideoNotification.build/Objects-normal/arm64/AwemeVideoNotification normal arm64 (1 failure)

Error backtrace: Raised at file "integration/Driver.ml", line 297, characters 16-78 Called from file "integration/Driver.ml", line 176, characters 2-16 Called from file "backend/infer.ml", line 23, characters 2-36 Called from file "backend/infer.ml", line 106, characters 6-52 Uncaught error: ("InferModules__Driver.Infer_error("exited with code 65")")`

But if I run: xcodebuild -workspace Name.xcworkspace -configuration Debug -scheme Name It will show 'BUILD SUCEEDED'.

How can I solve this problem?

WishQi avatar Nov 16 '17 04:11 WishQi

With that information is difficult for me to figure out the problem. Could you send me the content of infer-out/logs? Also, you could try using the latest version of Infer, the problem may be fixed there, and if not, I will be able to understand the trace better (seems that the code has changed since the version you are using, so I cannot follow the trace).

dulmarod avatar Nov 16 '17 11:11 dulmarod

@dulmarod My logs is: logs.txt

I installed infer using homebrew which should be the latest version. Maybe this log is more helpful: logs.txt

WishQi avatar Nov 16 '17 11:11 WishQi

@WishQi in your case, Infer is failing when trying to process a linker command. A solution to this is to pass

LD=/bin/true infer [options] -- --

See more info in http://fbinfer.com/support.html.

dulmarod avatar Nov 16 '17 14:11 dulmarod

@dulmarod The method did not work for me. Thr command is: LD=/usr/bin/true infer capture --keep-going --no-xcpretty -- xcodebuild -workspace Name.xcworkspace -configuration Debug -scheme Name And the I got these:

** BUILD FAILED **

The following build commands failed: CreateUniversalBinary /Users/limaoqi/Library/Developer/Xcode/DerivedData/Aweme-bkezrnqnlfrskocmuntegwvejtzf/Build/Products/AwemeDebug-iphoneos/AwemeNotificationService.appex/AwemeNotificationService normal armv7\ arm64 (1 failure)

Error backtrace: Raised at file "integration/Driver.ml", line 297, characters 16-78 Called from file "integration/Driver.ml", line 176, characters 2-16 Called from file "backend/infer.ml", line 23, characters 2-36 Called from file "backend/infer.ml", line 106, characters 6-52 Uncaught error: ("InferModules__Driver.Infer_error("exited with code 65")")

And the logs is: logs.txt @danyating did you solve this issue?

WishQi avatar Nov 17 '17 03:11 WishQi

Maybe pass also CreateUniversalBinary =/usr/bin/true?

dulmarod avatar Nov 17 '17 11:11 dulmarod

@WishQi ,I get a success by runing following commands. First I set this, export LD=/bin/true infer export CreateUniversalBinary=/usr/bin/true Then xcodebuild clean -scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphonesimulator Then infer capture --keep-going --no-xcpretty -- xcodebuild build -scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphonesimulator It run succeed!

** BUILD SUCCEEDED **

However, I have another problem that it did not generate bug.txt like version before 0.13.0. The infer-out directory shows follows:

  • captured

  • lint_issues

  • logs

  • results.db

  • results.db-shm

  • results.db-wal

  • specs

  • toplevel.log

So how should I see the bug lists? @dulmarod

danyating avatar Nov 20 '17 08:11 danyating

@danyating For infer, there are two phases in the whole process. The first is capture, and the second is the analyze. You have only run the first phase capture, so you should run infer analyze after infer capture

WishQi avatar Nov 20 '17 08:11 WishQi

@dulmarod I have another question: Can Infer ignore the pod specs in the capture phase? How can I do to achieve this?

WishQi avatar Nov 20 '17 08:11 WishQi

@WishQi thanks! After I run infer analyze, I get bug.txt file. So it finally woks out! And thanks @dulmarod so much!

danyating avatar Nov 20 '17 08:11 danyating

@danyating, @WishQi you don't need to run the capture separately, normally running infer run --keep-going --no-xcpretty -- xcodebuild build -scheme appName -workspace appName.xcworkspace -configuration Debug -sdk iphonesimulator should do everything you need.

dulmarod avatar Nov 20 '17 10:11 dulmarod

@dulmarod

It happends error:

Error backtrace:
Raised at file "integration/Driver.ml", line 297, characters 16-78
Called from file "integration/Driver.ml", line 176, characters 2-16
Called from file "backend/infer.ml", line 23, characters 2-36
Called from file "backend/infer.ml", line 106, characters 6-52
Uncaught error: ("InferModules__Driver.Infer_error(\"exited with code 65\")")

veryitman avatar Nov 24 '17 05:11 veryitman

@veryitman I think that error just means the compilation failed, which can be many different things, so maybe it isn't the best to keep it all together in the the same issue. Could you please start a new issue and give more information about what you ran, the whole output, and ideally also the infer-out/logs file?

dulmarod avatar Nov 24 '17 09:11 dulmarod

Thanks @dulmarod .

veryitman avatar Nov 24 '17 15:11 veryitman

#855 log.txt So is mine

tomcati avatar Jan 29 '18 09:01 tomcati