# Compiling kontlinconf-app for ios

**URL:** <https://discuss.kotlinlang.org/t/compiling-kontlinconf-app-for-ios/5423>\
**Category:** Native\
**Created:** [November 15, 2017, 5:34pm UTC](https://discuss.kotlinlang.org/t/compiling-kontlinconf-app-for-ios/5423 "2017-11-15T17:34:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowmanx95](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@snowmanx95](https://discuss.kotlinlang.org/u/snowmanx95)\
**Post date:** [November 15, 2017, 5:34pm UTC](https://discuss.kotlinlang.org/t/compiling-kontlinconf-app-for-ios/5423/1 "2017-11-15T17:34:30Z")

</div>

I’m trying to build kotlinconf-app for ios, installed clion 2017.3 EAP, kotlin modules, cloned the github project, built successfully the android app and trying to compile the ios version. I successfully opened the ios project in CLion and can see three targets there (kotlinconf.compile, kotlinconf.kexe and libs).

When trying to build kontlinconf.\* targets, the compilation fails with error saying it cannot find the libs package (and classes from it).

```
src/main/kotlin/data/FavoritesManager.kt:1:8: error: unresolved reference: libs
import libs.*
       ^
src/main/kotlin/data/FavoritesManager.kt:7:29: error: unresolved reference: KSession
    fun isFavorite(session: KSession) = getFavorite(session) != null
                            ^

```

When I try to build the libs package, compilation fails with error saying it cannot find Groot/Groot.h:

```
[100%] Generating CMakeFiles/libs/libs.klib
Exception in thread "main" java.lang.Error: /var/folders/94/c3pxr0kx6nzdmz3q6zp2bn740000gn/T/tmp1325937600661251236.m:1:10: fatal error: 'Groot/Groot.h' file not found
	at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:135)
	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:875)
	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:865)
	at org.jetbrains.kotlin.native.interop.indexer.NativeIndexKt.buildNativeIndex(NativeIndex.kt:55)
	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processLib(main.kt:317)
	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:33)
	at org.jetbrains.kotlin.cli.utilities.MainKt.invokeCinterop(main.kt:90)
	at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:112)
make[3]: *** [CMakeFiles/libs/libs.klib] Error 1

```

Any idea what is happening?

---

<div class="post-metadata">

**Author:** ![nutjob2](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@nutjob2](https://discuss.kotlinlang.org/u/nutjob2)\
**Post date:** [November 15, 2017, 7:51pm UTC](https://discuss.kotlinlang.org/t/compiling-kontlinconf-app-for-ios/5423/2 "2017-11-15T19:51:23Z")

</div>

Well, you’re missing the Groot library, installing it where it expects it to be is probably the best solution, ditto for other missing libraries.

This is a symptom of a larger problem with interop libs in that there are external dependencies which are not being managed or documented at this point. In my case it was a dependency on a library in the macOS 10.12 SDK.

There needs to be a better solution for managing external dependencies, probably at the project level, but right now I don’t think it’s a priority and you should just cobble together what’s being asked for, or hack the .def files fed to interop if you cannot do that.

---

<div class="post-metadata">

**Author:** ![snowmanx95](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@snowmanx95](https://discuss.kotlinlang.org/u/snowmanx95)\
**Post date:** [November 15, 2017, 9:07pm UTC](https://discuss.kotlinlang.org/t/compiling-kontlinconf-app-for-ios/5423/3 "2017-11-15T21:07:50Z")

</div>

Well, the thing is Groot is part of the source code on github and is checked out, so this should work: [https://github.com/JetBrains/kotlinconf-app/tree/master/ios/Frameworks/Groot.framework](https://github.com/JetBrains/kotlinconf-app/tree/master/ios/Frameworks/Groot.framework)

---

<div class="post-metadata">

**Author:** ![nutjob2](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@nutjob2](https://discuss.kotlinlang.org/u/nutjob2)\
**Post date:** [November 15, 2017, 9:28pm UTC](https://discuss.kotlinlang.org/t/compiling-kontlinconf-app-for-ios/5423/4 "2017-11-15T21:28:44Z")

</div>

Then it’s probably in the wrong place or an environment variable or path is missing. There are many ways it can go wrong.

It’s pre-release software, your “should work” is probably a bit hopeful.
