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

x/mobile: Duplicate symbol '_OBJC_CLASS_$_Universeerror' #52039

Open
KiranKumar6236 opened this issue Mar 30, 2022 · 4 comments
Open

x/mobile: Duplicate symbol '_OBJC_CLASS_$_Universeerror' #52039

KiranKumar6236 opened this issue Mar 30, 2022 · 4 comments
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@KiranKumar6236
Copy link

KiranKumar6236 commented Mar 30, 2022

Environment

Xcode - 12.4
Language - Objective-C Project
Project Type - React Native

Issue

Converted a couple of go projects/libraries to iOS frameworks (.xc).
Trying to use those 2 in one iOS project but facing compiler issue like "Duplicate symbol 'OBJC_CLASS" which are related to objects of autogenerated files like Universe.objc.h.
Screenshot 2022-03-30 at 11 22 04 PM

Approach tried: 1

Did prefix binding of the go files
gomobile bind -target ios -prefix My

Result: Failed - Binder didn't bind the objects under Universe.objc.h. so the issue of duplicate symbols persists

Approach tried: 2

Update the linker flag config in Xcode
-objc

Result: Failed- The issue of duplicate symbols persists

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Mar 30, 2022
@gopherbot gopherbot added this to the Unreleased milestone Mar 30, 2022
@cherrymui
Copy link
Member

What version of Go and gomobile do you use? Thanks.

@cherrymui
Copy link
Member

cc @changkun

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 5, 2022
@antonimmo
Copy link

@cherrymui @changkun I've tried with Go 1.16 and 1.17 (1.18+ for some reason does not work, but that's a separate issue), followed the same logic as @KiranKumar6236 but didn't work. I think the best approach would be to be able to prefix those "base" classes (Universeerror) and other methods. Could you advise on the best way to achieve that?

@jjtny1
Copy link

jjtny1 commented May 31, 2023

Is there a solution to this? Im running into the exact same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants