Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4858] iOS: Duplicate Symbols (encodingMap) in TiUtils.o and 3rd Party Library

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-10-27T15:47:54.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sRelease 1.7.3, Release 1.8.0
ComponentsiOS
Labelsmerge-1.7.3
ReporterVikramjeet Singh
AssigneeReggie Seagraves
Created2011-08-01T09:54:16.000+0000
Updated2014-06-19T12:46:38.000+0000

Description

Problem

When you include the Greystrip module in an app the app crashes with SystemExit:65 if building with TiSDK 1.7.x.

Reproduction

Use the module's example app to reproduce this.

Build Error

ld: duplicate symbol _encodingMap in /var/folders/IO/IOzpz3kfFFa5JFj0INAwME+++TI/-Tmp-/mblNyDSti/greystripe/modules/iphone/ti.greystripe/1.0/libti.greystripe.a(GSBase64.o) and /var/folders/IO/IOzpz3kfFFa5JFj0INAwME+++TI/-Tmp-/mblNyDSti/greystripe/build/iphone/build/greystripe.build/Debug-iphonesimulator/greystripe.build/Objects-normal/i386/TiUtils.o for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1

Solution

Place "static" before the three variables declared at the top of TiUtils.m so that they don't collide with the library Greystrip is using.

Pull Request

https://github.com/appcelerator/titanium_mobile/pull/305

Attachments

FileDateSize
Screen Shot 2011-08-24 at 11.00.52 AM (2).png2011-08-24T11:03:27.000+00002997294

Comments

  1. Dawson Toth 2011-08-01

    Removed estimate... that was a holdover from the original [MOD-148] ticket.
  2. Vikramjeet Singh 2011-08-24

    Test bug was fixed in Pull request but fails again when tried with following configuration. TiMob 1.8.0.v20110819142548 is used. Note: Added module ti.greystripe in Titanium folder. Added module tag in tiapp.xml Added app id: 360f96ed-2109-48fb-a020-e42f6433e4f6 in example code for greystripe module. Error is not the same as previous, that was, SystemExit:65 at that time, its different and pasted below: Tested on: Mac OSX Lion TiMob: 1.8.0.v20110819142548 TiStud: 1.0.4.201108101535 Device Used: iPhone Simulator Following is the error: [DEBUG] loading: /Users/vsingh/Library/Application Support/iPhone Simulator/5.0/Applications/944E2F28-27C0-466C-BDAB-01DB621D6164/mod-148.app/app.js, resource: app_js [INFO] Greystripe module loaded [DEBUG] loading: /Users/vsingh/Library/Application Support/iPhone Simulator/5.0/Applications/944E2F28-27C0-466C-BDAB-01DB621D6164/mod-148.app/ti.greystripe.js, resource: ti_greystripe_js [ERROR] Invalid type passed to function. expected: NSDictionary, was: __NSArrayM in -[TiGreystripeModule setup:] (TiGreystripeModule.m:82) [ERROR] Script Error = Invalid type passed to function. expected: NSDictionary, was: __NSArrayM in -[TiGreystripeModule setup:] (TiGreystripeModule.m:82) at app.js (line 8). [DEBUG] application booted in 248.316050 ms
  3. Vikramjeet Singh 2011-08-24

    Check the attached screenshot with error
  4. Dawson Toth 2011-08-24

    That is a very different error, Vikramjeet. Please open a separate ticket.
  5. Jeff English 2011-08-24

    I have confirmed that this latest issue is related to code in the module and is not the same issue that was resolved with this ticket. Please open a new issue in the MOD project to address this latest problem.
  6. Vikramjeet Singh 2011-08-24

  7. Jeff English 2011-09-01

    MOD-177 is the appropriate ticket for the latest reported issue. The original issue reported by this ticket was previously resolved. This ticket should not have been re-opened.

JSON Source