Pulling in CMP 1.8.0-rc01 and getting following wh...
# compose-ios
j
Pulling in CMP 1.8.0-rc01 and getting following when building iOS client. Anyone know what cause might be?
Copy code
Undefined symbol: _kfun:androidx.compose.animation.core#androidx_compose_animation_core_MutableTransitionState$stableprop_getter$artificial(){}<http://kotlin.Int|kotlin.Int>

Undefined symbol: _kfun:androidx.compose.animation.core#androidx_compose_animation_core_TransitionState$stableprop_getter$artificial(){}<http://kotlin.Int|kotlin.Int>

Undefined symbol: _kfun:androidx.compose.ui.graphics.vector#androidx_compose_ui_graphics_vector_VectorPainter$stableprop_getter$artificial(){}<http://kotlin.Int|kotlin.Int>
looks like there's transitive dependency to following....
Copy code
androidx.compose.animation:animation:1.7.2
(through
androidx.navigation:navigation-compose:2.8.9
)
updated nav dependency to
2.9.0-rc01
but get same issue
e
Could you please try to use this dependency?
Copy code
implementation("org.jetbrains.androidx.navigation:navigation-compose:2.9.0-alpha17")
j
still seeing same issue....maybe some other transitive dependency at play
btw if I run
./gradlew :shared:dependencies
I'm getting following (though not seeing that in Xcode etc)
Copy code
androidx.navigation:navigation-compose:2.9.0-alpha17 FAILED
looks like maybe later version of lifecycle dependency also needed....trying that now
same error
e
Could you please add
kotlin.native.cacheKind=none
in gradle.properties https://youtrack.jetbrains.com/issue/CMP-7571
👍 2
gratitude thank you 1
j
that worked! (also updated that branch)
🎉 3
r
I had a similar error:
Copy code
Undefined symbol: _kfun:androidx.compose.animation.core#androidx_compose_animation_core_SeekableTransitionState$stableprop_getter$artificial(){}kotlin.Int

Undefined symbol: _kfun:androidx.compose.material3#androidx_compose_material3_ButtonDefaults$stableprop_getter$artificial(){}kotlin.Int

Undefined symbol: _kfun:androidx.compose.runtime#androidx_compose_runtime_ProvidedValue$stableprop_getter$artificial(){}kotlin.Int
That gradle property saved me a few hours of headaches (and life)!
z
Please note that disabling native caching really hurts build times, and you should only add this as a temporary workaround for the issue linked above. For Confetti for example, we removed it soon after, here, by bumping the libraries that were causing a problem: https://github.com/joreilly/Confetti/pull/1611 If you look at your full build output, you should be able to see which library is causing the problem in your case.
r
Thanks Márton, will do the investigation then In fact that’s what I was noticing now, it took much more time to build than usual but helps to unblock the road.
z
Here's an example of the kind of thing to look for in the build output, from the original Confetti problem's CI run. This appears earlier in the logs than the "Undefined symbol:" lines mentioned in the first message of this thread, and show that in that case, it was Decompose that the build was failing on. > Undefined symbols for architecture arm64: > "_kfun:androidx.compose.animation.core#androidx_compose_animation_core_MutableTransitionState$stableprop_getter$artificial(){}kotlin.Int", referenced from: > _kfun:com.arkivanov.decompose.extensions.compose.experimental.stack.animation.EmptyStackAnimation.invoke#internal in ConfettiKit[2901](libcom.arkivanov.decompose:extensions-compose-experimental-cache.a.o) > "_kfun:androidx.compose.animation.core#androidx_compose_animation_core_TransitionState$stableprop_getter$artificial(){}kotlin.Int", referenced from: > _kfun:com.arkivanov.decompose.extensions.compose.experimental.stack.animation.DefaultStackAnimation.Child#internal in ConfettiKit[2901](libcom.arkivanov.decompose:extensions-compose-experimental-cache.a.o) > "_kfun:androidx.compose.ui.graphics.vector#androidx_compose_ui_graphics_vector_VectorPainter$stableprop_getter$artificial(){}kotlin.Int", referenced from:
a
Btw, since Compose for iOS is Beta, why breaking changes?
r
I couldn’t find any issue mentioned earlier to the undefined symbol error. But I have new undefined symbols errors after cleaning a bit the project and updating the same dependencies that you did on that Github PR
Copy code
Undefined symbols for architecture arm64:
  "_kfun:androidx.compose.material3#androidx_compose_material3_ButtonDefaults$stableprop_getter$artificial(){}kotlin.Int", referenced from:
      _kfun:com.mmk.kmpauth.uihelper.apple#AppleSignInButtonIconOnly(androidx.compose.ui.Modifier?;com.mmk.kmpauth.uihelper.apple.AppleButtonMode?;androidx.compose.ui.graphics.Shape?;kotlin.Function0<kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){} in Shared[2898](libio.github.mirzemehdi:kmpauth-uihelper-cache.a.o)
      _kfun:com.mmk.kmpauth.uihelper.apple.getButtonColor#internal in Shared[2898](libio.github.mirzemehdi:kmpauth-uihelper-cache.a.o)
      _kfun:com.mmk.kmpauth.uihelper.google#GoogleSignInButtonIconOnly(androidx.compose.ui.Modifier?;com.mmk.kmpauth.uihelper.google.GoogleButtonMode?;androidx.compose.ui.graphics.Shape?;kotlin.Function0<kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){} in Shared[2898](libio.github.mirzemehdi:kmpauth-uihelper-cache.a.o)
      _kfun:com.mmk.kmpauth.uihelper.google.getButtonColor#internal in Shared[2898](libio.github.mirzemehdi:kmpauth-uihelper-cache.a.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I suspect KMP Auth might be the issue although I cannot tell why, there may be some compose dependency conflicts since it uses 1.7.4 compose. (I’m using 1.8.0-rc01) I’ll for now keep this
kotlin.native.cacheKind=none
property and keep an eye on any updates for the library.
z
Btw, since Compose for iOS is Beta, why breaking changes?
It wasn't a change in Compose for iOS per se. As I understand it was a bug in the K1 compiler that's now fixed, and while there were patches added to bridge things over and for the new compiler to accept the older "incorrect" outputs, these patches don't work for the edge case where it's a transitive dependency and the library is taken from cache. Plus I believe release builds should be unaffected (as they don't use cache).
👍 1
I suspect KMP Auth might be the issue although I cannot tell why, there may be some compose dependency conflicts since it uses 1.7.4 compose.
That's exactly the problem, that the
uihelper
module there depends on Compose runtime, and it's compiled against the older version. @Mirzamehdi when you have the time, could you please ship a version of the library (even if pre-release) that uses
1.8.0-rc01
?
❤️ 2
m
@robercoding I will bump the lib versions of KMPAuth asap and will make new release
❤️ 1