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

duplicate symbol ​_OBJC_CLASS_​$_PodsDummy_Pods_packager #154

Open
peterwangxw opened this issue Jul 22, 2016 · 9 comments
Open

duplicate symbol ​_OBJC_CLASS_​$_PodsDummy_Pods_packager #154

peterwangxw opened this issue Jul 22, 2016 · 9 comments

Comments

@peterwangxw
Copy link

I tried to use the latest cocoapods-packager v1.4.0 to generate AAA.framework and BBB.framework, and someone import both of those two frameworks got the following error:

duplicate symbol ​_OBJC_CLASS_​$_PodsDummy_Pods_packager in:
   /Users/..../AAA.framework/BBB(Pods-packager-dummy.o)
   /Users/..../BBB.framework/AAA(Pods-packager-dummy.o)
duplicate symbol ​_OBJC_METACLASS_​$_PodsDummy_Pods_packager in:
   /Users/..../AAA.framework/BBB(Pods-packager-dummy.o)
   /Users/..../BBB.framework/AAA(Pods-packager-dummy.o)
ld: 2 duplicate symbols for architecture x86_64

Then I downgrade the cocoapods-packager to v1.3.0 and I still got the similar issue, the only difference is that the duplicate symbol changes, it's like:

duplicate symbol ​_OBJC_CLASS_​$_PodsDummy_Pods in:
   /Users/..../AAA.framework/BBB(Pods-dummy.o)
   /Users/..../BBB.framework/AAA(Pods-dummy.o)
duplicate symbol ​_OBJC_METACLASS_​$_PodsDummy_Pods in:
   /Users/..../AAA.framework/BBB(Pods-dummy.o)
   /Users/..../BBB.framework/AAA(Pods-dummy.o)
ld: 2 duplicate symbols for architecture x86_64

Looks like the pods dummy file name is constant instead of project name related. By the way, I tried to work with cocoapods v0.39.0 and v1.0.1.

@mdsb100
Copy link

mdsb100 commented Aug 2, 2016

See this #155
You can clone my repo and install local

rake install
gem install /path_to/cocoapods-packager/pkg/cocoapods-packager-1.4.0.gem
sudo rake install

@yehot
Copy link

yehot commented Jul 21, 2017

same issue +1

@seedotlee
Copy link

seedotlee commented Jul 26, 2017

v1.5.0 same issue +1

@peterwangxw
Copy link
Author

Fixed by appending --no-mangle --exclude-deps

@yehot
Copy link

yehot commented Jul 27, 2017

@xwang-phunware awesome! thx a lot!

@EricCheungSCUT
Copy link

@xwang-phunware It works! You save my day !

@nicolas-miari
Copy link

nicolas-miari commented Mar 23, 2021

@peterwangxw

Fixed by appending --no-mangle --exclude-deps

Sorry for the noob question, but... appending where?

@jaykon
Copy link

jaykon commented Jul 13, 2022

@xwang-phunware It works! You save my day !

how to fixed it?

@jaykon
Copy link

jaykon commented Jul 13, 2022

modify podspec:

s.pod_target_xcconfig = { 'EXCLUDED_SOURCE_FILE_NAMES' => '-dummy.m'}
s.user_target_xcconfig= { 'EXCLUDED_SOURCE_FILE_NAMES' => '
-dummy.m'}

package again,it works for me.

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

7 participants