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 webp symbols #24

Closed
nkhoshini opened this issue Apr 14, 2016 · 2 comments
Closed

Duplicate webp symbols #24

nkhoshini opened this issue Apr 14, 2016 · 2 comments

Comments

@nkhoshini
Copy link

This Issue is more of an observation than a bug:

Our production project (closed source) has issues linking with WebP when pulled via YYImage. We pull in YYImage+WebP in a subspec of our open source project:
https://github.com/imojiengineering/imoji-ios-sdk/blob/master/ImojiSDK.podspec#L18

I've been able to get this resolved by forking YYImage and recompiling WebP w/o libwebpdecoder here:
https://github.com/imojiengineering/YYImage/commit/b79dd0297c1925940d7470f2147dae909e73e9e6

Note that this only happens for our production project and not any other project. Therefore I'm not sure if there's a project setting we've got misconfigured.

At any rate, the error we were getting suggests that there are duplicate symbols in the WebP build. I'm curious as to why it doesn't fail for other projects.

Message

duplicate symbol _WebPMultRows in:
    /Users/nkhoshini/projects/imoji-ios/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpdsp_la-alpha_processing.o)
    /Users/nkhoshini/projects/imoji-ios/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpdspdecode_la-alpha_processing.o)
duplicate symbol _WebPMultARGBRows in:
    /Users/nkhoshini/projects/imoji-ios/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpdsp_la-alpha_processing.o)
    /Users/nkhoshini/projects/imoji-ios/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpdspdecode_la-alpha_processing.o)
duplicate symbol _WebPInitAlphaProcessing in:
    /Users/nkhoshini/projects/imoji-ios/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpdsp_la-alpha_processing.o)
    /Users/nkhoshini/projects/imoji-ios/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpdspdecode_la-alpha_processing.o)
duplicate symbol _WebPMultRowC in:
    /Users/nkhoshini/projects/imoji-ios/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpdsp_la-alpha_processing.o)
    /Users/nkhoshini/projects/imoji-ios/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpdspdecode_la-alpha_processing.o)

Symbol dump of YYImage/Vendor/WebP.framework/WebP

~$ nm WebP | grep  _WebPMultRows
                 U _WebPMultRows
0000000000000270 T _WebPMultRows
0000000000000270 T _WebPMultRows
                 U _WebPMultRows

Configuration
Xcode 7.3
iOS SDK 9.3
OSX 10.11

@ibireme
Copy link
Owner

ibireme commented Apr 15, 2016

If you add -all_load or -force_load in your project's Other Link Flags, you may get the duplicate symbol error sometimes.

This may be a bug in compile script, I'll test your script (https://github.com/imojiengineering/YYImage/commit/b79dd0297c1925940d7470f2147dae909e73e9e6) and try to fix it. Thank you very much~

@nkhoshini
Copy link
Author

Cool thanks for the tip! In our project, the -all_load flag was what was causing the issue. Removing it links perfectly fine with the YYImage pod.

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

2 participants