iOS Cloud: fail to run on simulator after new SDK update

edited August 2013 in Native
Hi,

When I run my project on device it works fine but when I tried to changed it to simulator it giving linker error, It was working fine until I updated my photon cloud sdk few weeks back. which is Photon-iOS_v3-2-3-2_Cloud_SDK, later I update it with Photon-iOS_v3-2-4-0_Cloud_SDK but problem still persist.

I created new project from scratch but still not able to solve this one. I checked all search/include paths in target setting, it looking proper since it work very well on all iOS device. anyone knows how to deal with it? is it an issue with new photon sdk where libPhoton-cpp_Debug_iphonesimulator.a is stored?

this is very important for me since I can have few more users from simulator.

thanks.

error log:
[code2=cpp]LoadBalancing-cpp/lib/libLoadBalancing-cpp_debug_iphoneos.a (2 slices)
ld: warning: ignoring file mygame/photon/LoadBalancing-cpp/lib/libLoadBalancing-cpp_release_iphoneos.a, missing required architecture i386 in file mygame/photon/LoadBalancing-cpp/lib/libLoadBalancing-cpp_release_iphoneos.a (2 slices)
duplicate symbol _SHA256_Init in:
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(sha256.o)
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(sha2.o)
duplicate symbol _SHA256_Transform in:
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(sha256.o)
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(sha2.o)
duplicate symbol _SHA256_Update in:
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(sha256.o)
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(sha2.o)
duplicate symbol _SHA256_Final in:
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(sha256.o)
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(sha2.o)
duplicate symbol _BN_bin2bn in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_bn2bin in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_clear in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_clear_bit in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_clear_free in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_cmp in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_copy in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_dup in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_free in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_get_word in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_init in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_is_bit_set in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_mask_bits in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_new in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_num_bits in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_num_bits_word in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_set_bit in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_set_word in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_swap in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_ucmp in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_value_one in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_version in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _bn_cmp_part_words in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _bn_cmp_words in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _bn_dup_expand in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _bn_expand2 in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_lib.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_lib.o)
duplicate symbol _BN_MONT_CTX_copy in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_mont.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_mont.o)
duplicate symbol _BN_MONT_CTX_free in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_mont.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_mont.o)
duplicate symbol _BN_MONT_CTX_init in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_mont.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_mont.o)
duplicate symbol _BN_MONT_CTX_new in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_mont.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_mont.o)
duplicate symbol _BN_MONT_CTX_set in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_mont.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_mont.o)
duplicate symbol _BN_from_montgomery in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_mont.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_mont.o)
duplicate symbol _BN_mod_mul_montgomery in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_mont.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_mont.o)
duplicate symbol _BN_bn2dec in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_print.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_print.o)
duplicate symbol _BN_bn2hex in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_print.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_print.o)
duplicate symbol _BN_dec2bn in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_print.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_print.o)
duplicate symbol _BN_hex2bn in:
/Projects/mygame/photon/Photon-cpp/lib/libPhoton-cpp_Debug_iphonesimulator.a(bn_print.o)
/Projects/mygame/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(bn_print.o)
ld: 41 duplicate symbols for architecture i386[/code2]

Comments

  • Hi Paresh.

    Actually this issue should not have anything to do with updating Photon to 3.2.3.2, but should be caused by updating cocos2d-x and should also happen with older versions of Photon. The problem is that the version of libcurl, that is used by the most recent cocos2d-x versions, internally uses the same bignum implementation with the same function naming like Photon does, which results into these linker errors.

    The next Photon release will ship with a fix for this issue (we have just prefixed all the conflicting functions).

    In the meantime as a workaround you could just merge both .a files (the libcurl and the Photon one) into one single .a file with libtool:
    https://developer.apple.com/library/mac ... ool.1.html

    syntax:
    libtool -o merged.a file1.a file2.a
  • you are absolutely right Kaiserludi, I updated cocos2d-x version at the same time.
    I will try out your solution & will revert to you.

    edit: thanks it's working fine now. :D

    thanks
Sign In or Register to comment.