Kotlin-native: Execution failed for task ':calculator:compileKonanKotlinArithmeticParserIphone'

Created on 7 Dec 2017  Â·  9Comments  Â·  Source: JetBrains/kotlin-native

Well I am try to run the Calculator sample from the kotlin-native repo.

Followed the following steps:

To build and run the sample do the following:

  1. Open samples/calculator/calculator.xcodeproj with Xcode.

  2. Open the project's target through project navigator, go to tab 'General'. In 'Identity' section change the bundle ID to the unique string in reverse-DNS format. Then select the team in 'Signing' section. See the Xcode documentation for more info.

  3. Now build and run the application on a connected iPhone with Xcode.

But when I try to build the application in Xcode I get the following error and the log to it is below:

...
...
...
The target is not enabled on the current host: linux
Target 'linux' of artifact 'libgit2' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
Target 'linux' of artifact 'libcurl' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: raspberrypi
Target 'linux' of artifact 'sdl' is not supported on the current host
Target 'raspberrypi' of artifact 'sdl' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: raspberrypi
Target 'linux' of artifact 'tetris' is not supported on the current host
Target 'raspberrypi' of artifact 'tetris' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: mingw
Target 'linux' of artifact 'ffmpeg' is not supported on the current host
Target 'mingw' of artifact 'ffmpeg' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: mingw
Target 'linux' of artifact 'sdl' is not supported on the current host
Target 'mingw' of artifact 'sdl' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: mingw
Target 'linux' of artifact 'Player' is not supported on the current host
Target 'mingw' of artifact 'Player' is not supported on the current host
The target is not enabled on the current host: mingw
:calculator:checkKonanCompiler
:calculator:compileKonanKotlinArithmeticParserIphone FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':calculator:compileKonanKotlinArithmeticParserIphone'.

    Classpath of the tool is empty: konanc
    Probably the 'konan.home' project property contains an incorrect path.
    Please change it to the compiler root directory and rerun the build.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 8s
2 actionable tasks: 2 executed
Command /bin/sh failed with exit code 1

Thank you!

Most helpful comment

I've run into the same issue. How can we run the sample completely independent of the kotlin project. I.e. how do we build our own project? How can we install the kotlin native compiler?

 What went wrong:
Execution failed for task ':arithmeticParser:compileKotlinIos'.
> Classpath of the tool is empty: konanc
  Probably the 'org.jetbrains.kotlin.native.home' project property contains an incorrect path.
  Please change it to the compiler root directory and rerun the build.

All 9 comments

Have you opened the sample from the entire cloned repo, or you have moved it out?
Have you built Kotlin/Native itself with ./gradlew clean dist crossDist before building the sample?

Please report if it fixes your problem or not, otherwise I have to close this issue.

I ran into the same issue and ./gradlew clean dist crossDist did the trick for me.

Have the same issue. Ran ./gradlew clean dist crossDist but it ended with an error:

  • What went wrong:
    Execution failed for task ':common:macbookHash'.
    A problem occurred starting process 'command '/Users/baruchnurilov/.konan/dependencies/clang-llvm-5.0.0-darwin-macos/bin/clang++''

.konen/dependencies folder is empty and unfortunately I'm not familiar with this tool.

Please read the Readme carefully.
Have you run ./gradlew dependencies:update before?

On Jan 3, 2018 8:01 AM, "baruchn" notifications@github.com wrote:

Have the same issue. Ran ./gradlew clean dist crossDist but it ended with
an error:

  • What went wrong:
    Execution failed for task ':common:macbookHash'.
    A problem occurred starting process 'command
    '/Users/baruchnurilov/.konan/dependencies/clang-llvm-5.0.0-
    darwin-macos/bin/clang++''

.konen/dependencies folder is empty and unfortunately I'm not familiar
with this tool.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/JetBrains/kotlin-native/issues/1119#issuecomment-354947736,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJwYex5Sv0ex65Bmtg4ddfdY201RDh1Wks5tGyXZgaJpZM4Q5Fd5
.

My apologies. Only read the Calculator Readme and not the main one. Thanks for the quick response.

When I run './gradlew dependencies:update' I get the error below. How can I proceed from here? Thank you in advance.

  • What went wrong:
    A problem occurred evaluating root project 'kotlin-native'.
    > The /usr/bin/xcrun command returned non-zero exit code: 1.

I had both Xcode and cmd line tools installed. After manually deleting cmd line tools and re-starting a laptop './gradlew dependencies:update' finished without errors.

I've run into the same issue. How can we run the sample completely independent of the kotlin project. I.e. how do we build our own project? How can we install the kotlin native compiler?

 What went wrong:
Execution failed for task ':arithmeticParser:compileKotlinIos'.
> Classpath of the tool is empty: konanc
  Probably the 'org.jetbrains.kotlin.native.home' project property contains an incorrect path.
  Please change it to the compiler root directory and rerun the build.
Was this page helpful?
0 / 5 - 0 ratings