Start a new topic

Duplicate symbols

Duplicate symbols

I have integrated Wikitude SDK, and then added via Cocoapods Google cardboard sdk. And after that in xcode I got compile errors. On device app launches as usual but google cardboard code doesn't work, just black screen. I think it's because the sdk's have some duplicates libraries.

Can you help me?

Hi Igor,
We're evaluating a way to prevent those kind of problems. So far you would need to manually remove the conflicting symbols from on of the conflicting libraries.

I'm sorry that we have no solution in place yet.

Best regards,


Have you found a solution to this yet? I am having the same issues. Wikitutde with Google VR SDK. If not, any advice on how to manually remove the conflicting symbols?

Andreas, any advice on how to remove the duplicate symbols?

Hi Andrew,
The only suggestion I can give right now is to remove the duplicate symbold from either our SDK or the Cardboard SDK.

This tutorial should help you out.

Best regards,


Thanks Andreas,

The original post show's errors that are only showing up in the Simulator (strange that it builds fine for devices and then crashes) so it's hard to work out which symbols are causing the issue. 

Looking at the tutorial and the output from the simulator log, I'm guessing I need to remove libCommonLibrary.a. Does this sound correct (because the name seems to indicate that it's important). Is libCommonLibrary.a a WikiTude library or a reducntant common system library and do you think this is the file I should remove?

Please forgive my ignorance - never had to do this before. 




So I'm obviously removing the wrong symbols I've attached the steps I've taken below to remove libCommonLibrary.a from the SDK. Appears to all be wokring but I'm getting even more errors now so clearly this is a required library. Any advice as to which symbols I need to remove?




Undefined symbols for architecture arm64:

  "_FreeImage_GetFIFCount", referenced from:

      _FreeImage_GetFileTypeFromHandle in WikitudeSDK(GetType.o)

  "_FreeImage_SaveToHandle", referenced from:

      _FreeImage_SaveToMemory in WikitudeSDK(MemoryIO.o)

  "_FreeImage_LoadFromHandle", referenced from:

      _FreeImage_LoadFromMemory in WikitudeSDK(MemoryIO.o)

  "_FreeImage_DeInitialise", referenced from:

      wikitude::sdk_foundation::impl::ImageLoader::~ImageLoader() in WikitudeSDK(ImageLoader.o)

      FreeImage_SO_DeInitialise() in WikitudeSDK(FreeImage.o)

  "_FreeImage_Initialise", referenced from:

      wikitude::sdk_foundation::impl::ImageLoader::ImageLoader(wikitude::sdk_foundation::impl::ImageLoaderObserver&, wikitude::sdk_foundation::impl::ImageLoadingQueue&) in WikitudeSDK(ImageLoader.o)

      FreeImage_SO_Initialise() in WikitudeSDK(FreeImage.o)

  "_FreeImage_Validate", referenced from:

      _FreeImage_GetFileTypeFromHandle in WikitudeSDK(GetType.o)

  "_FreeImage_GetFormatFromFIF", referenced from:

      wikitude::sdk_foundation::impl::FreeImageErrorHandler(FREE_IMAGE_FORMAT, char const*) in WikitudeSDK(ImageLoader.o)

      wikitude::sdk_foundation::impl::ImageLoader::internalThreadEntry() in WikitudeSDK(ImageLoader.o)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)






cd Wikitude.framework


lipo -info WikitudeSDK 

# @return Architectures in the fat file: WikitudeSDK are: armv7 armv7s i386 x86_64 arm64 


# Split libraries

lipo -thin armv7 WikitudeSDK -output WikitudeSDK-armv7


# Look inside 

ar -t WikitudeSDK-armv7

# @returns big list of .o


# Extract files into new folder

mkdir WikitudeSDK-armv7-extracted

cd WikitudeSDK-armv7-extracted

ar -x ../WikitudeSDK-armv7

# @returns new folder with extraced libraries


# Remove problematic library

rm -rf libCommonLibrary.a-armv7-master


# Repackage

libtool  -static *.o -o ../WikitudeSDK-armv7-noLibCommon



cd ../


# Repeated process for armv7s

lipo -thin armv7s WikitudeSDK -output WikitudeSDK-armv7s

mkdir WikitudeSDK-armv7s-extracted

cd WikitudeSDK-armv7s-extracted

ar -x ../WikitudeSDK-armv7s

rm -rf libCommonLibrary.a-armv7s-master

libtool  -static *.o -o ../WikitudeSDK-armv7s-noLibCommon


cd ../


# Repeated process for i386

lipo -thin i386 WikitudeSDK -output WikitudeSDK-i386

mkdir WikitudeSDK-i386-extracted

cd WikitudeSDK-i386-extracted

ar -x ../WikitudeSDK-i386

rm -rf libCommonLibrary.a-i386-master

libtool  -static *.o -o ../WikitudeSDK-i386-noLibCommon


cd ../


# Repeated process for x86_64

lipo -thin x86_64 WikitudeSDK -output WikitudeSDK-x86_64

mkdir WikitudeSDK-x86_64-extracted

cd WikitudeSDK-x86_64-extracted

ar -x ../WikitudeSDK-x86_64

rm -rf libCommonLibrary.a-x86_64-master

libtool  -static *.o -o ../WikitudeSDK-x86_64-noLibCommon

cd ../


# Repeated process for arm64

lipo -thin arm64 WikitudeSDK -output WikitudeSDK-arm64

mkdir WikitudeSDK-arm64-extracted

cd WikitudeSDK-arm64-extracted

ar -x ../WikitudeSDK-arm64

rm -rf libCommonLibrary.a-arm64-master

libtool  -static *.o -o ../WikitudeSDK-arm64-noLibCommon

cd ../






lipo -create WikitudeSDK-arm64-noLibCommon WikitudeSDK-armv7-noLibCommon WikitudeSDK-armv7s-noLibCommon WikitudeSDK-i386-noLibCommon WikitudeSDK-x86_64-noLibCommon -output WikitudeSDK-noLibCommon # I renamed the WikitudeSDK-noLibCommon to WikitudeSDK manually and deleted the old version. 






Hi Andrew,

it is very likely not libCommonLibrary.a that is conflicting but one of the usual image handling libraries like FreeImage that inlcude different versions of libpng or libjpeg. In previous cases libjpeg was the culprit. As Andreas mentioned the problem is not trivial and you need to try to remove the conflicting symbols and then include the other library as static library. 

Thanks Phillipp,

I've looked into the google libraries "libCardboardSDK_{ARCHITECTURENAME}.a" and the WikiTude librarys e.g. libCommonLibrary.a-armv7-master using the methods outlined in the link from Andreas but can't find any reference to libjpeg, libpng or FreeImage. Is there a way to workout secifically what library would be causing the problem? I'm comfortable removing the library but just need to work out for sure which one is causing the issue.




Hi Philipp,

At this stage we're willing to pay for the time for one of your devs to help us out with debugging this issue if that's an option.



Hi Andrew,

I'm pretty sure looking at your warnings that the jsoncpp library is the culprit. This is included in libCommonLibrary.a . Can you try to compile Cardboard SDK without jsoncpp?

Thanks Philipp

Running the following command I, dont seem to see jsonccp within the the google libraries

ar -t libCardboardSDK_armv7.a | grep json










am I correct in assuming that jsonccp isn't included or will that be included inside a .o library?

It seems that this is in the object json_value.o  file

So I removed json_value.o from libCardboardSDK_armv7.a (just armv7 for now as I'm just testing on device)

The app compiles and the video "loads" and starts playing (I can hear the audio) but the screen is blank. It then crashes with the log below

Step taken to remove json_value.o

// make working directory

mkdir libCardboardSDK_arm7-extract

cd libCardboardSDK_arm7-extract/

// extrac files into new directory

sudo ar -x ../libCardboardSDK_armv7.a

// remove offending file and original library

rm json_value.o

rm ../libCardboardSDK_armv7.a

// recompile library

libtool -static *.o -o ../libCardboardSDK_armv7.a 



(lldb) bt

* thread #22: tid = 0xc1cf4, 0x0000000100300b68 BH360`mem_seek, name = '', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)

  * frame #0: 0x0000000100300b68 BH360`mem_seek

    frame #1: 0x00000001005e1b9c BH360`unz64local_GetCurrentFileInfoInternal + 92

    frame #2: 0x00000001005e21a8 BH360`unzGoToFirstFile + 72

    frame #3: 0x00000001003010e4 BH360`unzAttach + 448

    frame #4: 0x00000001002f88d4 BH360`ion::base::ZipAssetManager::RegisterAssetData(void const*, unsigned long) + 68

    frame #5: 0x0000000100211654 BH360`ion::base::OnceFlag::CallChecked(std::__1::function<bool ()> const&) + 16

    frame #6: 0x00000001002161c4 BH360`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(std::__1::function<bool ()> const&), bool (*)()>&>(std::__1::__bind<void (&)(std::__1::function<bool ()> const&), bool (*)()>&&&) + 80

    frame #7: 0x0000000100219498 BH360`vr::VideoTextureRenderable::SetupShaderProgram(ion::base::SharedPtr<ion::gfxutils::ShaderManager> const&, ion::base::SharedPtr<ion::gfx::ShaderInputRegistry> const&) + 284

    frame #8: 0x0000000100219098 BH360`vr::VideoTextureRenderable::VideoTextureRenderable(ion::base::SharedPtr<ion::gfxutils::ShaderManager> const&, ion::base::SharedPtr<ion::gfx::Renderer> const&, vr::VideoTextureRenderable::TextureType, std::__1::vector<int, std::__1::allocator<int> > const&, ion::math::Matrix<3, float> const&, ion::base::SharedPtr<ion::gfx::Shape>, bool) + 1132

    frame #9: 0x0000000100218998 BH360`std::__1::shared_ptr<vr::VideoTextureRenderable> std::__1::shared_ptr<vr::VideoTextureRenderable>::make_shared<ion::base::SharedPtr<ion::gfxutils::ShaderManager>&, ion::base::SharedPtr<ion::gfx::Renderer>&, vr::VideoTextureRenderable::TextureType, std::__1::vector<int, std::__1::allocator<int> >&, ion::math::Matrix<3, float>&, ion::base::SharedPtr<ion::gfx::Shape>&, bool const&>(ion::base::SharedPtr<ion::gfxutils::ShaderManager>&&&, ion::base::SharedPtr<ion::gfx::Renderer>&&&, vr::VideoTextureRenderable::TextureType&&, std::__1::vector<int, std::__1::allocator<int> >&&&, ion::math::Matrix<3, float>&&&, ion::base::SharedPtr<ion::gfx::Shape>&&&, bool const&&&) + 176

    frame #10: 0x00000001002187e0 BH360`vr::VideoRenderableBuilder::Build() + 188

    frame #11: 0x000000010021802c BH360`vr::PanoVideoRenderer::SetVideoTexture(std::__1::vector<int, std::__1::allocator<int> > const&, ion::math::Matrix<3, float> const&) + 252

    frame #12: 0x0000000100121e94 BH360`- + 204

    frame #13: 0x0000000100124e30 BH360`- + 596

    frame #14: 0x000000010011be78 BH360`- + 76

    frame #15: 0x000000010011cf30 BH360`- + 236

    frame #16: 0x000000010215fb1c GPUToolsCore`- + 176

    frame #17: 0x000000018867f640 QuartzCore`CA::Display::DisplayLinkItem::dispatch(unsigned long long) + 44

    frame #18: 0x000000018867f4ec QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 444

    frame #19: 0x00000001856e8570 IOKit`IODispatchCalloutFromCFMessage + 372

    frame #20: 0x000000018541256c CoreFoundation`__CFMachPortPerform + 180

    frame #21: 0x000000018542a934 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56

    frame #22: 0x000000018542a0e8 CoreFoundation`__CFRunLoopDoSource1 + 436

    frame #23: 0x0000000185427bcc CoreFoundation`__CFRunLoopRun + 1840

    frame #24: 0x0000000185356048 CoreFoundation`CFRunLoopRunSpecific + 444

    frame #25: 0x00000001853a38d4 CoreFoundation`CFRunLoopRun + 112

    frame #26: 0x0000000185f6250c Foundation`__NSThread__start__ + 1024

    frame #27: 0x000000018450f860 libsystem_pthread.dylib`_pthread_body + 240

    frame #28: 0x000000018450f770 libsystem_pthread.dylib`_pthread_start + 284

    frame #29: 0x000000018450cdbc libsystem_pthread.dylib`thread_start + 4


Login or Signup to post a comment