natario1
07/23/2020, 11:17 AMe: Could not find "library" in [/Users/natario/Projects/project/project-name, /Users/natario/.konan/klib, /Users/natario/.konan/kotlin-native-macos-1.3.72/klib/common, /Users/natario/.konan/kotlin-native-macos-1.3.72/klib/platform/android_arm64].
But nothing I have is called "library", does anyone have any hints?
If I run the task with --info I can see the command that is failing (it's huge, but this should be the core part... ...kotlin-native.jar org.jetbrains.kotlin.cli.utilities.MainKt cinterop -o...
). None of the arguments to this is called "library", I just see some -library <http://path.to|path.to>.klib
which are the libraries that are being cinterop-ed.Artyom Degtyarev [JB]
07/23/2020, 11:20 AMnatario1
07/23/2020, 11:21 AM-library /Users/natario/Projects/DM/dm-effects/effects-backend/build/classes/kotlin/androidNativeArm64/main/effects-backend.klib -library /Users/natario/Projects/DM/dm-effects/effects-backend/build/classes/kotlin/androidNativeArm64/main/effects-backend-cinterop-gles31.klib -library /Users/natario/Projects/DM/dm-effects/effects-backend/build/classes/kotlin/androidNativeArm64/main/effects-backend-cinterop-nativewindowjni.klib -library /Users/natario/Projects/DM/dm-effects/effects-backend/build/classes/kotlin/androidNativeArm64/main/effects-backend-cinterop-deepinference.klib
natario1
07/23/2020, 11:36 AMCyclic dependency in library graph
which I can't figure out either.
Anyway I have saved the old, broken klib files, in case you want me to inspect something about this "library" issue.natario1
07/23/2020, 12:00 PMfoo
) to see what happens.
Now I get the original error, but about foo
instead of library
.
e: Could not find "foo" in [/Users/natario/Projects/project/project-name, /Users/natario/.konan/klib, /Users/natario/.konan/kotlin-native-macos-1.3.72/klib/common, /Users/natario/.konan/kotlin-native-macos-1.3.72/klib/platform/android_arm64].
I wouldn't want to clean the whole gradle project anytime I add or remove cinterop libs, it's a big project. Any help?natario1
07/23/2020, 12:01 PMnatario1
07/23/2020, 4:53 PMunique_name=effects-backend-cinterop-gles31
depends=stdlib posix glesCommon
headers=GLES3/gl31.h
includedHeaders=7fb6d736b3e2a4036f279e654230f6cd04ddfb564f5505c39036316fe40c9e94 74bd108264d655196d60c0b35c37eed44f840a026a09bd71cb22f91547133505
metadata_version=1.0.0
interop=true
linkerOpts=-lGLESv3
compiler_version=1.3.71
abi_version=22
exportForwardDeclarations=cnames.structs.__GLsync
package=platform.gles31
ir_version=1.0.0
2. Run task cinteropGles31 again
Note that this task should not even run! It should be UP-TO-DATE. However gradle says
Task ':effects-backend:cinteropGles31AndroidNativeArm64' is not up-to-date because:
Input property 'libraries' file /Users/natario/Projects/DM/dm-effects/effects-backend/build/classes/kotlin/androidNativeArm64/main/effects-backend-cinterop-gles31.klib has been added.
So the klib file of this lib, which should be the output of the cinterop task I guess, is also marked as its input. I really don't know how this could happen.
At this point klib/manifest has become:
unique_name=effects-backend-cinterop-gles31
depends=stdlib posix glesCommon effects-backend-cinterop-gles31
headers=GLES3/gl31.h
includedHeaders=
metadata_version=1.0.0
interop=true
linkerOpts=-lGLESv3
compiler_version=1.3.71
abi_version=22
exportForwardDeclarations=
package=platform.gles31
ir_version=1.0.0
Note changes in depends
and also includeHeaders
and exportForwardDeclarations
.
3. Run the cinteropGles31 task again
Again the task should not run, but gradle notices that the klib files has changed, and since it's somehow an input of this task, it runs again.
The outcome is a (legit) cyclic dependency error.
java.lang.IllegalStateException: Cyclic dependency in library graph for: /Users/natario/Projects/DM/dm-effects/effects-backend/build/classes/kotlin/androidNativeArm64/main/effects-backend-cinterop-gles31
Artyom Degtyarev [JB]
07/23/2020, 6:04 PMnatario1
07/23/2020, 6:26 PMKotlinNativeTasks
.... Look suspicious, they might work for the general case but somehow broken for me.
I can only tell you that I can workaround the problem by setting cinterop.dependencyFiles = project("xyz")
, so that it is resolved to an empty collection. I don't know if I'm breaking something else though.natario1
07/23/2020, 6:28 PM