{ "id": "64895", "key": "TIMOB-3802", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11330", "description": "Planning Week", "name": "Sprint 2011-21", "archived": true, "released": true, "releaseDate": "2011-05-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-26T18:23:08.000+0000", "created": "2011-04-28T07:04:20.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "build", "ios" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [ { "id": "27036", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "111760", "key": "TIMOB-13228", "fields": { "summary": "OTHER_LDFLAGS processing does not consider spaces", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-03-27T12:52:09.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When building an app that includes multiple modules and each module has OTHER_LDFLAGS defined in their module.xcconfig file, only the flags for the last module are used in the build. This causes the build to fail because the flags for the first module are not included during the link step. This issue was referenced in the developer center (http://developer.appcelerator.com/question/103551/problem-with-multiple-modules-and-otherldflags) but has recently come up with a customer using a calendar module and the barcode module. Both of these modules require the use of OTHER_LDFLAGS:\n\nBarcode:\nOTHER_LDFLAGS=$(inherited) -liconv\n\nCalendar:\nOTHER_LDFLAGS=$(inherited) -framework EventKit\n\nThe module.xcconfig file that is generated for the app by the build process (compiler.py) contains two #include statements that include each module's xcconfig file. However, due to a known limitation in XCode, $(inherited) does not work as expected for included xcconfig files. Only the last setting of the symbol is used as each symbol assignment replaces the previous one.\n\nOne end-user workaround is to edit the module.xcconfig file for the last included module so that it contains all of the combined OTHER_LDFLAGS from all of the included modules. For example, if Calendar is the last listed module in tiapp.xml, then its module.xcconfig file could be changed to\n\nOTHER_LDFLAGS=$(inherited) -framework EventKit -liconv\n\nBut this requires additional updates by the user if additional modules are added to the app or flags change for any of the modules.", "attachment": [], "flagged": false, "summary": "Problem with multiple modules and OTHER_LDFLAGS", "creator": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "132932", "author": { "name": "kclark", "key": "kclark", "displayName": "Kincy Clark", "active": true, "timeZone": "America/Los_Angeles" }, "body": "THis is pretty high priority. I would like to have at least a scope on this. ", "updateAuthor": { "name": "kclark", "key": "kclark", "displayName": "Kincy Clark", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-28T14:43:59.000+0000", "updated": "2011-04-28T14:43:59.000+0000" }, { "id": "133267", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pushing back to Sprint 19 so that debugger can take priority.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-06T09:36:50.000+0000", "updated": "2011-05-06T09:36:50.000+0000" }, { "id": "134295", "author": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "body": "This needs to be revisited as the following items are not currently handled:\n\n1. Must handle local variable references such as:\n\nMY_FLAGS=-liconv\nOTHER_LDFLAGS=$(MY_FLAGS)\n\n2. Must handle use of platform specific settings such as:\n\nOTHER_LDFLAGS[sdk=iphoneos4*]=-liconv\nOTHER_LDFLAGS[sdk=iphonesimulator*]=-liconv -framework EventKit\n\nin one file and\n\nOTHER_LDFLAGS=-framework GameKit\n\nin another file. This one is a little more complicated as the final OTHER_LDFLAGS needs to take into consideration the platform specific settings in the combined result.\n", "updateAuthor": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "created": "2011-05-25T16:13:57.000+0000", "updated": "2011-05-25T16:13:57.000+0000" }, { "id": "134354", "author": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "body": "COMPLEX TEST CASE\n\nThis test demonstrates all of the new features of the compiler, handling shared variable names, platform specific modifiers, and local variable references.\n\n1. Modify the tiapp.xml to include multiple modules (UrbanAirship, Barcode, MagTek). Can be any modules so long as you each has a module.xcconfig file with common flag names (e.g. OTHER_LDFLAGS)\n {code:title=tiapp.xml for test application|borderStyle=solid}\n ...\n \t\n\t\tti.urbanairship\n\t\tti.barcode\n\t\tti.magtek\n\t\n ...\n {code}\n2. Modify the module.xcconfig files so that they use local variable names AND also make use of platform specific modifiers.\n {code:title=Urban Airship's module.xcconfig file|borderStyle=solid} \n //OTHER_LDFLAGS=$(inherited) -ObjC -all_load -weak_library /usr/lib/libSystem.B.dylib -framework security -framework CoreTelephony\nFLAGS1=-ObjC -all_load\n OTHER_LDFLAGS=$(inherited) $(FLAGS1) -framework security -framework CoreTelephony\n OTHER_LDFLAGS[sdk=iphoneos4*]=-weak_library /usr/lib/libSystem.B.dylib\n OTHER_LDFLAGS[sdk=iphonesimulator4*]=/usr/lib/libSystem.B.dylib\n {code}\n\n {code:title=BarCode's module.xcconfig file|borderStyle=solid}\n //OTHER_LDFLAGS=$(inherited) -liconv\n MY_FLAGS=-liconv\n OTHER_LDFLAGS=$(inherited) $(MY_FLAGS)\n {code}\n\n {code:title=MagTek's module.xcconfig file|borderStyle=solid}\n //LD_FLAGS=$(inherited) -framework ExternalAccessory\n MY_FLAGS=-framework ExternalAccessory\n OTHER_LDFLAGS=$(inherited) $(MY_FLAGS)\n {code}\n3. Build/run the project. Project should build and run successfully\n4. Examine the module.xcconfig file that is generated during the build process. This module.xcconfig file is located in the build/iphone folder of the project. It should contain something like the following:\n {code:title=Generated module.xcconfig file|borderStyle=solid}\n // this is a generated file - DO NOT EDIT\n\n TI_URBANAIRSHIP_FLAGS1=-ObjC -all_load\n TI_URBANAIRSHIP_OTHER_LDFLAGS=$(inherited) $(TI_URBANAIRSHIP_FLAGS1) -framework security -framework CoreTelephony\n TI_URBANAIRSHIP_OTHER_LDFLAGS_sdk_iphoneos4__=-weak_library /usr/lib/libSystem.B.dylib\n TI_URBANAIRSHIP_OTHER_LDFLAGS_sdk_iphonesimulator4__=/usr/lib/libSystem.B.dylib\n\n TI_BARCODE_MY_FLAGS=-liconv\n TI_BARCODE_OTHER_LDFLAGS=$(inherited) $(TI_BARCODE_MY_FLAGS)\n\n TI_MAGTEK_MY_FLAGS=-framework ExternalAccessory\n TI_MAGTEK_OTHER_LDFLAGS=$(inherited) $(TI_MAGTEK_MY_FLAGS)\n\n OTHER_LDFLAGS[sdk=iphoneos4*]=$(inherited) $(TI_URBANAIRSHIP_OTHER_LDFLAGS_sdk_iphoneos4__) \n OTHER_LDFLAGS[sdk=iphonesimulator4*]=$(inherited) $(TI_URBANAIRSHIP_OTHER_LDFLAGS_sdk_iphonesimulator4__) \n FLAGS1=$(inherited) $(TI_URBANAIRSHIP_FLAGS1) \n MY_FLAGS=$(inherited) $(TI_BARCODE_MY_FLAGS) $(TI_MAGTEK_MY_FLAGS) \n OTHER_LDFLAGS=$(inherited) $(TI_URBANAIRSHIP_OTHER_LDFLAGS) $(TI_BARCODE_OTHER_LDFLAGS) $(TI_MAGTEK_OTHER_LDFLAGS) \n {code}", "updateAuthor": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "created": "2011-05-26T18:20:09.000+0000", "updated": "2011-05-26T18:20:09.000+0000" }, { "id": "134355", "author": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "body": "https://github.com/appcelerator/titanium_mobile/commit/f908030b67ee5231926b6c57635d0f9b034f9eeb", "updateAuthor": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "created": "2011-05-26T18:23:08.000+0000", "updated": "2011-05-26T18:23:08.000+0000" }, { "id": "134853", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Jun 2 2011 11:39 rc9515533", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-03T17:56:37.000+0000", "updated": "2011-06-03T17:56:37.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }