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

[Build Issue] Failure when building using ktor3 #84

Open
kunal-jar opened this issue Dec 2, 2024 · 5 comments
Open

[Build Issue] Failure when building using ktor3 #84

kunal-jar opened this issue Dec 2, 2024 · 5 comments

Comments

@kunal-jar
Copy link

Receiving the following error when we migrated from ktor2 to ktor3

> Task :shared:linkPodDebugFrameworkIosX64
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Please try to disable compiler caches and rerun the build. To disable compiler caches, add the following line to the gradle.properties file in the project's root directory:
    
    kotlin.native.cacheKind.iosX64=none
    
Also, consider filing an issue with full Gradle log here: https://kotl.in/issue
The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
ld: warning: passed two min versions (12.0, 13.0) for platform iOS-simulator. Using 13.0.
ld: warning: ignoring duplicate libraries: '-ldl'
ld: warning: Could not find or use auto-linked library 'swift_Builtin_float': library 'swift_Builtin_float' not found
ld: warning: Could not find or use auto-linked library 'swift_errno': library 'swift_errno' not found
ld: warning: Could not find or use auto-linked library 'swift_math': library 'swift_math' not found
ld: warning: Could not find or use auto-linked library 'swift_signal': library 'swift_signal' not found
ld: warning: Could not find or use auto-linked library 'swift_stdio': library 'swift_stdio' not found
ld: warning: Could not find or use auto-linked library 'swift_time': library 'swift_time' not found
ld: warning: Could not find or use auto-linked library 'swiftsys_time': library 'swiftsys_time' not found
ld: warning: Could not find or use auto-linked library 'swiftunistd': library 'swiftunistd' not found
Undefined symbols for architecture x86_64:
  "__swift_FORCE_LOAD_$_swift_Builtin_float", referenced from:
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_ShakeDetektorIOS in libinspektifyRoot:inspektify-cinterop-ShakeDetektorIOS-cache.a[3](ShakeDetektorIOS.swift.o)
  "__swift_FORCE_LOAD_$_swift_errno", referenced from:
      __swift_FORCE_LOAD_$_swift_errno_$_ShakeDetektorIOS in libinspektifyRoot:inspektify-cinterop-ShakeDetektorIOS-cache.a[3](ShakeDetektorIOS.swift.o)
  "__swift_FORCE_LOAD_$_swift_math", referenced from:
      __swift_FORCE_LOAD_$_swift_math_$_ShakeDetektorIOS in libinspektifyRoot:inspektify-cinterop-ShakeDetektorIOS-cache.a[3](ShakeDetektorIOS.swift.o)
  "__swift_FORCE_LOAD_$_swift_signal", referenced from:
      __swift_FORCE_LOAD_$_swift_signal_$_ShakeDetektorIOS in libinspektifyRoot:inspektify-cinterop-ShakeDetektorIOS-cache.a[3](ShakeDetektorIOS.swift.o)
  "__swift_FORCE_LOAD_$_swift_stdio", referenced from:
      __swift_FORCE_LOAD_$_swift_stdio_$_ShakeDetektorIOS in libinspektifyRoot:inspektify-cinterop-ShakeDetektorIOS-cache.a[3](ShakeDetektorIOS.swift.o)
  "__swift_FORCE_LOAD_$_swift_time", referenced from:
      __swift_FORCE_LOAD_$_swift_time_$_ShakeDetektorIOS in libinspektifyRoot:inspektify-cinterop-ShakeDetektorIOS-cache.a[3](ShakeDetektorIOS.swift.o)
  "__swift_FORCE_LOAD_$_swiftsys_time", referenced from:
      __swift_FORCE_LOAD_$_swiftsys_time_$_ShakeDetektorIOS in libinspektifyRoot:inspektify-cinterop-ShakeDetektorIOS-cache.a[3](ShakeDetektorIOS.swift.o)
  "__swift_FORCE_LOAD_$_swiftunistd", referenced from:
      __swift_FORCE_LOAD_$_swiftunistd_$_ShakeDetektorIOS in libinspektifyRoot:inspektify-cinterop-ShakeDetektorIOS-cache.a[3](ShakeDetektorIOS.swift.o)
ld: symbol(s) not found for architecture x86_64

> Task :shared:linkPodDebugFrameworkIosX64 FAILED
@BVantur
Copy link
Owner

BVantur commented Dec 2, 2024

Thank you for reporting this issue @kunal-jar. Can you please add the next information about this crash?

  1. Inspektify version that you are using.
  2. Version of Kotlin
  3. xCode and macOS versions
  4. Which iOS version did you use and if you get this crash with a simulator or a real device?

@kunal-jar
Copy link
Author

Thank you for reporting this issue @kunal-jar. Can you please add the next information about this crash?

  1. Inspektify version that you are using.
  2. Version of Kotlin
  3. xCode and macOS versions
  4. Which iOS version did you use and if you get this crash with a simulator or a real device?

Hey, its not a crash its a build issue

  1. io.github.bvantur:inspektify-ktor3:1.0.0-beta06
  2. 2.0.21
  3. Xcode - 15.4, Sonama 14.4

@BVantur
Copy link
Owner

BVantur commented Dec 4, 2024

@kunal-jar thank you for the additional info. On my computer, this issue doesn't exist, but I will try to emulate your system environment with Xcode - 15.4 and Sonama 14.4 to see if I can reproduce it.

@melikaafrakhteh
Copy link

Hi, I have same issue in my project

  1. io.github.bvantur:inspektify-ktor3:1.0.0-beta07
  2. 2.0.21
  3. xcode: 15.4, macOs: Sonama 14.2
  4. the build failed in both simulator and real device

@BVantur
Copy link
Owner

BVantur commented Dec 10, 2024

Thank you for reporting the issue @melikaafrakhteh

I have some problems freeing up space on my MacBook to simulate your environment on my computer. It might take me a while to check this.

Do you have the possibility to update your macOS systems to the latest version? @melikaafrakhteh @kunal-jar

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

3 participants