Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(x86_64) could not find object file symbol for symbol _kfun:co.touchlab.stately.isolate.RunResult#<init>(){} #79

Open
raymondctc opened this issue Apr 22, 2022 · 8 comments

Comments

@raymondctc
Copy link

Hi devs, we saw many of these warnings for this library when building to iOS simulators. We saw similar warnings on other libraries too (e.g. AAkira/Napier when we are on older version 2.4.0) but most of them are gone after upgrading to latest version, would you please advise what we can do about it? Thanks!

Kotlin version: 1.6.20
Stately verison: 1.2.2

image

@kpgalligan
Copy link
Contributor

Closed by accident...

@kpgalligan kpgalligan reopened this Apr 22, 2022
@kpgalligan
Copy link
Contributor

Honestly, no idea right now. It would be helpful to get way more info about your config. How are you adding dependencies, what's your sourceset config (from gradle.properties)

kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.commonizerLogLevel=info

It'll be difficult to research without some kind of repro, so if this is public, that would help, but I assume not.

I am seeing that warning as something that periodically comes up in the Kotlin slack. I don't think there's anything specific to Stately, although I won't rule anything out arbitrarily.

It also might be interesting to know what your framework config is. Static? Dynamic? How are you integrating it?

@ubuntudroid
Copy link

For me, this started to happen the moment I made the shared module static. And it doesn't just happen for stately, but for nearly all libraries. In fact, there are about 36k warnings for our little project - too many for Xcode to handle sending it into periods of a spinning wheel of death.

It doesn't seem to matter whether the libraries are direct or transitive dependencies.

Relevant gradle.properties settings:

kotlin.mpp.enableCInteropCommonization=true

@findjigar
Copy link
Contributor

Closing as this is most probably stale now. Also most likely resolved with newer Kotlin version like how #90 got resolved

@ubuntudroid
Copy link

@findjigar this isn't stale at all unfortunately. And it's not fixed by upgrading to Kotlin 1.8. In fact, what fixed the issue in #90 was most likely the switch from static to dynamic. Switching back to dynamic also fixes things here, but isn't an option in many cases.

For me, what "fixed" this was adding the following to the shared module (and just removing the line while debugging the shared module as it makes it impossible to read variable and field values):

kotlin {
  ...
  cocoapods {
    ...
    xcodeConfigurationToNativeBuildType["Debug"] =
            org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType.RELEASE
  }
}

This works, but also isn't optimal for obvious reasons.

@findjigar
Copy link
Contributor

@ubuntudroid ok thanks. I wasn't aware that there is an issue pending here. I'm re-opening this issue

@findjigar findjigar reopened this Sep 25, 2023
@findjigar
Copy link
Contributor

@ubuntudroid Would you be able to provide a minimal sample app that produces this issue, so we have a good repro for it?

@ubuntudroid
Copy link

Sorry for the late reply, this somehow slipped through the cracks. Unfortunately I wasn't able to create a minimal sample app. It seems to be something very specific in how the project was setup. I'm not working on that project anymore and don't have access to the source, so I cannot look it up unfortunately.

I'll report back when I stumble on that issue again in another project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants