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

Compilation error after updating to 16.0.1 #301

Closed
kofoednielsen opened this issue Oct 29, 2021 · 4 comments
Closed

Compilation error after updating to 16.0.1 #301

kofoednielsen opened this issue Oct 29, 2021 · 4 comments

Comments

@kofoednielsen
Copy link

Preliminary Info

What Airship dependencies are you using?

+  - Airship (16.0.1):
+    - Airship/Automation (= 16.0.1)
+    - Airship/Basement (= 16.0.1)
+    - Airship/Core (= 16.0.1)
+    - Airship/ExtendedActions (= 16.0.1)
+    - Airship/MessageCenter (= 16.0.1)
+  - Airship/Automation (16.0.1):

What are the versions of any relevant development tools you are using?

Compiling for iOS 12 on Xcode 13.

Report

What unexpected behavior are you seeing?

Compilation error, see logs below.

What is the expected behavior?

Successful compilation

What are the steps to reproduce the unexpected behavior?

We upgraded to 16.0.1 from 14.6.1 when this started happening.

Do you have logging for the issue?

Undefined symbols for architecture x86_64:
  "os.Logger.logObject.getter : __C.OS_os_log", referenced from:
      static AirshipKit.AirshipLogger.(log in _7F2AC56B1CBB62B066F1AB6C74387017)(logLevel: AirshipKit.LogLevel, message: Swift.String, fileID: Swift.String, line: Swift.Int, function: Swift.String, skipLogLevelCheck: Swift.Bool) -> () in libAirship.a(AirshipLogger.o)
  "type metadata accessor for os.Logger", referenced from:
      one-time initialization function for LOGGER in libAirship.a(AirshipLogger.o)
      AirshipKit.AirshipLogger.LOGGER.unsafeMutableAddressor : os.Logger in libAirship.a(AirshipLogger.o)
      static AirshipKit.AirshipLogger.LOGGER.getter : os.Logger in libAirship.a(AirshipLogger.o)
      static AirshipKit.AirshipLogger.(log in _7F2AC56B1CBB62B066F1AB6C74387017)(logLevel: AirshipKit.LogLevel, message: Swift.String, fileID: Swift.String, line: Swift.Int, function: Swift.String, skipLogLevelCheck: Swift.Bool) -> () in libAirship.a(AirshipLogger.o)
  "os.Logger.init(subsystem: Swift.String, category: Swift.String) -> os.Logger", referenced from:
      one-time initialization function for LOGGER in libAirship.a(AirshipLogger.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@rlepinski
Copy link
Contributor

I am having troubles reproducing but currently am on a m1 mac without x86_64 simulators. I tested on an IOS 12 device though and did not receive that crash. I wont have access to an intel machine until tomorrow.

Do you have this issue on iOS 13 or iOS 14 simulators?

@rlepinski
Copy link
Contributor

@kofoednielsen Still cant reproduce using an intel device. Have you tried cleaning and wiping any derived data? Any chance you can share a project with me to help reproduce the issue?

@AlbrechtAndrzejewski
Copy link

AlbrechtAndrzejewski commented Nov 5, 2021

@kofoednielsen If your project was an already existing project and you tried to migrate to latest Airship version, you may find an older Swift reference laying around in your Xcode project settings.

I faced the same link problem here after migrating to Airship 16+ (intel Mac, xcode version 13.1 - 13A1030d).
Removing this value from the LIBRARY_SEARCH_PATHS in the .pbxproj : "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", solved this link issue on my project.

In Xcode, double click the project icon in the tree, and look for library search paths in the "Build Settings" tab of PROJECT. Then click on the minus icon to remove any reference to swift-5.0 in the value list, be sure to keep "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)".

@rlepinski
Copy link
Contributor

Thank you @AlbrechtAndrzejewski for providing the fix. I am going to close this now since I am seeing less linked issues coming through. If it comes up again Ill add it to the README

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