Thomas
05/10/2019, 6:01 PM> Task :common:generateDefCrashlytics
> Task :common:cinteropCrashlyticsIOS
Exception in thread "main" org.jetbrains.kotlin.konan.KonanExternalToolFailure: The /Users/thomas/.konan/dependencies/clang-llvm-6.0.1-darwin-macos/bin/clang command returned non-zero exit code: 1.
at org.jetbrains.kotlin.konan.exec.Command.handleExitCode(ExecuteCommand.kt:105)
at org.jetbrains.kotlin.konan.exec.Command.getResult(ExecuteCommand.kt:94)
at org.jetbrains.kotlin.konan.exec.Command.getOutputLines(ExecuteCommand.kt:73)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.runCmd(main.kt:66)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:281)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:38)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:67)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:18)
> Task :common:cinteropCrashlyticsIOS FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':common:cinteropCrashlyticsIOS'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings>
BUILD FAILED in 5s
2 actionable tasks: 2 executed
Command PhaseScriptExecution failed with a nonzero exit code
I don’t know what I need to look at as the exception doesn’t really show the cause of the issue. In case it might be related; I am using the Cocoapods plugin and have a Crashlytics pod in the Gradle file. Anyone have any ideas how to proceed?Sam
05/10/2019, 6:49 PMThomas
05/10/2019, 7:17 PMThomas
05/11/2019, 3:59 PMilya.matveev
05/13/2019, 9:38 AMilya.matveev
05/13/2019, 9:59 AMcinterop
tool manually. Probably you will be able to get a more detailed error message.
To get the arguments, run the Gradle build with --info
and find a line starting with Run tool: cinterop
. This line contains all arguments passed to the tool by Gradle, so you can copy them and use to run the tool manually. The cinterop
-tool is located in $HOME/.konan/<kotlin-native-distribution>/bin
.Thomas
05/13/2019, 11:17 AMpod("FirebaseCore")
pod("FirebaseAnalytics")
pod("FirebaseInAppMessagingDisplay")
pod("Fabric", "~> 1.9.0")
pod("Crashlytics", "~> 3.12.0")
I ran the cinterop tool manually. I found a line like this:
Run tool: cinterop with args: X
(replaced long output with X). I then executed the following in the terminal:
./cinterop X
And I got the following error: https://gist.github.com/Thomas-Vos/10ff65563b69b432016859cb9a494666Thomas
05/13/2019, 11:46 AMThomas
05/13/2019, 12:01 PMilya.matveev
05/13/2019, 12:03 PMThomas
05/13/2019, 12:14 PMilya.matveev
05/15/2019, 11:10 AMcocoapods
sample and haven't managed to get the crash you described. I've added the pods you mentioned in the Kotlin project, upgraded Gradle to 5.4.1 and created a separate iOS project with a space in its scheme name (see this branch: https://github.com/JetBrains/kotlin-native/tree/repro-crashlytics).
I made the following steps trying to reproduce the error:
1. Checkout the branch mentioned above and switch to the samples/cocoapods
directory
2. Run ./gradlew podspec
in the kotlin-library
directory
3. Run pod install
in the space repro
directory
4. Open the space repro/space repro.xcworkspace
and run the Archive command for a Generic iOS device
.
Could you share a project where you reproduced the error?Thomas
05/15/2019, 2:43 PMThomas
05/15/2019, 2:51 PMilya.matveev
05/16/2019, 5:07 AMI can send you the command with output in a PM if you would like to see it.Yes, please send it. Probably it will help. But run
cinterop
with -verbose
option to get more detailed output.
Do you want to look into this issue further or do you want to leave it as it is? I guess there's probably something wrong in my project, which causes this error if I include a space in the scheme name.The issue looks strange so I would like to investigate it. Does your project have a proprietary code? I mean is it possible to share it and use as a reproducer?