Skip to content

[BUG] "Undefined symbols for architecture arm64" during the linking phase #463

@JAWS-tm

Description

@JAWS-tm

Describe the bug
I'm unable to build my application in Debug configuration on iOS.
The build fails during the linking phase with the following error:

Undefined symbols for architecture arm64:
  "_kfun:androidx.compose.runtime#androidx_compose_runtime_ProvidedValue$stableprop_getter$artificial(){}kotlin.Int", referenced from:
      _kfun:moe.tlaster.precompose#PreComposeApp(kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>?;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){} in ComposeApp[2833](libmoe.tlaster:precompose-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)

This only happens in Debug builds, the Release configuration builds fine.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the minimal reproducible example
  2. Try to run the iOS target in Debug mode
  3. See the linker error above

Expected behavior
The project should build and run successfully in both Debug and Release configurations on iOS.

Minimal reproducible example
I created a minimal reproducible example starting from the official Compose Multiplatform Wizard, without any additional changes except adding PreCompose (version 1.7.0-alpha03): https://github.com/JAWS-tm/PreCompose_UndefinedSymbols

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions